PyXPCOM_OLD: Makefile.ksh

File Makefile.ksh, 1.2 KB (added by anonymous, 10 years ago)
Line 
1
2
3PY_VERSION=2.3
4PY_HEADERS=/usr/include/python${PY_VERSION}
5MOZ_SOFTWARE=/usr/lib/mozilla
6
7all: src/loader/libpyloader.so test/test_component/py_test_component.xpt
8
9src/loader/libpyloader.so: src/loader/pyloader.cpp
10        g++ -shared -fno-rtti \
11        -DPYTHON_SO=\"libpython${PY_VERSION}.so\" \
12        -I${MOZ_SOFTWARE}/include/xpcom \
13        -I${MOZ_SOFTWARE}/include \
14        -I${MOZ_SOFTWARE}/include/string \
15        -I${MOZ_SOFTWARE}/include/nspr \
16        -I${PY_HEADERS} \
17        -L${MOZ_SOFTWARE} \
18        -lpython${PY_VERSION} -lxpcom \
19        -o src/loader/libpyloader.so src/loader/pyloader.cpp
20
21test/test_component/py_test_component.xpt: test/test_component/py_test_component.idl
22        xpidl -I${MOZ_SOFTWARE}/include/idl -m typelib \
23        -e test/test_component/py_test_component.xpt \
24        test/test_component/py_test_component.idl
25
26install: src/loader/libpyloader.so test/test_component/py_test_component.xpt
27        install src/loader/libpyloader.so ${MOZ_SOFTWARE}/components
28        install -m 0644 test/test_component/py_test_component.py ${MOZ_SOFTWARE}/components
29        install -m 0644 test/test_component/py_test_component.xpt ${MOZ_SOFTWARE}/components
30        ${MOZ_SOFTWARE}/regxpcom
31
32clean:
33        rm -f src/loader/libpyloader.so test/test_component/py_test_component.xpt
34