| 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 | # |
| 6 | # @(#)Makefile 1.5 (Berkeley) %G% |
| 7 | # |
| 8 | DESTDIR= |
| 9 | CFLAGS= -O |
| 10 | SRCS= c20.c c21.c c22.c c23.c |
| 11 | OBJS= c20.o c21.o c22.o c23.o |
| 12 | |
| 13 | all: c2 |
| 14 | |
| 15 | c2: ${OBJS} ${LIBC} |
| 16 | ${CC} -o $@ ${OBJS} |
| 17 | |
| 18 | c23.o: c23.c |
| 19 | ${CC} ${CFLAGS} -R -c c23.c |
| 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 | |
| 31 | clean: |
| 32 | rm -f *.o *.s c2 |
| 33 | |
| 34 | cleandir: clean |
| 35 | rm -f ${MAN} tags .depend |
| 36 | |
| 37 | install: ${MAN} |
| 38 | install -s -o bin -g bin -m 755 c2 ${DESTDIR}/usr/libexec/c2 |
| 39 | |
| 40 | tags: ${SRCS} |
| 41 | ctags ${SRCS} |
| 42 | |
| 43 | depend: ${SRCS} |
| 44 | mkdep ${CFLAGS} ${SRCS} |