1# $OpenBSD: Makefile,v 1.9 2003/12/09 12:42:41 jmc 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# If on your system you have trouble building flex due to 8-bit character 9# problems, remove the -8 from FLEX_FLAGS and the "#define FLEX_8_BIT_CHARS" 10# from the beginning of flexdef.h. 11# 12# To bootstrap lex, cp initscan.c to scan.c and run make. 13 14PROG= lex 15CFLAGS+=-I. -I${.CURDIR} 16SRCS= ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.c sym.c tblcmp.c \ 17 yylex.c 18OBJS+= scan.o skel.o 19CLEANFILES+=parse.c parse.h scan.c skel.c y.tab.c y.tab.h 20LDADD= -ll 21DPADD= ${LIBL} 22 23MAN = flex.1 24 25LINKS= ${BINDIR}/lex ${BINDIR}/flex \ 26 ${BINDIR}/lex ${BINDIR}/flex++ 27MLINKS= flex.1 lex.1 flex.1 flex++.1 28 29# This just gets installed verbatim 30.if make(install) 31SUBDIR+= PSD.doc 32.endif 33 34parse.h parse.c: parse.y 35 ${YACC} -d ${.ALLSRC} 36 mv y.tab.c parse.c 37 mv y.tab.h parse.h 38 39skel.c: flex.skl mkskel.sh 40 sh ${.CURDIR}/mkskel.sh ${.CURDIR}/flex.skl > skel.c 41 42scan.c: scan.l 43 flex -t -p ${.CURDIR}/scan.l > scan.c 44 45scan.o: parse.c 46 47includes: 48 ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \ 49 ${.CURDIR}/FlexLexer.h ${DESTDIR}/usr/include/g++ 50 51.include <bsd.prog.mk> 52