Makefile revision 1.10
1#	from: @(#)Makefile	5.4 (Berkeley) 6/24/90
2#	$NetBSD: Makefile,v 1.10 2017/01/02 17:45:26 christos 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
15.include <bsd.init.mk>
16
17PROG=	lex
18CPPFLAGS+=-I. -I${.CURDIR} -DVERSION=\"${VERSION}\"
19SRCS=	 \
20buf.c \
21ccl.c \
22dfa.c \
23ecs.c \
24filter.c \
25gen.c \
26main.c \
27misc.c \
28nfa.c \
29options.c \
30parse.y \
31regex.c \
32scan.l \
33scanflags.c \
34scanopt.c \
35skel.c \
36sym.c \
37tables.c \
38tables_shared.c \
39tblcmp.c \
40yylex.c
41
42YHEADER=1
43CLEANFILES+=skel.c
44INCS	=FlexLexer.h
45INCSDIR=/usr/include/g++
46LDADD+=-lm
47.ifndef HOSTPROG
48DPADD+=${LIBM}
49.endif
50
51MAN = flex.1
52
53LINKS=	${BINDIR}/lex ${BINDIR}/flex \
54	${BINDIR}/lex ${BINDIR}/flex++
55MLINKS=	flex.1 lex.1 
56
57skel.c: flex.skl mkskel.sh flexint.h tables_shared.h
58	${TOOL_SED} -e 's/m4_/m4postproc_/g' -e 's/m4preproc_/m4_/g' \
59	    ${IDIST}/flex.skl | ${TOOL_M4} -I${IDIST} -P \
60	    -DFLEX_MAJOR_VERSION=`echo ${VERSION} | cut -f 1 -d .` \
61	    -DFLEX_MINOR_VERSION=`echo ${VERSION} | cut -f 2 -d .` \
62	    -DFLEX_SUBMINOR_VERSION=`echo ${VERSION} | cut -f 3 -d .` | \
63	    ${TOOL_SED} -e 's/m4postproc_/m4_/g' | \
64	    ${HOST_SH} ${IDIST}/mkskel.sh  > ${.TARGET}
65
66.ifndef HOSTPROG
67scan.c: scan.l
68	${_MKTARGET_LEX}
69	${LEX} -t -p ${.ALLSRC} >${.TARGET}
70.endif
71
72scan.o yylex.o: parse.h
73
74.include <bsd.prog.mk>
75