Merge from vendor branch PKGSRC:
[netbsd-mini2440.git] / usr.bin / lex / Makefile
blobbfe7b00a2d6ca6e0b03e7e9768e8df95c5ce80b7
1 # from: @(#)Makefile 5.4 (Berkeley) 6/24/90
2 # $NetBSD: Makefile,v 1.28 2006/10/08 17:52:29 peter Exp $
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.
13 # To bootstrap lex, cp initscan.c to scan.c and run make.
15 WARNS?= 1 # XXX many -Wshadow -Wcast-qual issues
17 PROG= lex
18 CPPFLAGS+=-I. -I${.CURDIR}
19 SRCS= ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.y sym.c tblcmp.c \
20 yylex.c scan.c skel.c
21 YHEADER=1
22 CLEANFILES+=scan.c skel.c
23 INCS =FlexLexer.h
24 INCSDIR=/usr/include/g++
26 MAN = flex.1
28 LINKS= ${BINDIR}/lex ${BINDIR}/flex \
29 ${BINDIR}/lex ${BINDIR}/flex++
30 MLINKS= flex.1 lex.1
32 skel.c: mkskel.sh flex.skl
33 ${_MKTARGET_CREATE}
34 ${HOST_SH} ${.ALLSRC} >${.TARGET}
36 .ifndef HOSTPROG
37 scan.c: scan.l
38 ${_MKTARGET_LEX}
39 ${LEX} -t -p ${.ALLSRC} >${.TARGET}
40 .endif
42 scan.o yylex.o: parse.h
44 .include <bsd.prog.mk>