-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (66 loc) · 2.89 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Master makefile for f90wrapTemplate. The actual makefile you want is:
# src/build/Makefile (or src_cs/build/makefile for complex build)
default:
# Check if the config.mk file is in the config dir.
@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.OSX_GFORTRAN.mk config/config.mk"; \
echo " ";\
echo "The modify this config file as required. Typically the CGNS directory "; \
echo "will have to be modified. With the config file specified, rerun "; \
echo "'make' and the build will start"; \
else \
make F90WRAPTEMPLATE || exit 1;\
make F90WRAPTEMPLATE_CS || exit 1;\
fi;
F90WRAPTEMPLATE:
# Check if the config.mk file is in the config dir.
@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.OSX_GFORTRAN.mk config/config.mk"; \
echo " ";\
echo "The modify this config file as required. Typically the CGNS directory "; \
echo "will have to be modified. With the config file specified, rerun "; \
echo "'make' and the build will start"; \
else \
(cd src/build/ && make f90wrapTemplate);\
rm -f ./python_src/_f90wrapTemplate_pyf90.so;\
rm -rf ./python_src/f90wrapTemplate_pyf90/;\
mv ./src/build/_f90wrapTemplate_pyf90* ./python_src/_f90wrapTemplate_pyf90.so;\
mv ./src/build/f90wrapTemplate_pyf90/ ./python_src/f90wrapTemplate_pyf90/;\
fi;
F90WRAPTEMPLATE_CS:
# Check if the config.mk file is in the config dir.
@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.OSX_GFORTRAN.mk config/config.mk"; \
echo " ";\
echo "The modify this config file as required. Typically the CGNS directory "; \
echo "will have to be modified. With the config file specified, rerun "; \
echo "'make' and the build will start"; \
else \
(cd src_cs/build/ && make f90wrapTemplate_cs);\
rm -f ./python_src/_f90wrapTemplate_pyf90_cs.so;\
rm -rf ./python_src/f90wrapTemplate_pyf90_cs/;\
mv ./src_cs/build/_f90wrapTemplate_pyf90_cs* ./python_src/_f90wrapTemplate_pyf90_cs.so;\
mv ./src_cs/build/f90wrapTemplate_pyf90_cs/ ./python_src/f90wrapTemplate_pyf90_cs/;\
fi;
clean_build:
(cd src/build && make clean_build)
(cd src_cs/build && make clean_build)
clean:
rm -f -r ./python_src/f90wrapTemplate_pyf90
rm -f -r ./python_src/f90wrapTemplate_pyf90_cs
rm -f ./python_src/_f90wrapTemplate_pyf90*
rm -f ./python_src/_f90wrapTemplate_pyf90_cs*
rm -f -r ./build/bin
make clean_build