Add nettest/ tools
[splice.git] / Makefile
CommitLineData
d8525fbd 1CC = gcc
49b68ef7 2CFLAGS = -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
27e4ade6 3PROGS = ktee ktee-net splice-cp splice-in splice-out splice-tonet splice-fromnet splice-test4c splice-test4s vmsplice splice-bench vmsplice2 vmsplice-touser splice-fromnet
55a264df 4MANS = splice.2 tee.2 vmsplice.2
d8525fbd
JA
5
6all: depend $(PROGS)
211f748c 7 $(MAKE) -C nettest
d8525fbd
JA
8
9%.o: %.c
49b68ef7 10 $(CC) -o $*.o -c $(CFLAGS) $<
d8525fbd
JA
11
12depend:
49b68ef7 13 @$(CC) -MM $(CFLAGS) *.c 1> .depend
d8525fbd
JA
14
15clean:
16 -rm -f *.o $(PROGS) .depend
211f748c 17 $(MAKE) -C nettest clean
d8525fbd 18
4c8248cc
JA
19INSTALL = install
20prefix = /usr/local
21bindir = $(prefix)/bin
55a264df 22mandir = $(prefix)/man
4c8248cc
JA
23
24install: $(PROGS)
25 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
26 $(INSTALL) $(PROGS) $(DESTDIR)$(bindir)
91c5f26d 27 $(INSTALL) -m755 -d $(DESTDIR)$(mandir)/man2
55a264df 28 $(INSTALL) $(MANS) $(DESTDIR)$(mandir)/man2
4c8248cc 29
d8525fbd
JA
30ifneq ($(wildcard .depend),)
31include .depend
32endif