104ce0d8991e532c0c0e4bce1a450e24ae0c35a8
[swftools.git] / lib / python / Makefile.in
1 top_builddir = ../..
2 srcdir = @srcdir@
3 top_srcdir = @top_srcdir@
4 include ../../Makefile.common
5
6 #LIB=-L/usr/lib/python2.2/config/ -lpython2.2
7 PYTHON_LIB=-lpython2.3 /usr/lib/python2.3/site-packages/PIL/_imaging.so
8 PYTHON_INCLUDES=-I/usr/include/python2.3
9
10 all: mypython swfpython SWF.so testmem
11
12 primitives.o: primitives.c primitives.h
13         $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c primitives.c -o primitives.o
14 tagmap.o: tagmap.c tagmap.h
15         $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c tagmap.c -o tagmap.o
16 taglist.o: taglist.c taglist.h tagmap.h tag.h
17         $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c taglist.c -o taglist.o
18 tag.o: tag.c tag.h tagmap.h
19         $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c tag.c -o tag.o
20 tags.o: tags.c tags.h tagmap.h tag.h
21         $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c tags.c -o tags.o
22 image.o: image.c image.h
23         $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c image.c -o image.o
24 action.o: action.c action.h
25         $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c action.c -o action.o
26 pyutils.o: pyutils.c pyutils.h
27         $(C) -Wall -Wno-unused -fPIC $(PYTHON_INCLUDES) -c pyutils.c -o pyutils.o
28
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
31
32 SWF.so: SWF.o taglist.o tag.o image.o tags.o tagmap.o action.o primitives.o pyutils.o ../librfxswf.a Makefile
33         $(L) -g -shared SWF.o tagmap.o taglist.o tag.o image.o tags.o action.o primitives.o pyutils.o  -o SWF.so ../librfxswf.a $(PYTHON_LIB) -ljpeg -lz -lt1 -lfreetype 
34
35 mypython: mypython.c Makefile
36         $(L) -Wno-redundant-decls -g $(PYTHON_INCLUDES) mypython.c -o mypython $(PYTHON_LIB) -ldl -lm -lpthread -lutil
37
38 swfpython: swfpython.c Makefile primitives.o tagmap.o taglist.o tag.o tags.o action.o pyutils.o SWF.o
39         $(L) -Wno-redundant-decls -g $(PYTHON_INCLUDES) swfpython.c -o swfpython $(PYTHON_LIB) -ldl -lm -lpthread -lutil ../librfxswf.a $(PYTHON_LIB) -ljpeg -lz -lt1 -lfreetype 
40
41 testmem: testmem.c Makefile
42         $(L) $(PYTHON_INCLUDES) testmem.c -o testmem $(PYTHON_LIB) -ldl -lm -lpthread -lutil
43
44 test: test5
45
46 test1: SWF.so
47         ./test_create.py
48         swfdump -p tmp/test.swf
49 test2: SWF.so
50         ./test_combine.py
51         swfdump -u -p tmp/combined.swf
52 test3: SWF.so
53         ./test_simple.py
54 test4: SWF.so
55         ./test_movie.py
56 test5: SWF.so
57         ./test_image.py
58 clean:
59         rm -f *.o *.so mypython swfpython
60
61 .PHONY: test,test1,test2