1
# written by Guido Socher
2
# overwrite with: make prefix=/some/where install
5
mandir=$(prefix)/share/man
6
MANP=man1/whichman.1 man1/ftff.1 man1/ftwhich.1
13
all:whichman ftff ftwhich
15
whichman: whichman.o levdist.o
16
$(CC) -o $@ whichman.o levdist.o
18
ftwhich: ftwhich.o levdist.o
19
$(CC) -o $@ ftwhich.o levdist.o
21
ftff: ftff.o levdist.o
22
$(CC) -o $@ ftff.o levdist.o
24
whichman.o: whichman.c
25
$(CC) $(CFLAGS) -c whichman.c
27
$(CC) $(CFLAGS) -c ftwhich.c
29
$(CC) $(CFLAGS) -c ftff.c
30
levdist.o: levdist.c levdist.h
31
$(CC) $(CFLAGS) -c levdist.c
33
install: whichman ftff ftwhich $(MANP)
37
[ -d "$(prefix)/bin" ] || $(INSTALL) -d $(prefix)/bin
38
[ -d "$(mandir)/man1" ] || $(INSTALL) -d $(mandir)/man1
39
$(INSTALL) -m 755 whichman $(prefix)/bin
40
$(INSTALL) -m 755 ftwhich $(prefix)/bin
41
$(INSTALL) -m 755 ftff $(prefix)/bin
42
for p in $(MANP) ; do \
43
echo "installing $$p in $(mandir)/man1"; \
44
$(INSTALL) -m 644 $$p $(mandir)/man1 ;\
47
install_with_cp: whichman ftff ftwhich $(MANP)
48
chmod 755 whichman ftff ftwhich
49
[ -d "$(prefix)/bin" ] || mkdir -p $(prefix)/bin
50
cp whichman ftff ftwhich $(prefix)/bin
52
[ -d "$(mandir)/man1" ] || mkdir -p $(mandir)/man1
53
cp $(MANP) $(mandir)/man1
56
$(CC) $(CFLAGS) -o levdebug -DDEBUG -DRETURNVALUE levdist.c
59
rm -f whichman ftff ftwhich *.o levdebug