Makefile revision 15679
1# $Id: Makefile,v 1.3 1996/01/08 09:17:39 peter 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 lexdoc.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 30SUBDIR= lib 31 32beforeinstall: 33 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 644 \ 34 ${.CURDIR}/FlexLexer.h ${DESTDIR}/usr/include/g++ 35 36.depend: parse.h 37 38parse.c parse.h: parse.y 39 $(YACC) -d $(.CURDIR)/parse.y 40 mv -f y.tab.c parse.c 41 mv -f y.tab.h parse.h 42 43.if exists(/usr/bin/lex) 44scan.o: parse.c 45.else 46# We must bootstrap 47scan.o: scan.c parse.h 48 49scan.c: 50 @echo "Bootstrapping flex" 51 @rm -f scan.c 52 @cp -pf ${.CURDIR}/initscan.c scan.c 53.endif 54 55test: check 56check: $(PROG) 57 ./$(PROG) $(LFLAGS) -t $(COMPRESSION) $(.CURDIR)/scan.l \ 58 | sed s,\"$(.CURDIR)/scan.l",\"scan.l", \ 59 | diff $(.CURDIR)/initscan.c - 60 @echo "Check successful" 61 62.include <bsd.prog.mk> 63