added call to ranlib
[swftools.git] / lib / python / Makefile.in
1 top_builddir = ../..
2 srcdir = @srcdir@
3 top_srcdir = @top_srcdir@
4 include ../../Makefile.common
5
6 all: SWF.$(SLEXT) SWF$(A) gfx.$(SLEXT) gfx$(A)
7 exe: mypython$(E) swfpython$(E) testmem$(E)
8
9 primitives.$(O): primitives.c primitives.h
10         $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c primitives.c -o primitives.$(O)
11 tagmap.$(O): tagmap.c tagmap.h
12         $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c tagmap.c -o tagmap.$(O)
13 taglist.$(O): taglist.c taglist.h tagmap.h tag.h
14         $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c taglist.c -o taglist.$(O)
15 tag.$(O): tag.c tag.h tagmap.h
16         $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c tag.c -o tag.$(O)
17 tags.$(O): tags.c tags.h tagmap.h tag.h
18         $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c tags.c -o tags.$(O)
19 image.$(O): image.c image.h
20         $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c image.c -o image.$(O)
21 action.$(O): action.c action.h
22         $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c action.c -o action.$(O)
23 pyutils.$(O): pyutils.c pyutils.h
24         $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c pyutils.c -o pyutils.$(O)
25 gfx.$(O): gfx.c 
26         $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c gfx.c -o gfx.$(O)
27
28 SWF.$(O): SWF.c pyutils.h primitives.h taglist.h
29         $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c SWF.c -o SWF.$(O)
30
31 SWF_OBJS=SWF.$(O) taglist.$(O) tag.$(O) image.$(O) tags.$(O) tagmap.$(O) action.$(O) primitives.$(O) pyutils.$(O) 
32 SWF_DEPS=../librfxswf$(A) ../libbase$(A) ../art/libart$(A) 
33 SWF.$(SLEXT): $(SWF_OBJS) $(SWF_DEPS) Makefile
34         $(L) -g $(SHARED) $(SWF_OBJS) $(SWF_DEPS) -o SWF.$(SLEXT) $(PYTHON_LIB) $(LIBS)
35 SWF$(A): $(SWF_OBJS) $(SWF_DEPS) Makefile
36         $(AR) cru SWF$(A) $(SWF_OBJS) $(SWF_DEPS)
37         $(RANLIB) SWF$(A)
38
39 GFX_DEPS=../libpdf$(A) ../devices/swf.$(O) ../librfxswf$(A) ../devices/arts.$(O) ../art/libart$(A) ../libgfx$(A) ../libbase$(A) 
40 gfx.$(SLEXT): gfx.$(O) $(GFX_DEPS) Makefile
41         $(L) -g $(SHARED) gfx.$(O) -o gfx.$(SLEXT) $(GFX_DEPS) $(PYTHON_LIB) $(LIBS) $(CXXLIBS)
42 gfx$(A): gfx.$(O) $(GFX_DEPS) Makefile
43         $(AR) cru gfx$(A) gfx.$(O) $(GFX_DEPS)
44         $(RANLIB) gfx$(A)
45
46 #TODO:
47 install:
48
49 # for debugging:
50 mypython$(E): mypython.c Makefile
51         $(L) -Wno-redundant-decls -g $(PYTHON_INCLUDES) mypython.c -o mypython$(E) $(PYTHON_LIB)
52 swfpython$(E): swfpython.c Makefile primitives.$(O) tagmap.$(O) taglist.$(O) tag.$(O) tags.$(O) action.$(O) pyutils.$(O) SWF.$(O)
53         $(L) -Wno-redundant-decls -g $(PYTHON_INCLUDES) swfpython.c -o swfpython$(E) $(PYTHON_LIB) ../librfxswf$(A) ../png.$(O) $(LIBS)
54 testmem$(E): testmem.c Makefile
55         $(L) $(PYTHON_INCLUDES) testmem.c -o testmem$(E) $(PYTHON_LIB) $(LIBS)
56
57 test: test6
58
59 test1: SWF.$(SLEXT)
60         ./test_create.py
61         swfdump -p tmp/test.swf
62 test2: SWF.$(SLEXT)
63         ./test_combine.py
64         swfdump -u -p tmp/combined.swf
65 test3: SWF.$(SLEXT)
66         ./test_simple.py
67 test4: SWF.$(SLEXT)
68         ./test_movie.py
69         swfdump -u -p tmp/test.swf
70 test5: SWF.$(SLEXT)
71         ./test_image.py
72         swfdump -u -p tmp/test.swf
73 test6: SWF.$(SLEXT)
74         ./test_sprite.py
75 clean:
76         rm -f *.o *.obj *.so mypython swfpython
77
78 .PHONY: test,test1,test2