Makefile revision 17467
1# $Id: Makefile,v 1.5 1996/06/19 20:46:57 nate Exp $ 2# 3# By default, flex will be configured to generate 8-bit scanners only if the 4# -8 flag is given. If you want it to always generate 8-bit scanners, add 5# "-DDEFAULT_CSIZE=256" to CFLAGS. Note that doing so will double the size 6# of all uncompressed scanners. 7# 8# Bootstrapping of lex is handled automatically. 9# Also note that flex.skel no longer gets installed. 10# 11 12PROG= lex 13LINKS+= ${BINDIR}/lex ${BINDIR}/lex++ 14LINKS+= ${BINDIR}/lex ${BINDIR}/flex 15LINKS+= ${BINDIR}/lex ${BINDIR}/flex++ 16 17SRCS= ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.y \ 18 skel.c sym.c tblcmp.c yylex.c 19OBJS+= scan.o 20LFLAGS+= -is 21CFLAGS+= -I. -I${.CURDIR} 22MAN1= lex.1 23MLINKS+= lex.1 flex.1 24MLINKS+= lex.1 flex++.1 25MLINKS+= lex.1 lex++.1 26 27CLEANFILES+= parse.c parse.h scan.c y.tab.h y.tab.c 28 29.if !defined(NOLIB) 30SUBDIR= lib 31.endif 32 33beforeinstall: 34 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 644 \ 35 ${.CURDIR}/FlexLexer.h ${DESTDIR}/usr/include/g++ 36 37.depend: parse.h 38 39parse.c parse.h: parse.y 40 $(YACC) -d $(.CURDIR)/parse.y 41 mv -f y.tab.c parse.c 42 mv -f y.tab.h parse.h 43 44bootstrap: initscan.c 45 @echo "Bootstrapping flex" 46 @rm -f scan.c 47 @cp -f ${.CURDIR}/initscan.c scan.c 48 49scan.o: parse.c 50 51test: check 52check: $(PROG) 53 ./$(PROG) $(LFLAGS) -t $(COMPRESSION) $(.CURDIR)/scan.l \ 54 | sed s,\"$(.CURDIR)/scan.l",\"scan.l", \ 55 | diff $(.CURDIR)/initscan.c - 56 @echo "Check successful" 57 58.include <bsd.prog.mk> 59