# # arch_spec_Python.mk # # Architecture/site specific makefile fragment # for inclusion by packages that use Python. # # PYTHON_LIB and PYTHON_INC are environment variables # containing (or optionally loaded with) the # location of the Python files on the local machine. # # These are then appended to CPPFLAGS and LDFLAGS as # overrides. Note that the -lpython is also appended. # # Bob Jacobsen, Dec 94 # R. Harris Nov 97: CDF Python library organization if EXPERIMENT contains CDF # s. snyder Nov 98: Fix settings of PYTHON_INC. # AMJonckheere May99: switch D0 to python1.5 # # standard definitions # commented out because in python 1.4 there are many libraries # to link to. ifndef PYTHON_DIR PYTHON_INC = -I/usr/local/include PYTHON_LIB = /usr/local/lib else ifeq (D0,$(findstring D0,$(EXPERIMENT))) # D0's python installation PYTHON_INC = -I$(PYTHON_DIR)/include -I$(PYTHON_DIR)/include/python1.5 PYTHON_LIB = $(PYTHON_DIR)/lib/python1.5/config else PYTHON_INC = -I$(PYTHON_DIR)/include/python1.4 -I$(PYTHON_DIR) PYTHON_LIB = $(PYTHON_DIR)/lib endif endif #AMJ: FNAL 9/1/98 - use standard unless overridden below # gets rid of 10 deep if/else/endif section ifneq (D0,$(findstring D0,$(EXPERIMENT))) ifneq (,$(findstring Linux,$(BFARCH))) PYTHON_INC = -I/usr/include PYTHON_LIB = /usr/lib endif endif ifneq (,$(findstring CYGWIN32,$(BFARCH))) PYTHON_INC = -I/usr/include PYTHON_LIB = /usr/lib endif # necessary to check if PYTHON_DIR exists, because /usr/local/include doesn't # always exist, and lPython might not exist either. R. Harris. ifdef PYTHON_DIR override CPPFLAGS += $(PYTHON_INC) ifneq (,$(findstring CDF,$(EXPERIMENT))) # CDF has a simpler organization for python 1.4 than the "standard" one override LDFLAGS += -L$(PYTHON_LIB) else ifneq (,$(findstring D0,$(EXPERIMENT))) # D0's python installation override LDFLAGS += -L$(PYTHON_LIB) else # Here is the "standard" one override LDFLAGS += -L$(PYTHON_DIR)/Modules -L$(PYTHON_DIR)/Parser override LDFLAGS += -L$(PYTHON_DIR)/Objects -L$(PYTHON_DIR)/Python endif endif ifeq (D0,$(findstring D0,$(EXPERIMENT))) override LOADLIBES += -lpython1.5 else override LOADLIBES += -lModules -lPython -lModules -lPython -lObjects -lParser -lgl endif endif ifneq (,$(findstring OSF,$(BFARCH))) override LOADLIBES += -lm endif ifneq (,$(findstring SunOS5,$(BFARCH))) override LOADLIBES += -lm endif ifneq (,$(findstring HP-UX,$(BFARCH))) override LOADLIBES += -lm endif