summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2019-10-04 16:47:20 +0200
committerJose <jose@zeroc.com>2019-10-04 16:47:20 +0200
commitfe5761b09acb69f56edc66caa7c9a148dcb73afc (patch)
treed2ec3a070ab8cb338e2f5aa8476db9daad078258 /python
parentSimplifications for Linux Yocto builds (diff)
downloadice-fe5761b09acb69f56edc66caa7c9a148dcb73afc.tar.bz2
ice-fe5761b09acb69f56edc66caa7c9a148dcb73afc.tar.xz
ice-fe5761b09acb69f56edc66caa7c9a148dcb73afc.zip
Allow to set python build flags without using python-config
Diffstat (limited to 'python')
-rw-r--r--python/config/Make.rules7
1 files changed, 4 insertions, 3 deletions
diff --git a/python/config/Make.rules b/python/config/Make.rules
index b28101189ee..5576b9c4df3 100644
--- a/python/config/Make.rules
+++ b/python/config/Make.rules
@@ -23,8 +23,9 @@ ifeq ($(os),Linux)
cppflags := $(filter-out -Wredundant-decls,$(cppflags))
endif
-python_cppflags := $(shell $(python-config) --cflags)
-python_ldflags := $(shell $(python-config) --ldflags)
+python_cppflags := $(or $(PYTHON_CPPFLAGS),$(shell $(python-config) --cflags))
+python_ldflags := $(or $(PYTHON_LDLFLAGS),$(shell $(python-config) --ldflags))
+
# Use .so as default value --extension-suffix is not supported by python-config in all platforms
python_extsuffix := $(or $(shell $(python-config) --extension-suffix 2> /dev/null),.so)
@@ -54,7 +55,7 @@ python_cppflags := $(filter-out -Wunreachable-code -Wstrict-prototypes,$
#
# Python installation directory
#
-install_pythondir = $(if $(usr_dir_install),$(shell $(PYTHON) $(lang_srcdir)/config/install_dir),$(prefix)/python)
+install_pythondir = $(or $(PYTHON_INSTALLDIR),$(if $(usr_dir_install),$(shell $(PYTHON) $(lang_srcdir)/config/install_dir),$(prefix)/python))
#
# Rules to build a python module. We just compute the name of the python module