xref: /original-bsd/old/pcc/lint/lpass1/Makefile (revision 72b8f354)
1#	@(#)Makefile	5.3 (Berkeley) 06/18/90
2
3MIP=	${.CURDIR}/../../../libexec/pcc/mip
4
5PROG=	lintpass1
6CFLAGS+=-I${MIP} -I. -I${.CURDIR}
7.PATH:	${MIP}
8SRCS=	cgram.c common.c hash.c lint.c optim.c pftn.c rel.c rodata.c scan.c \
9	trees.c xdefs.c
10BINDIR=	/usr/libexec
11MAN1=	lint.0
12
13.include <bsd.prog.mk>
14
15rodata.o:
16	$(CC) -c ${CFLAGS} -R ${.IMPSRC}
17
18common.o:
19	${CC} -c ${CFLAGS} -DPASS1COMMON ${.IMPSRC}
20
21rodata.c cgram.c: pcclocal.h pcctokens
22	cat pcctokens ${MIP}/cgram.y > gram.in
23	${YACC} gram.in
24	yyfix rodata.c yylhs yylen yydefred yydgoto yysindex yyrindex yygindex \
25	    yytable yycheck
26	mv y.tab.c cgram.c
27
28pcclocal.h: localdefs.h /usr/include/pcc.h
29	cat ${.ALLSRC} | \
30	   egrep '^#[ 	]*(define[ 	][ 	]*PCC(F|T|TM|OM)?_|ifdef|ifndef|endif)' | \
31	   sed -e 's/PCC[A-Z]*_//' > ${.TARGET}
32
33pcctokens: localdefs.h /usr/include/pcc.h
34	cat ${.ALLSRC} | \
35	    egrep '^#[ 	]*define[ 	][ 	]*PCC_' | \
36	    sed -e 's/^#[ 	]*define[ 	][ 	]*PCC_/%term	/' > \
37	    ${.TARGET}
38