[PATCH] vmsplice2: warning fix
[splice.git] / Makefile
index 82d4ec4693175c8456f14d93a6d4d9617c9d22ca..ea113fcba251c24c8f17836c77f88aaeca2f5402 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,29 @@
 CC     = gcc
-CFLAGS = -Wall -O2 -g
-ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-PROGS  = ktee splice-cp splice-in splice-out splice-net splice-test4c splice-test4s
+CFLAGS = -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+PROGS  = ktee ktee-net splice-cp splice-in splice-out splice-net splice-test4c splice-test4s vmsplice splice-bench vmsplice2
+MANS   = splice.2 tee.2 vmsplice.2
 
 all: depend $(PROGS)
 
 %.o: %.c
-       $(CC) -o $*.o -c $(ALL_CFLAGS) $<
+       $(CC) -o $*.o -c $(CFLAGS) $<
 
 depend:
-       @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
+       @$(CC) -MM $(CFLAGS) *.c 1> .depend
 
 clean:
        -rm -f *.o $(PROGS) .depend
 
+INSTALL = install
+prefix = /usr/local
+bindir = $(prefix)/bin
+mandir = $(prefix)/man
+
+install: $(PROGS)
+       $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
+       $(INSTALL) $(PROGS) $(DESTDIR)$(bindir)
+       $(INSTALL) $(MANS) $(DESTDIR)$(mandir)/man2
+
 ifneq ($(wildcard .depend),)
 include .depend
 endif