Commit | Line | Data |
---|---|---|
28a57388 | 1 | # |
ba710df4 KB |
2 | # Copyright (c) 1987 Regents of the University of California. |
3 | # All rights reserved. The Berkeley software License Agreement | |
4 | # specifies the terms and conditions for redistribution. | |
5 | # | |
6 | # @(#)Makefile 4.3 (Berkeley) %G% | |
7 | # | |
8 | CFLAGS= -O | |
9 | LIBC= /lib/libc.a | |
10 | SRCS= lmain.c parser.c sub1.c sub2.c header.c | |
11 | OBJS= lmain.o parser.o sub1.o sub2.o header.o | |
28a57388 SL |
12 | |
13 | all: lex | |
14 | ||
ba710df4 KB |
15 | lex: ${OBJS} ${LIBC} |
16 | ${CC} ${CFLAGS} ${OBJS} -o $@ | |
17 | ||
18 | smallex: ${SRCS} ${LIBC} FRC | |
19 | ${CC} -DSMALL ${CFLAGS} ${SRCS} -o $@ | |
20 | ||
21 | clean: FRC | |
22 | rm -f ${OBJS} core lex smallex parser.c | |
23 | ||
24 | depend: ${SRCS} FRC | |
25 | mkdep ${CFLAGS} ${SRCS} | |
26 | ||
27 | install: FRC | |
28 | install -s -o bin -g bin -m 755 lex ${DESTDIR}/usr/bin/lex | |
29 | install -c -o bin -g bin -m 755 ncform ${DESTDIR}/usr/lib/lex/ncform | |
30 | install -c -o bin -g bin -m 755 nrform ${DESTDIR}/usr/lib/lex/nrform | |
31 | ||
32 | lint: ${SRCS} FRC | |
33 | lint ${CFLAGS} ${SRCS} | |
28a57388 | 34 | |
ba710df4 KB |
35 | tags: ${SRCS} FRC |
36 | ctags ${SRCS} | |
28a57388 | 37 | |
ba710df4 | 38 | FRC: |
28a57388 | 39 | |
ba710df4 KB |
40 | # DO NOT DELETE THIS LINE -- mkdep uses it. |
41 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. | |
28a57388 | 42 | |
ba710df4 KB |
43 | lmain.o: lmain.c ldefs.c /usr/include/stdio.h once.c |
44 | parser.o: parser.c ldefs.c /usr/include/stdio.h | |
45 | sub1.o: sub1.c ldefs.c /usr/include/stdio.h | |
46 | sub2.o: sub2.c ldefs.c /usr/include/stdio.h | |
47 | header.o: header.c ldefs.c /usr/include/stdio.h | |
a8629c9c | 48 | |
ba710df4 | 49 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |