Makefile updates from p4p

This commit is contained in:
Michael Davidsaver
2018-11-02 16:47:57 -07:00
parent 62b4a046bc
commit 1d8c6ab7b5
4 changed files with 50 additions and 26 deletions

View File

@ -2,24 +2,22 @@ ifneq ($(T_A),)
PYMODULE ?= YES
ifeq ($(PY_VER),)
$(error Must set PY_VER to select a python version)
ifeq ($(PYTHON),)
$(error Must set PYTHON to select a python version)
endif
-include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_PY$(PY_VER).$(EPICS_HOST_ARCH).Common
-include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_PY$(PY_VER).Common.$(T_A)
-include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_PY$(PY_VER).$(EPICS_HOST_ARCH).$(T_A)
-include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_PY.$(EPICS_HOST_ARCH).Common
-include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_PY.Common.$(T_A)
-include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_PY.$(EPICS_HOST_ARCH).$(T_A)
-include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_SITE_PY$(PY_VER).$(EPICS_HOST_ARCH).Common
-include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_SITE_PY$(PY_VER).Common.$(T_A)
-include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_SITE_PY$(PY_VER).$(EPICS_HOST_ARCH).$(T_A)
-include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_SITE_PY.$(EPICS_HOST_ARCH).Common
-include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_SITE_PY.Common.$(T_A)
-include $(dir $(lastword $(MAKEFILE_LIST)))/os/CONFIG_SITE_PY.$(EPICS_HOST_ARCH).$(T_A)
ifneq ($(PY_OK),YES)
$(error No usable configuration for python$(PY_VER))
$(error No usable configuration for $(PYTHON))
endif
PYTHON ?= python$(PY_VER)
SHRLIB_DEPLIB_DIRS += $(PY_LIBDIRS)
PROD_DEPLIB_DIRS += $(PY_LIBDIRS)
@ -27,18 +25,29 @@ INCLUDES += $(PY_INCDIRS:%=-I%)
ifeq ($(HAVE_NUMPY),YES)
TARGET_CPPFLAGS += -DHAVE_NUMPY
else
$(error numpy required)
endif
LIB_SYS_LIBS += python$(PY_LD_VER)
PROD_SYS_LIBS += python$(PY_LD_VER)
#LIB_SYS_LIBS += python$(PY_LD_VER)
#PROD_SYS_LIBS += python$(PY_LD_VER)
PY_INSTALL_DIR = $(INSTALL_LOCATION)/python$(PY_VER)/$(T_A)
PY_INSTALL_DIR = $(INSTALL_LOCATION)/python$(PY_LD_VER)/$(T_A)
ifneq ($(PYMODULE),NO)
# Python loadables have no prefix (eg 'pymod.so')
# and are installed alongsize .py files
LOADABLE_SHRLIB_PREFIX =
ifneq ($(PYMODULE),NO)
INSTALL_SHRLIB = $(PY_INSTALL_DIR)
ifeq ($(OS_CLASS),Darwin)
# need -undefined dynamic_lookup
LOADABLE_SHRLIB_LDFLAGS = -bundle -flat_namespace -undefined dynamic_lookup
LOADABLE_SHRLIB_SUFFIX = .so
endif
endif
endif

View File

@ -37,7 +37,7 @@ PY_VER=2.7
# Module will be build against this version of the
# Python interpreter
#PYTHON = python$(PY_VER)
PYTHON ?= python$(PY_VER)
-include $(TOP)/configure/CONFIG_SITE.local
-include $(TOP)/../CONFIG_SITE.local

View File

@ -2,20 +2,19 @@ TOP=..
include $(TOP)/configure/CONFIG
ifeq ($(PY_VER),)
$(error Must set PY_VER to select a python version)
endif
PYTHON ?= python$(PY_VER)
TARGETS = $(CONFIG_TARGETS)
ifdef T_A
CONFIGS = CONFIG_PY RULES_PY os/CONFIG_PY$(PY_VER).Common.$(T_A)
CONFIGS = CONFIG_PY RULES_PY os/CONFIG_PY.Common.$(T_A)
endif
CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS)))
include $(TOP)/configure/RULES
os/CONFIG_PY$(PY_VER).Common.$(T_A): $(TOP)/makehelper.py
os/CONFIG_PY.Common.$(T_A): $(TOP)/makehelper.py
[ -d $(dir $@) ] || $(MKDIR) $(dir $@)
$(PYTHON) $< $@