summaryrefslogtreecommitdiffabout
path: root/Makefile
Side-by-side diff
Diffstat (limited to 'Makefile') (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile12
1 files changed, 7 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index b1c3a4e..24c3963 100644
--- a/Makefile
+++ b/Makefile
@@ -5,2 +5,4 @@ gitsrc = ../git
+SHA1_HEADER = <openssl/sha.h>
+
CACHE_ROOT = /var/cache/cgit
@@ -8,3 +10,3 @@ EXTLIBS = $(gitsrc)/libgit.a $(gitsrc)/xdiff/lib.a -lz -lcrypto
OBJECTS = shared.o cache.o parsing.o html.o ui-shared.o ui-repolist.o \
- ui-summary.o ui-log.o ui-view.c ui-tree.c ui-commit.c ui-diff.o \
+ ui-summary.o ui-log.o ui-view.o ui-tree.o ui-commit.o ui-diff.o \
ui-snapshot.o
@@ -17,2 +19,4 @@ endif
+CFLAGS += -I$(gitsrc) -DSHA1_HEADER='$(SHA1_HEADER)'
+
all: cgit
@@ -24,3 +28,3 @@ install: all clean-cache
-cgit: cgit.c cgit.h git.h $(OBJECTS) $(gitsrc)/libgit.a
+cgit: cgit.c cgit.h $(OBJECTS) $(gitsrc)/libgit.a
$(CC) $(CFLAGS) -DCGIT_VERSION='"$(CGIT_VERSION)"' cgit.c -o cgit \
@@ -28,5 +32,3 @@ cgit: cgit.c cgit.h git.h $(OBJECTS) $(gitsrc)/libgit.a
-$(OBJECTS): cgit.h git.h
-
-ui-diff.o: xdiff.h
+$(OBJECTS): cgit.h