# # Name: Makehead.linux # # Purpose: This file is used to customize operating system and installation # dependent features of the Mp makefiles. This version is # customized for Linux. # #PYTHON_INCLUDES = /usr/include/python2.4 PYTHON_INCLUDES = /usr/include/python2.3 #PYTHON_INCLUDES = /usr/include/python2.2 #PYTHON_INCLUDES = /usr/include/python2.1 #PYTHON_INCLUDES = /usr/include/python1.5 # # The following optional modules import external Python modules that may not # be available at all sites and for all operating systems. Comment out any # that will not build at your site. # # MpNum.py - Requires the 'numpy' module. OPTIONAL_MODULES += MpNum.pyc # #========================================================================= # # Generally, you should not have to modify anything after this point. # # -Wno-strict-prototypes is necessary on Red Hat Linux 7.1 since the # so called "gcc 2.96" there emits warnings about Python's import.h # include file which gcc 2.95.2 does not emit. #CFLAGS = -g -O -fPIC $(GCCFLAGS) $(INCLUDES) -I$(PYTHON_INCLUDES)\ # -DOS_LINUX $(EXTRA_FLAGS) -DDEBUG -Wno-strict-prototypes CFLAGS = -g -fPIC $(GCCFLAGS) $(INCLUDES) -I$(PYTHON_INCLUDES)\ -DOS_LINUX $(EXTRA_FLAGS) -DDEBUG -Wno-strict-prototypes # # DEBUGGING SUPPORT # # If you want to use the debugging version of Python called "python-dbg", # then you must define Py_DEBUG when you compile your code and also use # python-dbg to build the pyc files. # # Defining Py_DEBUG can be done by uncommenting the next statement below. # Using python-dbg to build the pyc files can be done either by temporarily # symbolically linking /usr/bin/python-dbg to ~/bin/python or by hand # compiling Mp.py and MpScan.py # #CFLAGS += -DPy_DEBUG # MAKEDEPEND = gcc -MM $(CFLAGS) mp_*.c > Makefile.depend MAKEDEPEND_CLEAN = rm Makefile.depend MP_MODULE_NAME = MpPrivate.so MP_MODULE_OBJS = $(MP_MODULE_SRCS:.c=.$(OBJ)) #--------------------------------------------------------------------- MP_MODULE_DELETE = rm $(MP_MODULE_NAME) $(MP_MODULE_NAME): $(MP_MODULE_OBJS) -$(MP_MODULE_DELETE) gcc -g -shared -o $(MP_MODULE_NAME) \ $(MP_MODULE_DIRS) $(MP_MODULE_OBJS) \ $(MP_LIBRARIES) -lc #--------------------------------------------------------------------- INCLUDES = -I$(LIBMXSRC) MP_MODULE_DIRS = -L$(LIBMXSRC) $(LIB_DIRS) MP_LIBRARIES = -lMx $(LIBRARIES) #--------------------------------------------------------------------- mp_install: -mkdir $(MX_INSTALL_DIR)/bin -mkdir $(MX_INSTALL_DIR)/lib -mkdir $(MX_INSTALL_DIR)/lib/mp install -m 644 *.py $(MX_INSTALL_DIR)/lib/mp install -m 644 *.pyc $(MX_INSTALL_DIR)/lib/mp install -m 644 *.so $(MX_INSTALL_DIR)/lib/mp install -m 755 ../mpscript/mpscript $(MX_INSTALL_DIR)/bin install -m 755 ../mpscript/mpshell $(MX_INSTALL_DIR)/bin