Makefile revision 1.9
1# from: @(#)Makefile 5.4 (Berkeley) 6/24/90 2# $NetBSD: Makefile,v 1.9 2011/03/08 19:25:32 plunky Exp $ 3# 4# By default, flex will be configured to generate 8-bit scanners only if the 5# -8 flag is given. If you want it to always generate 8-bit scanners, add 6# "-DDEFAULT_CSIZE=256" to CPPFLAGS. Note that doing so will double the size 7# of all uncompressed scanners. 8# 9# If on your system you have trouble building flex due to 8-bit character 10# problems, remove the -8 from FLEX_FLAGS and the "#define FLEX_8_BIT_CHARS" 11# from the beginning of flexdef.h. 12# 13# To bootstrap lex, cp initscan.c to scan.c and run make. 14 15PROG= lex 16CPPFLAGS+=-I. -I${.CURDIR} 17SRCS= \ 18buf.c \ 19ccl.c \ 20dfa.c \ 21ecs.c \ 22filter.c \ 23gen.c \ 24main.c \ 25misc.c \ 26nfa.c \ 27options.c \ 28parse.y \ 29regex.c \ 30scan.l \ 31scanflags.c \ 32scanopt.c \ 33skel.c \ 34sym.c \ 35tables.c \ 36tables_shared.c \ 37tblcmp.c \ 38yylex.c 39 40YHEADER=1 41CLEANFILES+=skel.c 42INCS =FlexLexer.h 43INCSDIR=/usr/include/g++ 44LDADD+=-lm 45.ifndef HOSTPROG 46DPADD+=${LIBM} 47.endif 48 49MAN = flex.1 50 51LINKS= ${BINDIR}/lex ${BINDIR}/flex \ 52 ${BINDIR}/lex ${BINDIR}/flex++ 53MLINKS= flex.1 lex.1 54 55skel.c: flex.skl mkskel.sh flexint.h tables_shared.h 56 ${TOOL_SED} -e 's/m4_/m4postproc_/g' -e 's/m4preproc_/m4_/g' \ 57 ${IDIST}/flex.skl | ${TOOL_M4} -I${IDIST} -P \ 58 -DFLEX_MAJOR_VERSION=`echo ${VERSION} | cut -f 1 -d .` \ 59 -DFLEX_MINOR_VERSION=`echo ${VERSION} | cut -f 2 -d .` \ 60 -DFLEX_SUBMINOR_VERSION=`echo ${VERSION} | cut -f 3 -d .` | \ 61 ${TOOL_SED} -e 's/m4postproc_/m4_/g' | \ 62 ${HOST_SH} ${IDIST}/mkskel.sh > ${.TARGET} 63 64.ifndef HOSTPROG 65scan.c: scan.l 66 ${_MKTARGET_LEX} 67 ${LEX} -t -p ${.ALLSRC} >${.TARGET} 68.endif 69 70scan.o yylex.o: parse.h 71 72.include <bsd.prog.mk> 73