1# @(#)Makefile 4.2 (Berkeley) 83/07/21 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 16all: ${PROG} ${LIBS} 17 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 32 install -c -m 755 updatedb.csh ${DESTDIR}/usr/lib/find/updatedb 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 70