Debian Codegraph @

src/modules/app_python3s/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_python3s.so
7
8 # If you have multiple Python versions installed make sure to modify the
9 # the following to point to the correct instance.
10 PYTHON3?=$(shell which python3)
11 ifeq ($(PYTHON3),)
12 PYTHON3=python
13 endif
14
15 PYTHON3CONFIG=$(shell which ${PYTHON3}-config)
16 ifeq ($(PYTHON3CONFIG),)
17 python_version_full := $(wordlist 2,4,$(subst ., ,$(shell ${PYTHON3} --version 2>&1)))
18 python_version_major := $(word 1,${python_version_full})
19 python_version_minor := $(word 2,${python_version_full})
20 PYTHON3 = python${python_version_major}.${python_version_minor}
21 PYTHON3CONFIG=$(shell which ${PYTHON3}-config)
22 ifeq ($(PYTHON3CONFIG),)
23 PYTHON3CONFIG=${PYTHON3}-config
24 endif
25 endif
26
27 LIBS=${shell \
28 tmp_py3_libs=$$(${PYTHON3CONFIG} --ldflags --embed 2>/dev/null) || \
29 tmp_py3_libs=$$(${PYTHON3CONFIG} --ldflags); \
30 echo $$tmp_py3_libs}
31
32 ifeq ($(OS), freebsd)
33 LIBS+=-pthread
34 endif
35
36 DEFS+=${shell ${PYTHON3CONFIG} --includes}
37
38 include ../../Makefile.modules
39