Annotation of src/usr.bin/lex/Makefile, Revision 1.9
1.9 ! jmc 1: # $OpenBSD: Makefile,v 1.8 2002/05/08 19:39:24 espie Exp $
1.1 deraadt 2: #
3: # By default, flex will be configured to generate 8-bit scanners only if the
4: # -8 flag is given. If you want it to always generate 8-bit scanners, add
5: # "-DDEFAULT_CSIZE=256" to CFLAGS. Note that doing so will double the size
6: # of all uncompressed scanners.
7: #
8: # If on your system you have trouble building flex due to 8-bit character
9: # problems, remove the -8 from FLEX_FLAGS and the "#define FLEX_8_BIT_CHARS"
10: # from the beginning of flexdef.h.
11: #
12: # To bootstrap lex, cp initscan.c to scan.c and run make.
13:
14: PROG= lex
15: CFLAGS+=-I. -I${.CURDIR}
16: SRCS= ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.c sym.c tblcmp.c \
17: yylex.c
18: OBJS+= scan.o skel.o
19: CLEANFILES+=parse.c parse.h scan.c skel.c y.tab.c y.tab.h
20: LDADD= -ll
21: DPADD= ${LIBL}
22:
23: MAN = flex.1
24:
25: LINKS= ${BINDIR}/lex ${BINDIR}/flex \
26: ${BINDIR}/lex ${BINDIR}/flex++
1.5 millert 27: MLINKS= flex.1 lex.1 flex.1 flex++.1
1.9 ! jmc 28:
! 29: # This just gets installed verbatim
! 30: .if make(install)
! 31: SUBDIR+= PSD.doc
! 32: .endif
1.1 deraadt 33:
34: parse.h parse.c: parse.y
1.7 espie 35: ${YACC} -d ${.ALLSRC}
1.1 deraadt 36: mv y.tab.c parse.c
37: mv y.tab.h parse.h
38:
39: skel.c: flex.skl mkskel.sh
40: sh ${.CURDIR}/mkskel.sh ${.CURDIR}/flex.skl > skel.c
41:
42: scan.c: scan.l
43: flex -t -p ${.CURDIR}/scan.l > scan.c
44:
45: scan.o: parse.c
46:
1.8 espie 47: includes:
1.4 millert 48: ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
1.3 downsj 49: ${.CURDIR}/FlexLexer.h ${DESTDIR}/usr/include/g++
1.1 deraadt 50:
51: .include <bsd.prog.mk>