author | Mikhail Gusarov <dottedmag@dottedmag.net> | 2009-10-28 21:39:55 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2009-11-07 15:23:19 (UTC) |
commit | 59310ab102a448d90c337b3b138dd53681d8097e (patch) (side-by-side diff) | |
tree | 6b2d1aa00ed31247bf06b87722a35b1f75ceb093 | |
parent | 4b1fee00ddfbb7bfb48f85bef49b5aff928d0f2e (diff) | |
download | cgit-59310ab102a448d90c337b3b138dd53681d8097e.zip cgit-59310ab102a448d90c337b3b138dd53681d8097e.tar.gz cgit-59310ab102a448d90c337b3b138dd53681d8097e.tar.bz2 |
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>
-rw-r--r-- | Makefile | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -13,2 +13,5 @@ INSTALL = install # +# 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). @@ -70,3 +73,3 @@ endif -EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto +EXTLIBS = git/libgit.a git/xdiff/lib.a -lz OBJECTS = @@ -125,2 +128,8 @@ ifdef NO_STRCASESTR endif +ifdef NO_OPENSSL + CFLAGS += -DNO_OPENSSL + GIT_OPTIONS += NO_OPENSSL=1 +else + EXTLIBS += -lcrypto +endif @@ -134,4 +143,4 @@ 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 |