1# 2# make file for "flex" tool 3# @(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/Makefile,v 2.9 4# 90/05/26 17:28:44 vern Exp $ (LBL) 5# 6# the first time around use "nmake f_flex" 7# 8# This makefile is specific for Microsoft's Visual C 2.0, & nmake 9# 10# - Stan Adermann <stana@leonardo.lmt.com> 11# 12 13 14SKELFLAGS = -DDEFAULT_SKELETON_FILE=\"c:/src/flex/flex.skl\" 15CFLAGS = -nologo -W2 -F 8000 -Ox -DUSG 16LDFLAGS = /nologo /BATCH /STACK:8000 17FLEX_FLAGS = -ist8 -Sflex.skl 18 19FLEX = .\flex.exe 20CC = cl 21YACC = c:\lib\byacc 22MAKE = nmake /nologo 23 24FLEXOBJS = \ 25 ccl.obj \ 26 dfa.obj \ 27 ecs.obj \ 28 gen.obj \ 29 main.obj \ 30 misc.obj \ 31 nfa.obj \ 32 parse.obj \ 33 scan.obj \ 34 skel.obj \ 35 sym.obj \ 36 tblcmp.obj \ 37 yylex.obj 38 39FLEX_C_SOURCES = \ 40 ccl.c \ 41 dfa.c \ 42 ecs.c \ 43 gen.c \ 44 main.c \ 45 misc.c \ 46 nfa.c \ 47 parse.c \ 48 scan.c \ 49 skel.c \ 50 sym.c \ 51 tblcmp.c \ 52 yylex.c 53 54all : flex.exe 55 56flex.exe : $(FLEXOBJS) 57 link $(LDFLAGS) $(FLEXOBJS) -out:$*.exe 58 59f_flex: 60 copy initscan.c scan.c 61 touch scan.c 62 @echo compiling first flex 63 $(MAKE) flex.exe 64 del scan.c 65 @echo using first flex to generate final version... 66 $(MAKE) flex.exe 67 68# 69# general inference rule 70# 71.c.obj: 72 $(CC) -c $(CFLAGS) $*.c 73 74parse.h parse.c : parse.y 75 $(YACC) -d parse.y 76 @move y_tab.c parse.c 77 @move y_tab.h parse.h 78 79scan.c : scan.l 80 $(FLEX) $(FLEX_FLAGS) $(COMPRESSION) scan.l >scan.c 81 82 83scan.obj : scan.c parse.h flexdef.h 84 85main.obj : main.c flexdef.h 86 $(CC) $(CFLAGS) -c $(SKELFLAGS) main.c 87 88ccl.obj : ccl.c flexdef.h 89dfa.obj : dfa.c flexdef.h 90ecs.obj : ecs.c flexdef.h 91gen.obj : gen.c flexdef.h 92misc.obj : misc.c flexdef.h 93nfa.obj : nfa.c flexdef.h 94parse.obj : parse.c flexdef.h 95sym.obj : sym.c flexdef.h 96tblcmp.obj : tblcmp.c flexdef.h 97yylex.obj : yylex.c flexdef.h 98skel.obj : skel.c flexdef.h 99 100 101clean : 102 del *.obj 103 del *.map 104