removed test and main from all
[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
22 # === GENERATED FILES ===
23
24 swf5compiler.tab.c: swf5compiler.y
25         bison -p swf5 swf5compiler.y
26
27 swf5compiler.tab.h: swf5compiler.y 
28         bison --defines $(BISONDEBUG) -p swf5 swf5compiler.y
29
30 swf4compiler.tab.c: swf4compiler.y
31         bison -p swf4 swf4compiler.y
32
33 swf4compiler.tab.h: swf4compiler.y
34         bison --defines $(BISONDEBUG) -p swf4 swf4compiler.y
35
36 lex.swf4.c: swf4compiler.flex swf4compiler.tab.h
37         flex $(FLEXDEBUG) -i -Pswf4 swf4compiler.flex
38
39 lex.swf5.c: swf5compiler.flex swf5compiler.tab.h
40         flex $(FLEXDEBUG) -i -Pswf5 swf5compiler.flex
41
42 # === OBJECTS ===
43
44 lex.swf4.o: lex.swf4.c
45         $(C) lex.swf4.c -o lex.swf4.o
46
47 lex.swf5.o: lex.swf5.c
48         $(C) lex.swf5.c -o lex.swf5.o
49
50 compile.o: compile.c compile.h libming.h action.h blocks/error.h
51         $(C) compile.c -o compile.o
52
53 listaction.o: listaction.c action.h compile.h
54         $(C) listaction.c -o listaction.o
55
56 actioncompiler.o: actioncompiler.c compile.h action.h libming.h
57         $(C) actioncompiler.c -o actioncompiler.o
58
59 assembler.o: assembler.c compile.h action.h assembler.h
60         $(C) assembler.c -o assembler.o
61
62 swf4compiler.tab.o: swf4compiler.tab.c compile.h action.h assembler.h
63         $(C) swf4compiler.tab.c -o swf4compiler.tab.o
64
65 swf5compiler.tab.o: swf5compiler.tab.c compile.h action.h assembler.h
66         $(C) swf5compiler.tab.c -o swf5compiler.tab.o
67
68 libming.o: libming.c libming.h
69         $(C) libming.c -o libming.o
70
71 # === TESTING ===
72
73 test.o: test.c actioncompiler.h
74         $(C) test.c -o test.o
75
76 main.o: main.c
77         $(C) main.c -o main.o
78
79 O = compile.o listaction.o lex.swf4.o lex.swf5.o swf5compiler.tab.o swf4compiler.tab.o assembler.o actioncompiler.o
80 main: main.o $(O)
81         $(L) -o main main.o $(O) $(LIBS)
82
83 test: test.o $(OBJECTS)
84         $(L) -o test $(OBJECTS) test.o ../librfxswf.a -lm -ljpeg -lz -lt1 -lfreetype
85
86 # === CLEANING ===
87
88 clean:
89         rm -f $(OBJECTS) compiler compiler.exe core test main main.o *~ gmon.out
90
91 distclean: clean
92         rm -f $(GENERATED) swf*compiler.tab.* lex*.c 
93