new parameter -s textonly
[swftools.git] / lib / action / Makefile.in
1 top_builddir = ../..
2 srcdir = @srcdir@
3 top_srcdir = @top_srcdir@
4 include ../../Makefile.common
5
6 # in case we need to get more information out of bison
7 #BISONDEBUG = --debug
8 # In case we need to get more information out of flex
9 #FLEXDEBUG = -d
10
11 OBJECTS = compile.$(O) \
12           lex.swf4.$(O) lex.swf5.$(O) swf5compiler.tab.$(O) swf4compiler.tab.$(O) \
13           assembler.$(O) libming.$(O) actioncompiler.$(O)
14
15 COMPILER_FILES = action.h assembler.c assembler.h compile.c compile.h \
16                  listaction.c swf4compiler.flex swf4compiler.y swf5compiler.flex swf5compiler.y
17
18 GENERATED = lex.swf4.c lex.swf5.c swf5compiler.tab.c swf4compiler.tab.c
19
20 all: $(OBJECTS)
21 generated: $(GENERATED)
22
23 # === GENERATED FILES ===
24
25 swf5compiler.tab.c: swf5compiler.y
26         bison -p swf5 swf5compiler.y
27
28 swf5compiler.tab.h: swf5compiler.y 
29         bison --defines $(BISONDEBUG) -p swf5 swf5compiler.y
30
31 swf4compiler.tab.c: swf4compiler.y
32         bison -p swf4 swf4compiler.y
33
34 swf4compiler.tab.h: swf4compiler.y
35         bison --defines $(BISONDEBUG) -p swf4 swf4compiler.y
36
37 lex.swf4.c: swf4compiler.flex swf4compiler.tab.h
38         flex $(FLEXDEBUG) -i -Pswf4 swf4compiler.flex
39
40 lex.swf5.c: swf5compiler.flex swf5compiler.tab.h
41         flex $(FLEXDEBUG) -i -Pswf5 swf5compiler.flex
42
43 # === OBJECTS ===
44
45 lex.swf4.$(O): lex.swf4.c
46         $(C) lex.swf4.c -o lex.swf4.$(O)
47
48 lex.swf5.$(O): lex.swf5.c
49         $(C) lex.swf5.c -o lex.swf5.$(O)
50
51 compile.$(O): compile.c compile.h libming.h action.h blocks/error.h
52         $(C) compile.c -o compile.$(O)
53
54 listaction.$(O): listaction.c action.h compile.h
55         $(C) listaction.c -o listaction.$(O)
56
57 actioncompiler.$(O): actioncompiler.c compile.h action.h libming.h
58         $(C) actioncompiler.c -o actioncompiler.$(O)
59
60 assembler.$(O): assembler.c compile.h action.h assembler.h
61         $(C) assembler.c -o assembler.$(O)
62
63 swf4compiler.tab.$(O): swf4compiler.tab.c compile.h action.h assembler.h
64         $(C) swf4compiler.tab.c -o swf4compiler.tab.$(O)
65
66 swf5compiler.tab.$(O): swf5compiler.tab.c compile.h action.h assembler.h
67         $(C) swf5compiler.tab.c -o swf5compiler.tab.$(O)
68
69 libming.$(O): libming.c libming.h
70         $(C) libming.c -o libming.$(O)
71
72 # === TESTING ===
73
74 test.$(O): test.c actioncompiler.h
75         $(C) test.c -o test.$(O)
76
77 main.$(O): main.c
78         $(C) main.c -o main.$(O)
79
80 OBJS = compile.$(O) listaction.$(O) lex.swf4.$(O) lex.swf5.$(O) swf5compiler.tab.$(O) swf4compiler.tab.$(O) assembler.$(O) actioncompiler.$(O)
81 main: main.$(O) $(OBJS)
82         $(L) -o main main.$(O) $(OBJS) $(LIBS)
83
84 test: test.$(O) $(OBJECTS)
85         $(L) -o test $(OBJECTS) test.$(O) ../librfxswf$(A) -lm -ljpeg -lz -lt1 -lfreetype
86
87 # === CLEANING ===
88
89 clean:
90         rm -f $(OBJECTS) compiler compiler.exe core test main main.$(O) *~ gmon.out
91
92 distclean: clean
93         rm -f $(GENERATED) swf*compiler.tab.* lex*.c 
94
95 .PHONY: clean,distclean,all,generated