summaryrefslogtreecommitdiffabout
path: root/Makefile
Side-by-side diff
Diffstat (limited to 'Makefile') (more/less context) (show whitespace changes)
-rw-r--r--Makefile29
1 files changed, 18 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index c2a5736..e69ad7e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,3 @@
-CGIT_VERSION = 0.5
-
prefix = /var/www/htdocs/cgit
-
SHA1_HEADER = <openssl/sha.h>
CACHE_ROOT = /var/cache/cgit
@@ -13,4 +10,15 @@ CGIT_SCRIPT_NAME = cgit.cgi
-include cgit.conf
+
+CGIT_VERSION = 0.5
+
+all: cgit
+
+VERSION:
+ gen-version.sh
+
+-include VERSION
+
+
EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto
OBJECTS = shared.o cache.o parsing.o html.o ui-shared.o ui-repolist.o \
@@ -43,10 +51,5 @@ endif
-#
-# basic build rules
-#
-all: cgit
-
-cgit: cgit.c cgit.h $(OBJECTS)
+cgit: cgit.c cgit.h VERSION $(OBJECTS)
$(CC) $(CFLAGS) cgit.c -o cgit $(OBJECTS) $(EXTLIBS)
@@ -66,5 +69,5 @@ install: all clean-cache
clean-cgit:
- rm -f cgit *.o
+ rm -f cgit VERSION *.o
distclean-cgit: clean-cgit
@@ -84,4 +87,8 @@ clean: clean-cgit clean-sub
distclean: distclean-cgit distclean-sub
+version: clean-cgit
+ ./gen-version.sh
+ make
+
.PHONY: all install clean clean-cgit clean-sub clean-cache \
- distclean distclean-cgit distclean-sub
+ distclean distclean-cgit distclean-sub release version