summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile15
1 files changed, 12 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 60d8c58..4e101d3 100644
--- a/Makefile
+++ b/Makefile
@@ -10,8 +10,11 @@ GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2
10INSTALL = install 10INSTALL = install
11 11
12# Define NO_STRCASESTR if you don't have strcasestr. 12# Define NO_STRCASESTR if you don't have strcasestr.
13# 13#
14# Define NO_OPENSSL to disable linking with OpenSSL and use bundled SHA1
15# implementation (slower).
16#
14# Define NEEDS_LIBICONV if linking with libc is not enough (eg. Darwin). 17# Define NEEDS_LIBICONV if linking with libc is not enough (eg. Darwin).
15# 18#
16 19
17#-include config.mak 20#-include config.mak
@@ -67,9 +70,9 @@ endif
67%.o: %.c 70%.o: %.c
68 $(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $< 71 $(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $<
69 72
70 73
71EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto 74EXTLIBS = git/libgit.a git/xdiff/lib.a -lz
72OBJECTS = 75OBJECTS =
73OBJECTS += cache.o 76OBJECTS += cache.o
74OBJECTS += cgit.o 77OBJECTS += cgit.o
75OBJECTS += cmd.o 78OBJECTS += cmd.o
@@ -122,8 +125,14 @@ ifdef NO_ICONV
122endif 125endif
123ifdef NO_STRCASESTR 126ifdef NO_STRCASESTR
124 CFLAGS += -DNO_STRCASESTR 127 CFLAGS += -DNO_STRCASESTR
125endif 128endif
129ifdef NO_OPENSSL
130 CFLAGS += -DNO_OPENSSL
131 GIT_OPTIONS += NO_OPENSSL=1
132else
133 EXTLIBS += -lcrypto
134endif
126 135
127cgit: $(OBJECTS) libgit 136cgit: $(OBJECTS) libgit
128 $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o cgit $(OBJECTS) $(EXTLIBS) 137 $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o cgit $(OBJECTS) $(EXTLIBS)
129 138
@@ -131,10 +140,10 @@ cgit.o: VERSION
131 140
132-include $(OBJECTS:.o=.d) 141-include $(OBJECTS:.o=.d)
133 142
134libgit: 143libgit:
135 $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 libgit.a 144 $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 $(GIT_OPTIONS) libgit.a
136 $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 xdiff/lib.a 145 $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 $(GIT_OPTIONS) xdiff/lib.a
137 146
138test: all 147test: all
139 $(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all 148 $(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all
140 149