Commit | Line | Data |
---|---|---|
90d730e6 KB |
1 | # |
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 | # | |
91e6be1a | 6 | # @(#)Makefile 1.4 (Berkeley) %G% |
f62611e5 SL |
7 | # |
8 | DESTDIR= | |
2f6f592f | 9 | CFLAGS= -O |
90d730e6 KB |
10 | SRCS= c20.c c21.c c22.c c23.c |
11 | OBJS= c20.o c21.o c22.o c23.o | |
f62611e5 | 12 | |
90d730e6 | 13 | all: c2 |
91e6be1a | 14 | |
90d730e6 KB |
15 | c2: ${OBJS} ${LIBC} |
16 | ${CC} -o $@ ${OBJS} | |
f62611e5 | 17 | |
90d730e6 KB |
18 | c23.o: c23.c |
19 | ${CC} ${CFLAGS} -R -c c23.c | |
f62611e5 SL |
20 | |
21 | c2.h: tokens | |
22 | grep -n '^' tokens>toks | |
23 | ( echo '/tokens/+1;/^$$/-1d'; \ | |
24 | echo '/tokens/r toks'; \ | |
25 | echo '/tokens/+1;/^$$/-1s/^\([0-9]*\):\([A-Z][A-Z0-9]*\)/#define \2 \1/'; \ | |
26 | echo 'w'; \ | |
27 | echo 'q'; \ | |
28 | ) | ed - c2.h | |
29 | rm toks | |
30 | ||
91e6be1a | 31 | clean: |
90d730e6 KB |
32 | rm -f *.o *.s c2 |
33 | ||
91e6be1a KB |
34 | cleandir: clean |
35 | rm -f ${MAN} tags .depend | |
36 | ||
37 | install: ${MAN} | |
90d730e6 KB |
38 | install -s -o bin -g bin -m 755 c2 ${DESTDIR}/lib/c2 |
39 | ||
91e6be1a | 40 | tags: ${SRCS} |
90d730e6 KB |
41 | ctags ${SRCS} |
42 | ||
91e6be1a | 43 | depend: ${SRCS} |
90d730e6 | 44 | mkdep ${CFLAGS} ${SRCS} |