# # Makefile for the MpWxCa module. # # WARNING: This makefile assumes that you are using Gnu make! # # The supported values of MX_ARCH are: # # linux # macosx # win32 # 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 PYTHON_BIN = $(shell ../mx/tools/mx_config python default) #---- all: MpWxCa.pyc ifeq ($(MX_ARCH),win32) MPWX_CA_BUILD_PYC = ./mpwx_ca_build_pyc.bat _pycache_exists = false else MPWX_CA_BUILD_PYC = $(PYTHON_BIN) ../mp/libMp/MpBuildPyc.pyx _pycache_exists = $(shell ../mx/scripts/directory_exists __pycache__) endif ###$(info _pycache_exists is [${_pycache_exists}]) MpWxCa.pyc: MpWxCa.py $(MPWX_CA_BUILD_PYC) MpWxCa clean: -rm *.pyc -rm -rf __pycache__ distclean: clean install: -mkdir $(MX_INSTALL_DIR)/lib -mkdir $(MX_INSTALL_DIR)/lib/mp install -m 644 *.py $(MX_INSTALL_DIR)/lib/mp ifeq ($(_pycache_exists),false) -install -m 644 *.pyc $(MX_INSTALL_DIR)/lib/mp else -mkdir $(MX_INSTALL_DIR)/lib/mp/__pycache__ -install -m 644 __pycache__/*.pyc $(MX_INSTALL_DIR)/lib/mp/__pycache__ endif