file system reorg
[unix-history] / usr / src / old / cpp / Makefile
CommitLineData
0d8111ee 1#
c6dbd6ab
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#
e71786fc 6# @(#)Makefile 1.7 (Berkeley) %G%
c6dbd6ab 7#
2d49b09b 8CFLAGS= -O -Dunix=1 -DFLEXNAMES
c6dbd6ab 9LIBC= /lib/libc.a
e71786fc 10YYFIX= ../../libexec/pcc/pcc.${MACHINE}/:yyfix
c6dbd6ab
KB
11SRCS= cpp.c cpy.c rodata.c
12OBJS= cpp.o cpy.o rodata.o
0d8111ee 13
c6dbd6ab 14all: cpp
0d8111ee 15
c6dbd6ab
KB
16cpp: ${OBJS} ${LIBC}
17 ${CC} -o $@ ${CFLAGS} ${OBJS}
18
19cpy.c: cpy.y
0d8111ee 20 yacc cpy.y
2d49b09b 21 ${YYFIX} yyexca yyact yypact yypgo yyr1 yyr2 yychk yydef
0d8111ee 22 mv y.tab.c cpy.c
0d8111ee 23
c6dbd6ab
KB
24cpy.o: cpy.c yylex.c
25
26rodata.o: cpy.c
27 ${CC} ${CFLAGS} -R -c rodata.c
28
5b5d510e 29clean:
c6dbd6ab
KB
30 rm -f ${OBJS} cpp core cpy.c rodata.c
31
5b5d510e
KB
32cleandir: clean
33 rm -f ${MAN} tags .depend
34
35depend: ${SRCS}
c6dbd6ab
KB
36 mkdep ${CFLAGS} ${SRCS}
37
5b5d510e 38install: ${MAN}
e71786fc 39 install -s -o bin -g bin -m 755 cpp ${DESTDIR}/usr/bin
c6dbd6ab 40
5b5d510e 41lint: ${SRCS}
c6dbd6ab
KB
42 lint ${CFLAGS} ${SRCS}
43
5b5d510e 44tags: ${SRCS}
c6dbd6ab 45 ctags ${SRCS}