-x flag
[unix-history] / usr / src / usr.bin / find / Makefile
CommitLineData
97c08334 1# @(#)Makefile 4.2 (Berkeley) 83/07/21
f1d6a550
KM
2#
3DESTDIR=
4CFLAGS= -O
5LFLAGS=
6
7# The programs themselves
8#
9PROG= find
10LIBS= bigram code
11
12# Sources
13#
14SRCS= find.c bigram.c code.c
15
97c08334
KM
16all: ${PROG} ${LIBS}
17
f1d6a550
KM
18find: find.c
19 cc ${CFLAGS} -o find find.c
20
21bigram: bigram.c
22 cc ${CFLAGS} -o bigram bigram.c
23
24code: code.c
25 cc ${CFLAGS} -o code code.c
26
27install: ${PROG} ${LIBS}
28 install ${PROG} ${DESTDIR}/usr/bin/${PROG}
29 -mkdir ${DESTDIR}/usr/lib/find
30 install bigram ${DESTDIR}/usr/lib/find/bigram
31 install code ${DESTDIR}/usr/lib/find/code
97c08334 32 install -c -m 755 updatedb.csh ${DESTDIR}/usr/lib/find/updatedb
f1d6a550
KM
33
34clean:
35 rm -f a.out core ${LIBS} ${PROG}
36
37depend:
38 cat </dev/null >x.c
39 for i in ${SRCS}; do \
40 (echo `basename $$i .c`.o: $$i >>makedep; \
41 /bin/grep '^#[ ]*include' x.c $$i | sed \
42 -e 's,<\(.*\)>,"/usr/include/\1",' \
43 -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
44 -e 's/\.c/.o/' >>makedep); done
45 echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
46 echo '$$r makedep' >>eddep
47 echo 'w' >>eddep
48 cp Makefile Makefile.bak
49 ed - Makefile < eddep
50 rm eddep makedep x.c
51 echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
52 echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
53 echo '# see make depend above' >> Makefile
54
55# DO NOT DELETE THIS LINE -- make depend uses it
56
57find.o: find.c
58find.o: /usr/include/stdio.h
59find.o: /usr/include/sys/param.h
60find.o: /usr/include/sys/dir.h
61find.o: /usr/include/sys/stat.h
62find.o: /usr/include/signal.h
63bigram.o: bigram.c
64bigram.o: /usr/include/stdio.h
65code.o: code.c
66code.o: /usr/include/stdio.h
67# DEPENDENCIES MUST END AT END OF FILE
68# IF YOU PUT STUFF HERE IT WILL GO AWAY
69# see make depend above