merged final cvs changes to git
[swftools.git] / lib / as3 / Makefile
1 all: parser swfdump mklib tests
2 tests: testwrite testrewrite testpaths testreadwrite 
3
4 D=-g -pg
5
6 #compiled by ../Makefile (into librfxswf.a)
7 #
8 #abc.o: abc.c abc.h ../q.h pool.h
9 #       gcc $(D) -c abc.c -o abc.o
10 #
11 #pool.o: pool.c pool.h
12 #       gcc $(D) -c pool.c -o pool.o
13 #
14 #files.o: files.h files.c
15 #       gcc $(D) -c files.c -o files.o
16 #
17 #registry.o: registry.h registry.c
18 #       gcc $(D) -c registry.c -o registry.o
19 #
20 #tokenizer.yy.o: tokenizer.yy.c tokenizer.h parser.tab.h
21 #       gcc $(D) -c tokenizer.yy.c -o tokenizer.yy.o
22 #
23 #parser.tab.o: parser.tab.c parser.tab.h parser.h
24 #       gcc $(D) -c parser.tab.c -o parser.tab.o
25
26
27 tokenizer.yy.c: tokenizer.lex tokenizer.h
28         flex -Pavm2_ -8 -B -otokenizer.yy.c tokenizer.lex
29
30 parser.tab.h parser.tab.c: parser.y parser.h
31         bison -v --defines -pavm2_ parser.y -o parser.tab.c
32
33 main.o: main.c parser.tab.h parser.h
34         gcc $(D) -c main.c -o main.o
35
36 mklib.o: mklib.c parser.tab.h parser.h
37         gcc $(D) -c mklib.c -o mklib.o
38
39 parser: main.o tokenizer.yy.o ../librfxswf.a ../libbase.a parser.tab.h 
40         gcc $(D) main.o ../librfxswf.a ../libbase.a -o parser -lz
41
42 mklib: mklib.o ../librfxswf.a ../libbase.a
43         gcc $(D) mklib.o ../librfxswf.a ../libbase.a -o mklib -lz
44
45 ../q.o: ../q.c ../q.h ../mem.h
46         cd ..; make q.o; cd -
47
48 ../librfxswf.a: ../rfxswf.h ../rfxswf.c abc.c abc.h pool.c pool.h files.c files.h code.c code.h registry.c registry.h opcodes.c opcodes.h builtin.c builtin.h compiler.c compiler.h parser.tab.h parser.tab.c tokenizer.yy.c
49         cd ..; make librfxswf.a
50
51 ../libbase.a: ../q.c ../q.h ../mem.c ../mem.h
52         cd ..; make libbase.a
53
54 swfdump: ../librfxswf.a ../../src/swfdump.c ../libbase.a abc.c abc.h pool.c pool.h code.c opcodes.c ../q.c ../q.h
55         gcc -g ../../src/swfdump.c ../librfxswf.a ../libbase.a -ljpeg -lz -lfreetype -o swfdump
56
57 testreadwrite: testreadwrite.c ../librfxswf.a ../libbase.a
58         gcc $(D) -DMAIN -o testreadwrite testreadwrite.c ../librfxswf.a ../libbase.a -lz -ljpeg
59
60 testrewrite: testrewrite.c ../librfxswf.a ../libbase.a
61         gcc $(D) -DMAIN -o testrewrite testrewrite.c ../librfxswf.a ../libbase.a -lz -ljpeg
62
63 testwrite: testwrite.c ../librfxswf.a ../libbase.a
64         gcc $(D) -DMAIN -o testwrite testwrite.c ../librfxswf.a ../libbase.a -lz -ljpeg
65
66 testpaths: testpaths.c ../librfxswf.a ../libbase.a
67         gcc $(D) -DMAIN -o testpaths testpaths.c ../librfxswf.a ../libbase.a -lz -ljpeg
68
69 clean:
70         rm -f *.o *.yy.c *.tab.c *.tab.h testreadwrite swfdump testpaths testwrite ../librfxswf.a
71
72 .PHONY: tests