about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 17 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 5162020..3e5a38d 100644
--- a/Makefile
+++ b/Makefile
@@ -5,12 +5,15 @@ CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH)
 CGIT_CONFIG = /etc/cgitrc
 CACHE_ROOT = /var/cache/cgit
 SHA1_HEADER = <openssl/sha.h>
-GIT_VER = 1.6.4.3
+GIT_VER = 1.7.0
 GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2
 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).
 #
 
@@ -68,7 +71,7 @@ endif
 	$(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 += cache.o
 OBJECTS += cgit.o
@@ -90,6 +93,7 @@ OBJECTS += ui-refs.o
 OBJECTS += ui-repolist.o
 OBJECTS += ui-shared.o
 OBJECTS += ui-snapshot.o
+OBJECTS += ui-ssdiff.o
 OBJECTS += ui-stats.o
 OBJECTS += ui-summary.o
 OBJECTS += ui-tag.o
@@ -123,17 +127,25 @@ endif
 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
 	$(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o cgit $(OBJECTS) $(EXTLIBS)
 
 cgit.o: VERSION
 
--include $(OBJECTS:.o=.d)
+ifneq "$(MAKECMDGOALS)" "clean"
+  -include $(OBJECTS:.o=.d)
+endif
 
 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
 	$(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all