############################################################################# # Software Testing Automation Framework (STAF) # # (C) Copyright IBM Corp. 2001 # # # # This software is licensed under the Eclipse Public License (EPL) V1.0. # ############################################################################# ifeq ($(PYTHON_BUILD_V35),1) # On Windows, starting in Python 2.5, the only filename extension for Python # extension modules that is searched for is .pyd (.dll is no longer supported # by Python 2.5+) ifeq ($(OS_NAME),win32) LIB_PYSTAF = PYSTAF.pyd else ifeq ($(OS_NAME),macosx) LIB_PYSTAF = PYSTAF.so else LIB_PYSTAF = PYSTAF$(OS_SHARED_LIB_SUFFIX) endif endif SUBSYS_REL_PYTHON = lang/python/python35 stafif_python35_targets += \ $(REL)/lib/python35/$(LIB_PYSTAF) Targets += $(stafif_python35_targets) CleanupTargets += cleanup_stafif_python35 $(stafif_python35_targets): SUBSYS_REL := lang/python/python35 SUBSYS_REL := lang/python/python35 #===================================================================== # C/C++ Info Flags #===================================================================== $(stafif_python35_targets): LIBS = STAF $(PYTHON_V35_LIBS) $(stafif_python35_targets): LIBDIRS = STAF $(PYTHON_V35_LIBDIRS) $(stafif_python35_targets): OBJS = $(stafif_python35_objs) $(stafif_python35_targets): INCLUDEDIRS = $(PYTHON_V35_INCLUDEDIRS) stafif_python35_objs :=\ PYSTAF stafif_python35_objs := $(foreach obj,$(stafif_python35_objs),$(O)/$(SUBSYS_REL)/$(obj)$(OS_OE)) stafif_python35_dependents := $(stafif_python35_objs:$(OS_OE)=.d) $(stafif_python35_dependents): SUBSYS_REL = $(SUBSYS_REL_PYTHON) $(stafif_python35_dependents): INCLUDEDIRS = $(PYTHON_V35_INCLUDEDIRS) ifeq ($(OS_NAME),win32) stafif_python35_objs += $(SRC)/lang/python/python35/PYSTAF.def endif # Include dependencies ifneq ($(InCleanup), "1") include $(stafif_python35_dependents) endif # Include inference rules include $(InferenceRules) # Need to copy the PYSTAF.cpp file into the python35 directory $(SRC)/lang/python/python35/PYSTAF.cpp: $(SRC)/lang/python/PYSTAF.cpp $(MAKEFILE_NAME) @echo "*** Copying $(SRC)/lang/python/PYSTAF.cpp to $(SRC)/lang/python/python35/PYSTAF.cpp ***" $(COPY_FILE) # These two rules allow us to build the Python specific versions from the common # parent tree $(O)/$(SUBSYS_REL)/%.d: $(SRC)/$(SUBSYS_REL)/../%.cpp $(C_DEPEND_IT) $(O)/$(SUBSYS_REL)/%$(OS_OE): $(SRC)/$(SUBSYS_REL)/../%.cpp $(COMPILE_IT) # STAF Python targets $(REL)/lib/python35/$(LIB_PYSTAF): $(stafif_python35_objs) $(LIB_STAF_FP) $(MAKEFILE_NAME) $(SHARED_LIB_IT) cleanup_stafif_python35: -@$(DEL) $(O)/stafif/python/* $(OUT_ERR_TO_DEV_NULL) -@$(DEL) $(REL)/lib/python35/$(LIB_PYSTAF) $(OUT_ERR_TO_DEV_NULL) endif