Makefile revision 16519
116519Snate# $Id: Makefile,v 1.4 1996/05/07 23:19:47 wosch Exp $ 22258Scsgr# 32258Scsgr# By default, flex will be configured to generate 8-bit scanners only if the 42258Scsgr# -8 flag is given. If you want it to always generate 8-bit scanners, add 52258Scsgr# "-DDEFAULT_CSIZE=256" to CFLAGS. Note that doing so will double the size 62258Scsgr# of all uncompressed scanners. 72258Scsgr# 82258Scsgr# Bootstrapping of lex is handled automatically. 92307Scsgr# Also note that flex.skel no longer gets installed. 102258Scsgr# 112258Scsgr 122258ScsgrPROG= lex 1313343SpeterLINKS+= ${BINDIR}/lex ${BINDIR}/lex++ 1413343SpeterLINKS+= ${BINDIR}/lex ${BINDIR}/flex 1513343SpeterLINKS+= ${BINDIR}/lex ${BINDIR}/flex++ 162258Scsgr 172258ScsgrSRCS= ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.y \ 182258Scsgr skel.c sym.c tblcmp.c yylex.c 192258ScsgrOBJS+= scan.o 202258ScsgrLFLAGS+= -is 212258ScsgrCFLAGS+= -I. -I${.CURDIR} 2216519SnateMAN1= lex.1 2313343SpeterMLINKS+= lex.1 flex.1 2413343SpeterMLINKS+= lex.1 flex++.1 2513343SpeterMLINKS+= lex.1 lex++.1 262258Scsgr 272307ScsgrCLEANFILES+= parse.c parse.h scan.c y.tab.h y.tab.c 282258Scsgr 292258Scsgr 302258ScsgrSUBDIR= lib 312258Scsgr 3213343Speterbeforeinstall: 3313343Speter ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 644 \ 3413343Speter ${.CURDIR}/FlexLexer.h ${DESTDIR}/usr/include/g++ 3513343Speter 362258Scsgr.depend: parse.h 372258Scsgr 382258Scsgrparse.c parse.h: parse.y 392258Scsgr $(YACC) -d $(.CURDIR)/parse.y 4015679Swosch mv -f y.tab.c parse.c 4115679Swosch mv -f y.tab.h parse.h 422258Scsgr 4316519Snatebootstrap: initscan.c 442258Scsgr @echo "Bootstrapping flex" 452258Scsgr @rm -f scan.c 4616519Snate @cp -f ${.CURDIR}/initscan.c scan.c 472258Scsgr 4816519Snatescan.o: parse.c 4916519Snate 502258Scsgrtest: check 512258Scsgrcheck: $(PROG) 522258Scsgr ./$(PROG) $(LFLAGS) -t $(COMPRESSION) $(.CURDIR)/scan.l \ 532258Scsgr | sed s,\"$(.CURDIR)/scan.l",\"scan.l", \ 542258Scsgr | diff $(.CURDIR)/initscan.c - 552258Scsgr @echo "Check successful" 562258Scsgr 572258Scsgr.include <bsd.prog.mk> 58