847132aad95bf8314f3777c90664ac626d225c21
[swftools.git] / lib / python / Makefile
1 all: mypython SWF.so
2
3 LIB=-L/usr/lib/python2.2/config/ -lpython2.2
4
5 primitives.o: primitives.c primitives.h
6         gcc -g -O2 -Wall -Wno-unused -fPIC -I/usr/include/python2.2 -c primitives.c -o primitives.o
7 taglist.o: taglist.c taglist.h
8         gcc -g -O2 -Wall -Wno-unused -fPIC -I/usr/include/python2.2 -c taglist.c -o taglist.o
9 tag.o: tag.c tag.h
10         gcc -g -O2 -Wall -Wno-unused -fPIC -I/usr/include/python2.2 -c tag.c -o tag.o
11 action.o: action.c action.h
12         gcc -g -O2 -Wall -Wno-unused -fPIC -I/usr/include/python2.2 -c action.c -o action.o
13 pyutils.o: pyutils.c pyutils.h
14         gcc -g -O2 -Wall -Wno-unused -fPIC -I/usr/include/python2.2 -c pyutils.c -o pyutils.o
15
16 SWF.o: SWF.c pyutils.h primitives.h
17         gcc -g -O2 -Wall -Wno-unused -fPIC -I/usr/include/python2.2 -c SWF.c -o SWF.o
18
19 SWF.so: SWF.o taglist.o tag.o action.o primitives.o pyutils.o ../librfxswf.a
20         gcc -shared SWF.o taglist.o tag.o action.o primitives.o pyutils.o  -o SWF.so $(LIB) ../librfxswf.a -ljpeg -lz -lt1 -lfreetype
21         cp SWF.so test
22
23 mypython: mypython.c
24         gcc -g -I/usr/include/python2.2 mypython.c -o mypython $(LIB) -ldl -lm -lpthread -lutil
25
26 test: SWF.so
27         cd test;./test_create.py
28         #python fonts.py
29 clean:
30         rm *.o *.so mypython
31
32 .PHONY: test