summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 35 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..507c3e9
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,35 @@
+MAJOR=2
+MINOR=1
+CC?=gcc
+CFLAGS?=-g -O2 -Wall
+CFLAGS+=-I. -DVERSION=\"$(MAJOR).$(MINOR)\"
+prefix?=/usr/local
+OBJS=\
+ cbtcommon/debug.o\
+ cbtcommon/hash.o\
+ cbtcommon/text_util.o\
+ cbtcommon/sio.o\
+ cbtcommon/tcpsocket.o\
+ cvsps.o\
+ cache.o\
+ util.o\
+ stats.o\
+ cap.o\
+ cvs_direct.o\
+ list_sort.o
+
+all: cvsps
+
+cvsps: $(OBJS)
+ $(CC) -o cvsps $(OBJS) -lz
+
+install:
+ [ -d $(prefix)/bin ] || mkdir -p $(prefix)/bin
+ [ -d $(prefix)/share/man/man1 ] || mkdir -p $(prefix)/share/man/man1
+ install cvsps $(prefix)/bin
+ install -m 644 cvsps.1 $(prefix)/share/man/man1
+
+clean:
+ rm -f cvsps *.o cbtcommon/*.o core
+
+.PHONY: install clean