3 top_srcdir = @top_srcdir@
4 include ../../Makefile.common
6 all: SWF.$(SLEXT) gfx.$(SLEXT)
7 static: SWF$(A) gfx$(A)
8 exe: mypython$(E) swfpython$(E) testmem$(E)
10 primitives.$(O): primitives.c primitives.h
11 $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c primitives.c -o primitives.$(O)
12 tagmap.$(O): tagmap.c tagmap.h
13 $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c tagmap.c -o tagmap.$(O)
14 taglist.$(O): taglist.c taglist.h tagmap.h tag.h
15 $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c taglist.c -o taglist.$(O)
16 tag.$(O): tag.c tag.h tagmap.h
17 $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c tag.c -o tag.$(O)
18 tags.$(O): tags.c tags.h tagmap.h tag.h
19 $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c tags.c -o tags.$(O)
20 image.$(O): image.c image.h
21 $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c image.c -o image.$(O)
22 action.$(O): action.c action.h
23 $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c action.c -o action.$(O)
24 pyutils.$(O): pyutils.c pyutils.h
25 $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c pyutils.c -o pyutils.$(O)
27 $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c gfx.c -o gfx.$(O)
29 SWF.$(O): SWF.c pyutils.h primitives.h taglist.h
30 $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c SWF.c -o SWF.$(O)
32 SWF_OBJS=SWF.$(O) taglist.$(O) tag.$(O) image.$(O) tags.$(O) tagmap.$(O) action.$(O) primitives.$(O) pyutils.$(O)
33 SWF_DEPS=../librfxswf$(A) ../libbase$(A)
34 SWF.$(SLEXT): $(SWF_OBJS) $(SWF_DEPS) Makefile
35 $(L) -g $(SHARED) $(SWF_OBJS) $(SWF_DEPS) -o SWF.$(SLEXT) $(PYTHON_LIB) $(LIBS)
36 SWF$(A): $(SWF_OBJS) $(SWF_DEPS) Makefile
37 $(AR) cru SWF$(A) $(SWF_OBJS) $(SWF_DEPS)
40 GFX_DEPS=../libpdf$(A) ../libgfxswf$(A) ../librfxswf$(A) ../libgfx$(A) ../libocr$(A) ../libbase$(A)
41 gfx.$(SLEXT): gfx.$(O) $(GFX_DEPS) Makefile
42 $(L) -g $(SHARED) gfx.$(O) -o gfx.$(SLEXT) $(GFX_DEPS) $(PYTHON_LIB) $(LIBS) $(CXXLIBS)
43 gfx$(A): gfx.$(O) $(GFX_DEPS) Makefile
45 ar cru gfx$(A) gfx.$(O)
46 for file in $(GFX_DEPS);do rm -f tmp/*;cd tmp;ar x ../$$file || cp ../$$file .;cd ..;$(AR) q gfx$(A) tmp/*.$(O) || break;done
53 mypython$(E): mypython.c Makefile
54 $(L) -Wno-redundant-decls -g $(PYTHON_INCLUDES) mypython.c -o mypython$(E) $(PYTHON_LIB)
55 swfpython$(E): swfpython.c Makefile primitives.$(O) tagmap.$(O) taglist.$(O) tag.$(O) tags.$(O) action.$(O) pyutils.$(O) SWF.$(O)
56 $(L) -Wno-redundant-decls -g $(PYTHON_INCLUDES) swfpython.c -o swfpython$(E) $(PYTHON_LIB) ../librfxswf$(A) ../png.$(O) $(LIBS)
57 testmem$(E): testmem.c Makefile
58 $(L) $(PYTHON_INCLUDES) testmem.c -o testmem$(E) $(PYTHON_LIB) $(LIBS)
64 swfdump -p tmp/test.swf
67 swfdump -u -p tmp/combined.swf
72 swfdump -u -p tmp/test.swf
75 swfdump -u -p tmp/test.swf
79 rm -f *.o *.obj *.so mypython swfpython
81 .PHONY: test test1 test2 static all exe