Commit | Line | Data |
---|---|---|
28a57388 | 1 | # |
d4e49838 KB |
2 | # Copyright (c) 1987 The Regents of the University of California. |
3 | # All rights reserved. | |
ba710df4 | 4 | # |
d4e49838 KB |
5 | # Redistribution and use in source and binary forms are permitted |
6 | # provided that the above copyright notice and this paragraph are | |
7 | # duplicated in all such forms and that any documentation, | |
8 | # advertising materials, and other materials related to such | |
9 | # distribution and use acknowledge that the software was developed | |
10 | # by the University of California, Berkeley. The name of the | |
11 | # University may not be used to endorse or promote products derived | |
12 | # from this software without specific prior written permission. | |
13 | # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
14 | # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
15 | # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
16 | # | |
dc0e9d50 | 17 | # @(#)Makefile 4.5 (Berkeley) %G% |
ba710df4 KB |
18 | # |
19 | CFLAGS= -O | |
20 | LIBC= /lib/libc.a | |
21 | SRCS= lmain.c parser.c sub1.c sub2.c header.c | |
22 | OBJS= lmain.o parser.o sub1.o sub2.o header.o | |
d4e49838 | 23 | MAN= lex.0 |
28a57388 SL |
24 | |
25 | all: lex | |
26 | ||
ba710df4 KB |
27 | lex: ${OBJS} ${LIBC} |
28 | ${CC} ${CFLAGS} ${OBJS} -o $@ | |
29 | ||
30 | smallex: ${SRCS} ${LIBC} FRC | |
31 | ${CC} -DSMALL ${CFLAGS} ${SRCS} -o $@ | |
32 | ||
d4e49838 | 33 | clean: |
ba710df4 KB |
34 | rm -f ${OBJS} core lex smallex parser.c |
35 | ||
d4e49838 KB |
36 | cleandir: clean |
37 | rm -f ${MAN} tags .depend | |
38 | ||
39 | depend: ${SRCS} | |
ba710df4 KB |
40 | mkdep ${CFLAGS} ${SRCS} |
41 | ||
d4e49838 | 42 | install: ${MAN} |
dc0e9d50 KB |
43 | install -s -o bin -g bin -m 755 lex ${DESTDIR}/usr/bin |
44 | install -c -o bin -g bin -m 444 nrform ncform ${DESTDIR}/usr/share/misc | |
d4e49838 | 45 | install -c -o bin -g bin -m 755 ${MAN} ${DESTDIR}/usr/man/cat1 |
ba710df4 | 46 | |
d4e49838 | 47 | lint: ${SRCS} |
ba710df4 | 48 | lint ${CFLAGS} ${SRCS} |
28a57388 | 49 | |
d4e49838 | 50 | tags: ${SRCS} |
ba710df4 | 51 | ctags ${SRCS} |