forked from yfygod/AFEPack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (31 loc) · 1022 Bytes
/
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
36
37
38
39
40
41
42
subdir = $(wildcard template/*)
njobs = $(shell cat /proc/cpuinfo | grep "core id" | sort | uniq | wc -l )
expdif = $(wildcard example/*)
default: AFEPack template mpi
AFEPack:
mkdir -p lib && cd src/ && make -j $(njobs);
cd ./include && ln -sf ../bundled .;
@echo "AFEPack done!";
AFEPack_MPI:
mkdir -p lib && cd mpi/src/ && make;
@echo "AFEPack MPI done!";
mpi:
make AFEPack_MPI
template:
$(foreach dir, $(subdir), cd $(PWD)/$(dir) && make;)
@echo "template done!";
all: AFEPack template AFEPack_MPI
@echo "Installation done!";
example:
$(foreach dir, $(expdif), cd $(PWD)/$(dir) && make;)
clean:
cd ./src/ && make clean;
cd ./include/ && rm -rf bundled;
cd ./mpi/src/ && make clean;
rm -rf lib;
$(foreach dir, $(subdir), cd $(PWD)/$(dir) && make clean;)
clean_example:
$(foreach dir, $(expdif), cd $(PWD)/$(dir) && make clean;)
clean_template:
$(foreach dir, $(subdir), cd $(PWD)/$(dir) && make clean;)
.PHONY: AFEPack_MPI AFEPack template all example clean clean_example mpi clean_template