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