# # 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 platforms. # pyversion := $(shell ../../mx/tools/mx_config python versions | cut -f1) pyinstall := $(shell ../../mx/tools/mx_config python install_path ${pyversion}) pyinclude := $(shell ../../mx/tools/mx_config python include ${pyversion}) pylibrary := $(shell ../../mx/tools/mx_config python library ${pyversion}) pyinstall := $(shell cygpath -d -m "${pyinstall}" | sed "s/\//\\\\\\\\/g") pyinclude := $(shell cygpath -d -m "${pyinclude}" | sed "s/\//\\\\\\\\/g") pylibrary := $(shell cygpath -d -m "${pylibrary}" | sed "s/\//\\\\\\\\/g") $(info $$pyversion is [${pyversion}]) $(info $$pyinstall is [${pyinstall}]) $(info $$pyinclude is [${pyinclude}]) $(info $$pylibrary is [${pylibrary}]) #--- PYTHON_INCLUDES := -I${pyinclude} PYTHON_LIBRARY := ${pylibrary} #$(info $$PYTHON_INCLUDES is [${PYTHON_INCLUDES}]) #$(info $$PYTHON_LIBRARY is [${PYTHON_LIBRARY}]) # The following entry is for WinPython #WINPYDIR=C:\\WinPython-64bit-2.7.10.2\\python-2.7.10.amd64 #PYTHON_INCLUDES = -I$(WINPYDIR)\\include #PYTHON_LIBRARY = $(WINPYDIR)\\libs\\python27.lib # The following entries are for various versions of the standard Python install. #PYTHON_INCLUDES = -Ic:\\Python27\\include #PYTHON_LIBRARY = c:\\Python27\\libs\\python27.lib #PYTHON_INCLUDES = -Ic:\\Python26\\include #PYTHON_LIBRARY = c:\\Python26\\libs\\python26.lib #PYTHON_INCLUDES = -Ic:\\Python24\\include #PYTHON_LIBRARY = c:\\Python24\\libs\\python24.lib #PYTHON_INCLUDES = -Ic:\\Python23\\include #PYTHON_LIBRARY = c:\\Python23\\libs\\python23.lib # # 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 # Turn on optimization # #OPTIMIZE = -O2 #CFLAGS += $(OPTIMIZE) # #========================================================================= # # Generally, you should not have to modify anything after this point. # MP_BUILD_PYC = .\\mp_build_pyc.bat CC = cl CFLAGS += -nologo $(INCLUDES) $(PYTHON_INCLUDES) -DHAVE_SNPRINTF \ -MD -Zi -WX -DOS_WIN32 $(EXTRA_FLAGS) -DDEBUG CFLAGS += $(EXTRA_CFLAGS) MAKEDEPEND = \ ( rm Makefile.depend ; makedepend -o.obj \ -Y -I../../mx/libMx -I. -f- *.c 2>nul > 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_PYTHON_MODULES = Mp.pyc MpScan.pyc MP_MODULE_NAME = MpPrivate.pyd 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_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 *.pyd $(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