# # Name: Makehead.win32 # # Purpose: This file is used to customize operating system and installation # dependent features of the Mp makefiles. This version is # customized for Microsoft Win32 (Windows 95/98/NT 4). # # Warning: If you are building using the Activestate version of Python, you # must not do the build of MP from a Cygwin bash shell, since the # Activestate version of Python does not run correctly under the # Cygwin bash shell. # # Furthermore, if you do the build using the Cygwin make from a # DOS-style Command Window, be sure that the Activestate version # of Python appears first in your path. If the Cygwin version of # Python is first in your path, any attempt to 'import MpPrivate' # will fail with the uninformative error: # # ImportError: Permission denied # # This is Cygwin Python's obscure way of telling you that it does # not know how to import a DLL built with Microsoft Visual C++ and # the Activestate version of Python. # PYTHON_INCLUDES = c:\\Python26\\include PYTHON_LIBRARY = c:\\Python26\\libs\\python26.lib #PYTHON_INCLUDES = c:\\Python24\\include #PYTHON_LIBRARY = c:\\Python24\\libs\\python24.lib #PYTHON_INCLUDES = c:\\Python23\\include #PYTHON_LIBRARY = c:\\Python23\\libs\\python23.lib EXTRA_CFLAGS = -Ic:\\progra~1\\micros~4\\include # # 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. # PYTHON = python CC = cl CFLAGS = -nologo $(INCLUDES) -I$(PYTHON_INCLUDES) -DHAVE_SNPRINTF \ -MD -Zi -WX -DOS_WIN32 $(EXTRA_FLAGS) -DDEBUG CFLAGS += $(EXTRA_CFLAGS) MAKEDEPEND = ( rm Makefile.depend ; touch Makefile.depend ) MAKEDEPEND_CLEAN = rm Makefile.depend #--------------------------------------------------------------------- LIBMP_OBJS = $(LIBMP_SRCS:.c=.$(OBJ)) LIBMP_NAME = libMp.dll LIBMP_DELETE = rm $(LIBMP_NAME) #--- $(LIBMP_NAME): $(LIBMP_OBJS) -$(LIBMP_DELETE) link /dll /debug /out:$(LIBMP_NAME) /nodefaultlib:libc \ $(LIBMP_OBJS) $(PYTHON_LIBRARY) $(LIBMX) $(WIN32_LIBS) #--------------------------------------------------------------------- MP_MODULE_NAME = MpPrivate.dll MP_MODULE_OBJS = $(MP_MODULE_SRCS:.c=.$(OBJ)) #--------------------------------------------------------------------- MP_MODULE_DELETE = rm $(MP_MODULE_NAME) $(MP_MODULE_NAME): $(MP_MODULE_OBJS) -$(MP_MODULE_DELETE) link /dll /debug /out:$(MP_MODULE_NAME) /nodefaultlib:libc \ $(MP_MODULE_OBJS) libMp.lib $(PYTHON_LIBRARY) \ $(LIBMX) $(WIN32_LIBS) # For VC2005 or later, embed the manifest in the DLL. if test -f $(MP_MODULE_NAME).manifest; then \ $(MSMANIFEST_TOOL) -nologo \ -outputresource:$(MP_MODULE_NAME)\;2 \ -manifest $(MP_MODULE_NAME).manifest $(EXTRA_MANIFESTS) ; \ rm -f $(MP_MODULE_NAME).manifest; \ fi #--------------------------------------------------------------------- INCLUDES = -I$(LIBMXSRC) MP_LIBRARIES = $(LIBMXSRC)/libMx.a #--------------------------------------------------------------------- mp_install: -mkdir $(MX_INSTALL_DIR)/bin -mkdir $(MX_INSTALL_DIR)/lib -mkdir $(MX_INSTALL_DIR)/lib/mp cp *.py $(MX_INSTALL_DIR)/lib/mp cp *.pyc $(MX_INSTALL_DIR)/lib/mp cp *.lib $(MX_INSTALL_DIR)/lib/mp cp *.dll $(MX_INSTALL_DIR)/lib/mp cp ../mpscript/mpscript $(MX_INSTALL_DIR)/bin/mpscript.py cp ../mpscript/mpscript $(MX_INSTALL_DIR)/bin/mpscript.pyw cp ../mpscript/mpshell $(MX_INSTALL_DIR)/bin/mpshell.py cp ../mpscript/mpshell $(MX_INSTALL_DIR)/bin/mpshell.pyw cp ../mpscript/mpenv $(MX_INSTALL_DIR)/bin/mpenv.py cp ../mpscript/mpenv $(MX_INSTALL_DIR)/bin/mpenv.pyw