mirror of
https://git.zx2c4.com/cgit
synced 2024-11-22 16:38:42 +00:00
Add NO_OPENSSL option
Linking with OpenSSL is not always desirable. Add NO_OPENSSL option to use SHA-1 code bundled with Git. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
This commit is contained in:
parent
4b1fee00dd
commit
59310ab102
15
Makefile
15
Makefile
@ -11,6 +11,9 @@ INSTALL = install
|
|||||||
|
|
||||||
# Define NO_STRCASESTR if you don't have strcasestr.
|
# Define NO_STRCASESTR if you don't have strcasestr.
|
||||||
#
|
#
|
||||||
|
# Define NO_OPENSSL to disable linking with OpenSSL and use bundled SHA1
|
||||||
|
# implementation (slower).
|
||||||
|
#
|
||||||
# Define NEEDS_LIBICONV if linking with libc is not enough (eg. Darwin).
|
# Define NEEDS_LIBICONV if linking with libc is not enough (eg. Darwin).
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -68,7 +71,7 @@ endif
|
|||||||
$(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $<
|
$(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $<
|
||||||
|
|
||||||
|
|
||||||
EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto
|
EXTLIBS = git/libgit.a git/xdiff/lib.a -lz
|
||||||
OBJECTS =
|
OBJECTS =
|
||||||
OBJECTS += cache.o
|
OBJECTS += cache.o
|
||||||
OBJECTS += cgit.o
|
OBJECTS += cgit.o
|
||||||
@ -123,6 +126,12 @@ endif
|
|||||||
ifdef NO_STRCASESTR
|
ifdef NO_STRCASESTR
|
||||||
CFLAGS += -DNO_STRCASESTR
|
CFLAGS += -DNO_STRCASESTR
|
||||||
endif
|
endif
|
||||||
|
ifdef NO_OPENSSL
|
||||||
|
CFLAGS += -DNO_OPENSSL
|
||||||
|
GIT_OPTIONS += NO_OPENSSL=1
|
||||||
|
else
|
||||||
|
EXTLIBS += -lcrypto
|
||||||
|
endif
|
||||||
|
|
||||||
cgit: $(OBJECTS) libgit
|
cgit: $(OBJECTS) libgit
|
||||||
$(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o cgit $(OBJECTS) $(EXTLIBS)
|
$(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o cgit $(OBJECTS) $(EXTLIBS)
|
||||||
@ -132,8 +141,8 @@ cgit.o: VERSION
|
|||||||
-include $(OBJECTS:.o=.d)
|
-include $(OBJECTS:.o=.d)
|
||||||
|
|
||||||
libgit:
|
libgit:
|
||||||
$(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 libgit.a
|
$(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 $(GIT_OPTIONS) libgit.a
|
||||||
$(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 xdiff/lib.a
|
$(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 $(GIT_OPTIONS) xdiff/lib.a
|
||||||
|
|
||||||
test: all
|
test: all
|
||||||
$(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all
|
$(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all
|
||||||
|
Loading…
Reference in New Issue
Block a user