1 include ../../Makefile.common
3 all: parser swfdump mklib
4 tests: testwrite testrewrite testpaths testreadwrite
10 MODULES = abc.o opcodes.o code.o pool.o scripts.o expr.o common.o initcode.o
11 SOURCES = 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 scripts.c import.c import.h expr.c expr.h common.c common.h initcode.c initcode.h assets.c assets.h
13 tokenizer.yy.c: tokenizer.lex tokenizer.h
14 flex -Pas3_ -8 -B -otokenizer.yy.c tokenizer.lex
16 ifeq "$(BISONDEBUG)" "yes"
18 BISONDEBUGDEFINE=-DBISONDEBUG
20 parser.tab.h parser.tab.c: parser.y parser.h skeleton.m4 Makefile
21 bison $(BISONDEBUGFLAGS) -S ./skeleton.m4 -v --defines -pa3_ parser.y -o parser.tab.c
23 main.o: main.c parser.tab.h parser.h
24 $(C) $(BISONDEBUGDEFINE) main.c -o main.o
26 mklib.o: mklib.c parser.tab.h parser.h
27 $(C) mklib.c -o mklib.o
29 parser: main.o tokenizer.yy.c ../librfxswf.a ../libbase.a parser.tab.h
30 $(L) main.o ../librfxswf.a ../libbase.a -o parser -lz -lzzip
32 rfxswf_modules=../drawer.o ../rfxswf.o ../modules/*.o ../lame/*.o ../action/*.o ../MD5.o $(MODULES)
33 mklib: mklib.o $(rfxswf_modules) import.o registry.o tokenizer.yy.o parser.tab.o files.o compiler.o assets.o ../libbase.a
34 $(L) mklib.o $(rfxswf_modules) import.o registry.o tokenizer.yy.o parser.tab.o files.o compiler.o assets.o ../libbase.a -o mklib $(LIBS)
36 ../q.o: ../q.c ../q.h ../mem.h
39 ../librfxswf.a: ../rfxswf.h ../rfxswf.c $(SOURCES)
40 cd ..; make librfxswf.a
42 ../libbase.a: ../q.c ../q.h ../mem.c ../mem.h
45 swfdump: ../librfxswf.a ../../src/swfdump.c ../libbase.a $(SOURCES) ../q.c ../q.h
46 $(L) -g ../../src/swfdump.c ../librfxswf.a ../libbase.a -o swfdump $(LIBS)
48 pdf2swf: ../librfxswf.a ../../src/pdf2swf.c ../libpdf.a ../libbase.a
49 $(LL) -g ../../src/pdf2swf.c ../libgfxswf.a ../libpdf.a ../libgfx.a ../librfxswf.a ../libbase.a -o pdf2swf $(LIBS)
51 testreadwrite: testreadwrite.c ../librfxswf.a ../libbase.a
52 $(L) -DMAIN -o testreadwrite testreadwrite.c ../librfxswf.a ../libbase.a $(LIBS)
54 testrewrite: testrewrite.c ../librfxswf.a ../libbase.a
55 $(L) -DMAIN -o testrewrite testrewrite.c ../librfxswf.a ../libbase.a $(LIBS)
57 testwrite: testwrite.c ../librfxswf.a ../libbase.a
58 $(L) -DMAIN -o testwrite testwrite.c ../librfxswf.a ../libbase.a $(LIBS)
60 testpaths: testpaths.c ../librfxswf.a ../libbase.a
61 $(L) -DMAIN -o testpaths testpaths.c ../librfxswf.a ../libbase.a $(LIBS)
64 rm -f *.o *.yy.c *.tab.c *.tab.h testreadwrite swfdump testpaths testwrite ../librfxswf.a