summaryrefslogtreecommitdiffstats
path: root/Tools/android/flex-2.5.4a/MISC/OS2/Makefile.os2
blob: e984f6de2c8e18956bf6673125a51980982d6186 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# make file for "flex" tool, emx+gcc

release:
	$(MAKE) -f Makefile.os2 flex.exe \
	CC="gcc -Zomf -O" O=".obj" A=".lib" AR="emxomfar" \
	LDFLAGS="-s -Zcrtdll -Zstack 512"
debug:
	$(MAKE) -f Makefile.os2 flex.exe \
	CC="gcc -g" O=".o" A=".a" AR="ar"

CFLAGS = -DOS2 -DSHORT_FILE_NAMES

YACC = bison 
FLEX = flex
FLEX_FLAGS = -ist

.SUFFIXES: .c $O

.c$O:
	$(CC) $(CFLAGS) -c $<

FLEXLIB = fl$A
FLEXOBJS = ccl$O dfa$O ecs$O gen$O main$O misc$O nfa$O parse$O \
	scan$O skel$O sym$O tblcmp$O yylex$O
LIBOBJS = libmain$O libyywrap$O

flex.exe : $(FLEXOBJS) $(FLEXLIB)
	$(CC) $(LDFLAGS) -o $@ $(FLEXOBJS) $(FLEXLIB)

first_flex:
	cp initscan.c scan.c
	$(MAKE) $(MFLAGS) flex

$(FLEXLIB): $(LIBOBJS)
	$(AR) cru $(FLEXLIB) $(LIBOBJS)
	$(AR) s $(FLEXLIB)

parse.h parse.c: parse.y
	$(YACC) -d -o parse.c parse.y

scan.c : scan.l
	$(FLEX) $(FLEX_FLAGS) $(COMPRESSION) scan.l >scan.c

scan$O : scan.c parse.h flexdef.h

main$O : main.c flexdef.h
ccl$O : ccl.c flexdef.h
dfa$O : dfa.c flexdef.h
ecs$O : ecs.c flexdef.h
gen$O : gen.c flexdef.h
misc$O : misc.c flexdef.h
nfa$O : nfa.c flexdef.h
parse$O : parse.c flexdef.h
sym$O : sym.c flexdef.h
tblcmp$O : tblcmp.c flexdef.h
yylex$O : yylex.c flexdef.h

skel.c: flex.skl mkskel.sh
	$(SHELL) mkskel.sh flex.skl >skel.c

test : flex
	flex $(FLEX_FLAGS) $(COMPRESSION) scan.l | diff scan.c -

bigtest :
	rm -f scan.c ; $(MAKE) COMPRESSION="-C" test
	rm -f scan.c ; $(MAKE) COMPRESSION="-Ce" test
	rm -f scan.c ; $(MAKE) COMPRESSION="-Cm" test
	rm -f scan.c ; $(MAKE) COMPRESSION="-Cfe" test
	rm -f scan.c ; $(MAKE) COMPRESSION="-CFe" test
	rm -f scan.c ; $(MAKE) COMPRESSION="-Cf" test
	rm -f scan.c ; $(MAKE) COMPRESSION="-CF" test
	rm -f scan.c ; $(MAKE)