1 # make file for "flex" tool, emx+gcc 2 3 release: 4 $(MAKE) -f Makefile.os2 flex.exe \ 5 CC="gcc -Zomf -O" O=".obj" A=".lib" AR="emxomfar" \ 6 LDFLAGS="-s -Zcrtdll -Zstack 512" 7 debug: 8 $(MAKE) -f Makefile.os2 flex.exe \ 9 CC="gcc -g" O=".o" A=".a" AR="ar" 10 11 CFLAGS = -DOS2 -DSHORT_FILE_NAMES 12 13 YACC = bison 14 FLEX = flex 15 FLEX_FLAGS = -ist 16 17 .SUFFIXES: .c $O 18 19 .c$O: 20 $(CC) $(CFLAGS) -c $< 21 22 FLEXLIB = fl$A 23 FLEXOBJS = ccl$O dfa$O ecs$O gen$O main$O misc$O nfa$O parse$O \ 24 scan$O skel$O sym$O tblcmp$O yylex$O 25 LIBOBJS = libmain$O libyywrap$O 26 27 flex.exe : $(FLEXOBJS) $(FLEXLIB) 28 $(CC) $(LDFLAGS) -o $@ $(FLEXOBJS) $(FLEXLIB) 29 30 first_flex: 31 cp initscan.c scan.c 32 $(MAKE) $(MFLAGS) flex 33 34 $(FLEXLIB): $(LIBOBJS) 35 $(AR) cru $(FLEXLIB) $(LIBOBJS) 36 $(AR) s $(FLEXLIB) 37 38 parse.h parse.c: parse.y 39 $(YACC) -d -o parse.c parse.y 40 41 scan.c : scan.l 42 $(FLEX) $(FLEX_FLAGS) $(COMPRESSION) scan.l >scan.c 43 44 scan$O : scan.c parse.h flexdef.h 45 46 main$O : main.c flexdef.h 47 ccl$O : ccl.c flexdef.h 48 dfa$O : dfa.c flexdef.h 49 ecs$O : ecs.c flexdef.h 50 gen$O : gen.c flexdef.h 51 misc$O : misc.c flexdef.h 52 nfa$O : nfa.c flexdef.h 53 parse$O : parse.c flexdef.h 54 sym$O : sym.c flexdef.h 55 tblcmp$O : tblcmp.c flexdef.h 56 yylex$O : yylex.c flexdef.h 57 58 skel.c: flex.skl mkskel.sh 59 $(SHELL) mkskel.sh flex.skl >skel.c 60 61 test : flex 62 flex $(FLEX_FLAGS) $(COMPRESSION) scan.l | diff scan.c - 63 64 bigtest : 65 rm -f scan.c ; $(MAKE) COMPRESSION="-C" test 66 rm -f scan.c ; $(MAKE) COMPRESSION="-Ce" test 67 rm -f scan.c ; $(MAKE) COMPRESSION="-Cm" test 68 rm -f scan.c ; $(MAKE) COMPRESSION="-Cfe" test 69 rm -f scan.c ; $(MAKE) COMPRESSION="-CFe" test 70 rm -f scan.c ; $(MAKE) COMPRESSION="-Cf" test 71 rm -f scan.c ; $(MAKE) COMPRESSION="-CF" test 72 rm -f scan.c ; $(MAKE) 73