fixed another malloc(0)
[swftools.git] / lib / python / Makefile
1 all: mypython SWF.so
2
3 LIB=-L/usr/lib/python2.2/config/ -lpython2.2
4 I=-I/usr/include/python2.2
5
6 C=gcc-3.3
7
8 primitives.o: primitives.c primitives.h
9         $(C) -g -O2 -Wall -Wno-unused -fPIC $(I) -c primitives.c -o primitives.o
10 tagmap.o: tagmap.c tagmap.h
11         $(C) -g -O2 -Wall -Wno-unused -fPIC $(I) -c tagmap.c -o tagmap.o
12 taglist.o: taglist.c taglist.h tagmap.h tag.h
13         $(C) -g -O2 -Wall -Wno-unused -fPIC $(I) -c taglist.c -o taglist.o
14 tag.o: tag.c tag.h tagmap.h
15         $(C) -g -O2 -Wall -Wno-unused -fPIC $(I) -c tag.c -o tag.o
16 action.o: action.c action.h
17         $(C) -g -O2 -Wall -Wno-unused -fPIC $(I) -c action.c -o action.o
18 pyutils.o: pyutils.c pyutils.h
19         $(C) -g -O2 -Wall -Wno-unused -fPIC $(I) -c pyutils.c -o pyutils.o
20
21 SWF.o: SWF.c pyutils.h primitives.h taglist.h
22         $(C) -g -O2 -Wall -Wno-unused -fPIC $(I) -c SWF.c -o SWF.o
23
24 SWF.so: SWF.o taglist.o tag.o tagmap.o action.o primitives.o pyutils.o ../librfxswf.a
25         $(C) -shared SWF.o tagmap.o taglist.o tag.o action.o primitives.o pyutils.o  -o SWF.so ../librfxswf.a -ljpeg -lz -lt1 -lfreetype
26
27 mypython: mypython.c
28         $(C) -g -I/usr/include/python2.2 mypython.c -o mypython $(LIB) -ldl -lm -lpthread -lutil
29
30 test: test1
31
32 test1: SWF.so
33         ./test_create.py
34         swfdump -p tmp/test.swf
35
36 test2: SWF.so
37         ./test_combine.py
38         swfdump -u -p tmp/combined.swf
39 clean:
40         rm *.o *.so mypython
41
42 .PHONY: test,test1,test2