-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
35 lines (30 loc) · 1.05 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
-include config.mk
.PHONY: default clean install complexify_build
default:
# Check if the config.mk file is in the config dir.
# Check also if env variable is set.
@if [ ! -f "config/config.mk" ]; then \
echo "Before compiling, copy an existing config file from the "; \
echo "config/defaults/ directory to the config/ directory and "; \
echo "rename to config.mk. For example:"; \
echo " ";\
echo " cp config/defaults/config.LINUX_GFORTRAN.mk config/config.mk"; \
echo " ";\
echo "Then modify this config file as required. "; \
echo "Rerun 'make' and the build will start"; \
elif [ -z "${COMPLEXIFY_DIR}" ]; then \
echo "Please set the COMPLEXIFY_DIR environmental variable before continuing"; \
else make complexify_build;\
fi;
clean:
@echo "Making clean ... "
rm -rf config.mk
rm -rf src/*.mod
rm -rf src/*.o
rm -rf src/*.so
install:
mkdir -p ${INSTALL_DIR}/include && cp ./src/*.mod ${INSTALL_DIR}/include
mkdir -p ${INSTALL_DIR}/lib && cp ./src/*.so ${INSTALL_DIR}/lib
complexify_build:
ln -sf config/config.mk config.mk;
(cd src && make)