-
Notifications
You must be signed in to change notification settings - Fork 135
/
Copy pathamsc.mk
19 lines (17 loc) · 880 Bytes
/
amsc.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
MY_DIR := $(patsubst %/,%,$(dir $(mkfile_path)))
AMSC_srcfiles := $(shell find $(MY_DIR)/src/contrib -name "*.cpp" -not -name main.C)
AMSC_MODULE = $(MY_DIR)/src/contrib/_amsc.so
ifeq ($(CROW_USE_PYTHON3),TRUE)
amsc :: $(AMSC_MODULE)
$(AMSC_MODULE) : $(MY_DIR)/src/contrib/amsc.i $(AMSC_srcfiles)
@echo "Building "$@"..."
(cd $(MY_DIR) && unset CXX CC && . $(MY_DIR)/scripts/establish_conda_env.sh --load && python3 ./setup3.py build_ext build install --install-platlib=./framework/contrib/AMSC)
@echo "Done"
else
amsc :: $(AMSC_MODULE)
$(AMSC_MODULE) : $(MY_DIR)/src/contrib/amsc.i $(AMSC_srcfiles)
@echo "Building "$@"..."
(cd $(MY_DIR) && unset CXX CC && . $(MY_DIR)/scripts/establish_conda_env.sh --load && python ./setup.py build_ext build install --install-platlib=./framework/contrib/AMSC)
@echo "Done"
endif