1# $MirOS: src/usr.bin/lex/Makefile,v 1.6 2007/05/17 18:38:37 tg Exp $
2# $OpenBSD: Makefile,v 1.9 2003/12/09 12:42:41 jmc 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 CFLAGS.  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=		flex
16SRCS=		ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c \
17		parse.y scan.l skel.c sym.c tblcmp.c yylex.c
18CPPFLAGS+=	-I.
19CLEANFILES+=	skel.c
20LDADD=		-ll
21DPADD=		${LIBL}
22
23LINKS=		${BINDIR}/flex ${BINDIR}/lex \
24		${BINDIR}/flex ${BINDIR}/flex++
25MLINKS=		flex.1 lex.1 flex.1 flex++.1
26HDRS=		FlexLexer.h
27
28# This just gets installed verbatim
29.if make(install)
30SUBDIR+=	 PSD.doc
31.endif
32
33skel.c:	flex.skl mkskel.sh
34	${SHELL} ${.CURDIR}/mkskel.sh ${.CURDIR}/flex.skl >$@
35
36.include <bsd.prog.mk>
37