summaryrefslogtreecommitdiffabout
path: root/Makefile
Side-by-side diff
Diffstat (limited to 'Makefile') (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile15
1 files changed, 12 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index cb7875e..f8a4d47 100644
--- a/Makefile
+++ b/Makefile
@@ -12,4 +12,7 @@ INSTALL = install
# 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).
#
@@ -69,5 +72,5 @@ endif
-EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto
+EXTLIBS = git/libgit.a git/xdiff/lib.a -lz
OBJECTS =
OBJECTS += cache.o
@@ -125,4 +128,10 @@ ifdef NO_STRCASESTR
CFLAGS += -DNO_STRCASESTR
endif
+ifdef NO_OPENSSL
+ CFLAGS += -DNO_OPENSSL
+ GIT_OPTIONS += NO_OPENSSL=1
+else
+ EXTLIBS += -lcrypto
+endif
cgit: $(OBJECTS) libgit
@@ -134,6 +143,6 @@ cgit.o: VERSION
libgit:
- $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 libgit.a
- $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 xdiff/lib.a
+ $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 $(GIT_OPTIONS) libgit.a
+ $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 $(GIT_OPTIONS) xdiff/lib.a
test: all