Debian Codegraph @

src/modules/app_python/Makefile

raw symbols SCIP
1 #
2 # WARNING: do not run this directly, it should be run by the main Makefile
3
4 include ../../Makefile.defs
5 auto_gen=
6 NAME=app_python.so
7
8 # If you have multiple Python versions installed make sure to modify the
9 # the following to point to the correct instance. Module has been tested
10 # to work with 2.6 and 2.5. Python 2.4 has been only confirmed to compile,
11 # but no testing has been done with that.
12 PYTHON=$(shell which python2)
13
14 # workaround for some OS (like MacOS) that don't have a python2 link
15 ifeq ($(PYTHON),)
16 PYTHON=$(shell which python2.7)
17 ifeq ($(PYTHON),)
18 PYTHON=python
19 endif
20 endif
21
22 PYTHON_VERSION=${shell ${PYTHON} -c "import distutils.sysconfig;print distutils.sysconfig.get_config_var('VERSION')"}
23 PYTHON_LIBDIR=${shell ${PYTHON} -c "import distutils.sysconfig;print distutils.sysconfig.get_config_var('LIBDIR')"}
24 PYTHON_LDFLAGS=${shell ${PYTHON} -c "import distutils.sysconfig;print distutils.sysconfig.get_config_var('LINKFORSHARED')"}
25 PYTHON_INCDIR=${shell ${PYTHON} -c "import distutils.sysconfig;print distutils.sysconfig.get_python_inc()"}
26
27 LIBS=-L${PYTHON_LIBDIR} ${PYTHON_LDFLAGS} -lpython${PYTHON_VERSION}
28
29 ifeq ($(OS), freebsd)
30 LIBS+=-pthread
31 endif
32
33 DEFS+=-I${PYTHON_INCDIR}
34
35 ifeq ($(CC_NAME), gcc)
36 DEFS+= -fno-strict-aliasing
37 endif
38
39 include ../../Makefile.modules
40