Commit | Line | Data |
---|---|---|
da7c5cc6 | 1 | # |
0880b18e | 2 | # Copyright (c) 1982, 1986 Regents of the University of California. |
da7c5cc6 KM |
3 | # All rights reserved. The Berkeley software License Agreement |
4 | # specifies the terms and conditions for redistribution. | |
5 | # | |
0880b18e | 6 | # @(#)Makefile 7.1 (Berkeley) %G% |
14ab9090 KM |
7 | # |
8 | DESTDIR= | |
9 | CFLAGS= -O | |
10 | INCPATH=-I. | |
11 | LFLAGS= | |
12 | ||
13 | # The program itself | |
14 | # | |
ea1f375a | 15 | PROG= inline |
14ab9090 KM |
16 | |
17 | # Sources | |
18 | # | |
19 | SRCS= main.c machdep.c machpats.c libcpats.c langpats.c | |
20 | ||
21 | # Objects | |
22 | # | |
23 | OBJS= main.o machdep.o machpats.o libcpats.o langpats.o | |
24 | ||
25 | # Header files | |
26 | # | |
ea1f375a | 27 | HDRS= inline.h |
14ab9090 KM |
28 | |
29 | ${PROG}: ${OBJS} ${HDRS} | |
30 | cc ${LFLAGS} -o ${PROG} ${OBJS} | |
31 | ||
32 | ${OBJS}: | |
33 | cc ${CFLAGS} ${INCPATH} -c $*.c | |
34 | ||
35 | install: ${PROG} | |
ea1f375a | 36 | install ${PROG} ../inline |
14ab9090 KM |
37 | |
38 | clean: | |
39 | rm -f a.out core ${OBJS} ${PROG} | |
40 | ||
439b2fda KM |
41 | print: |
42 | @pr ${HDRS} ${SRCS} | |
43 | ||
14ab9090 KM |
44 | lint: |
45 | lint ${SRCS} | |
46 | ||
47 | depend: | |
48 | cc -M ${INCPATH} ${SRCS} | \ | |
49 | awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \ | |
50 | else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \ | |
51 | else rec = rec " " $$2 } } \ | |
52 | END { print rec } ' > makedep | |
53 | echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep | |
54 | echo '$$r makedep' >>eddep | |
55 | echo 'w' >>eddep | |
56 | cp Makefile Makefile.bak | |
57 | ed - Makefile < eddep | |
58 | rm eddep makedep | |
59 | echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile | |
60 | echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile | |
61 | echo '# see make depend above' >> Makefile | |
62 | ||
63 | # DO NOT DELETE THIS LINE -- make depend uses it | |
64 | ||
65 | ||
ea1f375a | 66 | main.o: main.c /usr/include/stdio.h /usr/include/ctype.h ./inline.h |
14ab9090 | 67 | machdep.o: machdep.c /usr/include/stdio.h /usr/include/ctype.h |
ea1f375a KM |
68 | machpats.o: machpats.c ./inline.h |
69 | libcpats.o: libcpats.c ./inline.h | |
70 | langpats.o: langpats.c ./inline.h | |
14ab9090 KM |
71 | # DEPENDENCIES MUST END AT END OF FILE |
72 | # IF YOU PUT STUFF HERE IT WILL GO AWAY | |
73 | # see make depend above |