# # Change the value of the MX_ARCH variable below to match the platform you # are compiling the MX Python interface for. The available platforms are: # # bsd - FreeBSD, NetBSD, and OpenBSD # bsd-clang - FreeBSD (using Clang) # cygwin - Cygwin 1.5 or 1.7 # hpux - HP 9000/7xx under HP-UX 10.20 # irix - SGI with Irix 6.5 # irix-gcc - SGI with Irix 6.5 with GCC # linux - Linux 2.2 or above using GCC # linux-clang - Linux 3.12 or above using Clang # macosx - x86/PPC with MacOS X using GCC # macosx-clang - x86 with MacOX X using Clang # qnx - x86 with QNX Neutrino # solaris - sparc/x86 with Solaris 8 or above # solaris-gcc - sparc/x86 with Solaris 8 or above using GCC # termux - Android 5.1 Bionic with Termux gcc (Python 2.7) # win32 - Microsoft Win32 with Visual C++ 4.0 or above # # Note that the MX Python interface is not necessarily available for all # the platforms on which the MX library is available. # # To build the MX Python interface library and applications, you must first # build the MX library itself. Next set the variables MX_ARCH and LIBMXSRC # below. Then do a "make depend" and finally a "make". # #MX_ARCH = linux #MX_INSTALL_DIR = /opt/mx #MX_INSTALL_DIR = c:/opt/mx-2.1.3-2017_12_07 #-------- # # WARNING: The mx_modules feature and python.mxo are not complete yet. # For now, just ignore their existence. # # The mx_modules* build targets are used for building MX modules # (_NOT_ Python modules). At present, the only one is the python.mxo # MX module which is used to allow MX programs such as "mxmotor" # to use Python and Mp as a scripting language. # #-------- ifndef MX_ARCH ifneq ($(wildcard ../mx/tools/mx_config),) MX_ARCH=$(shell ../mx/tools/mx_config mx_arch) else MX_ARCH = linux endif endif ifndef MX_INSTALL_DIR ifdef MXDIR MX_INSTALL_DIR = $(MXDIR) else ifneq ($(wildcard ../mx/tools/mx_config),) MX_INSTALL_DIR=$(shell ../mx/tools/mx_config mx_install_dir) else MX_INSTALL_DIR = /opt/mx endif endif endif #-------- $(info MX_ARCH is [${MX_ARCH}]) $(info MX_INSTALL_DIR is [${MX_INSTALL_DIR}]) #-------- LIBMX = ..\\\\..\\\\mx\\\\libMx\\\\libMx.lib LIBMXSRC = ../../mx/libMx all: build MAKECMD = $(MAKE) MX_ARCH=$(MX_ARCH) MX_INSTALL_DIR=$(MX_INSTALL_DIR) \ LIBMX=$(LIBMX) LIBMXSRC=$(LIBMXSRC) build: depend_files ( cd libMp ; $(MAKECMD) ) clean: depend_files cleanmisc ( cd libMp ; $(MAKECMD) clean ) distclean: depend_files cleanmisc ( cd libMp ; $(MAKECMD) distclean ) cleanmisc: -$(RM) */*.lib -$(RM) */*.exp -$(RM) */*.ilk -$(RM) */*.pdb -$(RM) */*.bak -$(RM) */core depend: depend_files ( cd libMp ; $(MAKECMD) depend ) install: depend_files ( cd libMp ; $(MAKECMD) install ) depend_files: libMp/Makefile.depend libMp/Makefile.depend: touch libMp/Makefile.depend #-------- mx_modules: mx_modules-build mx_modules-build: ( cd mx_modules ; $(MAKECMD) build ) mx_modules-clean: ( cd mx_modules ; $(MAKECMD) clean ) mx_modules-distclean: ( cd mx_modules ; $(MAKECMD) distclean ) mx_modules-depend: ( cd mx_modules ; $(MAKECMD) depend ) mx_modules-install: ( cd mx_modules ; $(MAKECMD) install )