xref: /csrg-svn/old/cpp/Makefile (revision 40161)
17984Srrh#
231424Sbostic# Copyright (c) 1987 Regents of the University of California.
331424Sbostic# All rights reserved.  The Berkeley software License Agreement
431424Sbostic# specifies the terms and conditions for redistribution.
531424Sbostic#
6*40161Sbostic#	@(#)Makefile	1.8	(Berkeley)	02/20/90
731424Sbostic#
829877SsamCFLAGS=	-O -Dunix=1 -DFLEXNAMES
931424SbosticLIBC=	/lib/libc.a
1037777SbosticYYFIX=	../../libexec/pcc/pcc.${MACHINE}/:yyfix
1131424SbosticSRCS=	cpp.c cpy.c rodata.c
1231424SbosticOBJS=	cpp.o cpy.o rodata.o
137984Srrh
1431424Sbosticall: cpp
157984Srrh
1631424Sbosticcpp:	${OBJS} ${LIBC}
1731424Sbostic	${CC} -o $@ ${CFLAGS} ${OBJS}
1831424Sbostic
1931424Sbosticcpy.c: cpy.y
207984Srrh	yacc cpy.y
21*40161Sbostic	${YYFIX}  yylhs yylen yydefred yydgoto yysindex yyrindex \
22*40161Sbostic	    yygindex yytable yycheck
237984Srrh	mv y.tab.c cpy.c
247984Srrh
2531424Sbosticcpy.o: cpy.c yylex.c
267984Srrh
2731424Sbosticrodata.o: cpy.c
2831424Sbostic	${CC} ${CFLAGS} -R -c rodata.c
297984Srrh
3037052Sbosticclean:
3131424Sbostic	rm -f ${OBJS} cpp core cpy.c rodata.c
3231234Sbostic
3337052Sbosticcleandir: clean
3437052Sbostic	rm -f ${MAN} tags .depend
3537052Sbostic
3637052Sbosticdepend: ${SRCS}
3731424Sbostic	mkdep ${CFLAGS} ${SRCS}
3831424Sbostic
3937052Sbosticinstall: ${MAN}
4037777Sbostic	install -s -o bin -g bin -m 755 cpp ${DESTDIR}/usr/bin
4131424Sbostic
4237052Sbosticlint: ${SRCS}
4331424Sbostic	lint ${CFLAGS} ${SRCS}
4431424Sbostic
4537052Sbostictags: ${SRCS}
4631424Sbostic	ctags ${SRCS}
47