Commit | Line | Data |
---|---|---|
d8525fbd | 1 | CC = gcc |
49b68ef7 | 2 | CFLAGS = -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 |
648a7fef | 3 | PROGS = ktee ktee-net splice-cp splice-in splice-out splice-net splice-test4c splice-test4s vmsplice splice-bench vmsplice2 |
55a264df | 4 | MANS = splice.2 tee.2 vmsplice.2 |
d8525fbd JA |
5 | |
6 | all: depend $(PROGS) | |
7 | ||
8 | %.o: %.c | |
49b68ef7 | 9 | $(CC) -o $*.o -c $(CFLAGS) $< |
d8525fbd JA |
10 | |
11 | depend: | |
49b68ef7 | 12 | @$(CC) -MM $(CFLAGS) *.c 1> .depend |
d8525fbd JA |
13 | |
14 | clean: | |
15 | -rm -f *.o $(PROGS) .depend | |
16 | ||
4c8248cc JA |
17 | INSTALL = install |
18 | prefix = /usr/local | |
19 | bindir = $(prefix)/bin | |
55a264df | 20 | mandir = $(prefix)/man |
4c8248cc JA |
21 | |
22 | install: $(PROGS) | |
23 | $(INSTALL) -m755 -d $(DESTDIR)$(bindir) | |
24 | $(INSTALL) $(PROGS) $(DESTDIR)$(bindir) | |
55a264df | 25 | $(INSTALL) $(MANS) $(DESTDIR)$(mandir)/man2 |
4c8248cc | 26 | |
d8525fbd JA |
27 | ifneq ($(wildcard .depend),) |
28 | include .depend | |
29 | endif |