1 | #/* |
---|
2 | # * This was automatically generated by modgen |
---|
3 | # * version 0.2 |
---|
4 | # * module python |
---|
5 | # * Don't edit this file |
---|
6 | # */ |
---|
7 | # |
---|
8 | # |
---|
9 | CC = gcc |
---|
10 | CXX = gcc |
---|
11 | PYTHON_VERSION=2.3 |
---|
12 | SINGULAR_BASE=../.. |
---|
13 | SING_ARCH=ix86 |
---|
14 | CFLAGS = -DNDEBUG -DBUILD_MODULE -I. -I${SINGULAR_BASE}/kernel -I${SINGULAR_BASE}/Singular -I/home/michael/sing/${SING_ARCH}-Linux/include -lpython${PYTHON_VERSION} -I/usr/include/python${PYTHON_VERSION} -lboost_python |
---|
15 | DCFLAGS = -DBUILD_MODULE -I. -I/home/michael/sing/kernel -I${SINGULAR_BASE}/Singular -I/home/michael/sing/${SING_ARCH}-Linux/include -lpython${PYTHON_VERSION} -I/usr/include/python${PYTHON_VERSION} -lboost_python |
---|
16 | #LD = |
---|
17 | MKINSTALLDIRS=mkdir -p |
---|
18 | instdir = /home/michael/sing/ix86-Linux |
---|
19 | INSTALL = /home/michael/sing/Singular/install-sh -c |
---|
20 | INSTALL_PROGRAM = ${INSTALL} |
---|
21 | INSTALL_DATA = ${INSTALL} -m 644 |
---|
22 | SRCS = python.cc wrapper.cc |
---|
23 | OBJS = python.o wrapper.o |
---|
24 | DOBJS = python.og wrapper.o |
---|
25 | |
---|
26 | all: python_module.so python_module_g.so |
---|
27 | |
---|
28 | %.o: %.cc Makefile |
---|
29 | ${CC} ${CFLAGS} -c -fPIC -DPIC $< -o $*.o |
---|
30 | |
---|
31 | %.og: %.cc Makefile |
---|
32 | ${CC} ${DCFLAGS} -c -fPIC -DPIC $< -o $*.og |
---|
33 | |
---|
34 | python_module.so: ${OBJS} |
---|
35 | ${CC} ${CFLAGS} -shared -Wl,-soname -Wl,python_module.so.1 \ |
---|
36 | -o python_module.so.1.2.0 ${OBJS} |
---|
37 | rm -f python_module.so |
---|
38 | ln -s python_module.so.1.2.0 python_module.so |
---|
39 | |
---|
40 | python_module_g.so: ${DOBJS} |
---|
41 | ${CC} ${DCFLAGS} -shared -Wl,-soname -Wl,python_module_g.so.1 \ |
---|
42 | -o python_module_g.so.1.2.0 ${DOBJS} |
---|
43 | rm -f python_module_g.so |
---|
44 | ln -s python_module_g.so.1.2.0 python_module_g.so |
---|
45 | |
---|
46 | clean: |
---|
47 | rm -f *.o *.og *.lo *.so* *.sl *.la *~ core |
---|
48 | |
---|
49 | distclean: clean |
---|
50 | rm -f python.cc python.h Makefile *.bin *.pl |
---|
51 | |
---|
52 | install: |
---|
53 | ${MKINSTALLDIRS} ${instdir} |
---|
54 | ${MKINSTALLDIRS} ${instdir}/MOD |
---|
55 | ${INSTALL_PROGRAM} python_module.so ${instdir}/MOD/python_module.so |
---|
56 | ${INSTALL_PROGRAM} python_module.bin ${instdir}/MOD/python_module.bin |
---|
57 | |
---|
58 | |
---|