| 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 | CFLAGS= -O -Dunix=1 -DFLEXNAMES |
| 9 | LIBC= /lib/libc.a |
| 10 | YYFIX= ../pcc/pcc.${MACHINE}/:yyfix |
| 11 | SRCS= cpp.c cpy.c rodata.c |
| 12 | OBJS= cpp.o cpy.o rodata.o |
| 13 | |
| 14 | all: cpp |
| 15 | |
| 16 | cpp: ${OBJS} ${LIBC} |
| 17 | ${CC} -o $@ ${CFLAGS} ${OBJS} |
| 18 | |
| 19 | cpy.c: cpy.y |
| 20 | yacc cpy.y |
| 21 | ${YYFIX} yyexca yyact yypact yypgo yyr1 yyr2 yychk yydef |
| 22 | mv y.tab.c cpy.c |
| 23 | |
| 24 | cpy.o: cpy.c yylex.c |
| 25 | |
| 26 | rodata.o: cpy.c |
| 27 | ${CC} ${CFLAGS} -R -c rodata.c |
| 28 | |
| 29 | clean: FRC |
| 30 | rm -f ${OBJS} cpp core cpy.c rodata.c |
| 31 | |
| 32 | depend: ${SRCS} FRC |
| 33 | mkdep ${CFLAGS} ${SRCS} |
| 34 | |
| 35 | install: FRC |
| 36 | install -s -o bin -g bin -m 755 cpp ${DESTDIR}/lib/cpp |
| 37 | |
| 38 | lint: ${SRCS} FRC |
| 39 | lint ${CFLAGS} ${SRCS} |
| 40 | |
| 41 | tags: ${SRCS} FRC |
| 42 | ctags ${SRCS} |
| 43 | |
| 44 | FRC: |
| 45 | |
| 46 | # DO NOT DELETE THIS LINE -- mkdep uses it. |
| 47 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. |
| 48 | |
| 49 | cpp.o: cpp.c /usr/include/sys/param.h /usr/include/sys/types.h |
| 50 | cpp.o: /usr/include/signal.h /usr/include/machine/machparam.h |
| 51 | cpp.o: /usr/include/stdio.h /usr/include/ctype.h |
| 52 | cpy.o: cpy.c |
| 53 | cpy.o:yylex.c |
| 54 | rodata.o: rodata.c |
| 55 | |
| 56 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |