summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/lex/Makefile
blob: b0119d54ea71b1e4a7c4821728e8be7b0578eede (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#	from: @(#)Makefile	5.4 (Berkeley) 6/24/90
#	$Id: Makefile,v 1.4 1993/10/07 07:25:46 cgd Exp $
#
# By default, flex will be configured to generate 8-bit scanners only if the
# -8 flag is given.  If you want it to always generate 8-bit scanners, add
# "-DDEFAULT_CSIZE=256" to CFLAGS.  Note that doing so will double the size
# of all uncompressed scanners.
# 
# If on your system you have trouble building flex due to 8-bit character
# problems, remove the -8 from FLEX_FLAGS and the "#define FLEX_8_BIT_CHARS"
# from the beginning of flexdef.h.
#
# To bootstrap lex, cp initscan.c to scan.c and run make.

PROG=	lex
CFLAGS+=-I. -I${.CURDIR}
LFLAGS=	-is8
SRCS=	ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.c sym.c tblcmp.c \
	yylex.c
OBJS+=	scan.o
LDADD+=	-lgnumalloc
DPADD+=	/usr/lib/libgnumalloc.a

SUBDIR=	lib
CLEANFILES+=parse.c parse.h scan.c y.tab.h
MAN1 = lex.0 flexdoc.0

parse.h parse.c:
	${YACC} -d ${.IMPSRC}
	mv y.tab.c parse.c
	mv y.tab.h parse.h

beforeinstall:
	install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/lex.skel \
	    ${DESTDIR}/usr/share/misc

scan.o: parse.c

.include <bsd.prog.mk>