forked from UppASD/UppASD
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
97 lines (78 loc) · 3.64 KB
/
Makefile
File metadata and controls
97 lines (78 loc) · 3.64 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#
# Maintain SD
#
SHELL = /bin/sh
# Program name
PROG = sd
# List of available building configs (found in make/default-profiles/systemname.make)
DEFAULT_SYSTEMS := gfortran gfortran-cuda gfortran-osx gfortran-cuda-osx ifort ifort-cuda ifort-nomkl ifort-cuda-nomkl pathscale pgf90 pgf90-nomkl jureca gfortran-win64 gfortran-FC gfortran-ftn crayftn-ftn aocc-ftn
LOCAL_SYSTEMS := $(filter-out $(DEFAULT_SYSTEMS),$(shell ls ./source/make/user_profiles/*.make | sed 's/..source.make.user_profiles.//' | sed 's/.make//'))
SYSTEMS := $(DEFAULT_SYSTEMS) $(LOCAL_SYSTEMS)
.PHONY: deps PRINT nocopyprofile copyprofile help clean probe docs tests asd-tests sld-tests dist dist_minimal gneb-tests $(SYSTEMS)
# Including the help files
include ./source/make/makefileHELP
include ./source/make/makefileHELPDEFAULTS
PRINT:
@echo $@
deps:
@if [ ! -d source/make/user_profiles ] ; then mkdir source/make/user_profiles ; fi
@python3 ./source/make/generateDependencies.py
probe:
@python3 ./source/make/suggestProfiles.py
docs:
@if [ ! -d source/make/user_profiles ] ; then mkdir source/make/user_profiles ; fi
@cd ./docs; doxygen Doxyfile; cd Manual; pdflatex UppASDmanual.tex ; pdflatex UppASDmanual.tex
tests:
@echo ''
@echo 'To run tests for selected functionalies, run:'
@echo '`make asd-tests`, `make sld-tests`, and/or `make gneb-tests`'
@echo ''
@echo 'For a quick regression test, run `make regression-test`'
@echo ''
asd-tests:
@cd ./tests; python3 -u ./bergtest.py --file regulartests.yaml | tee tests.log
@cd ./tests; python3 -u ./bergtest.py --clean
sld-tests:
@cd ./tests; python3 -u ./bergtest.py --file sldtests.yaml | tee tests.log
@cd ./tests; python3 -u ./bergtest.py --clean
gneb-tests:
@cd ./tests; python3 -u ./bergtest.py --file regressionGNEB_15d7169b.yaml | tee tests.log
@cd ./tests; python3 -u ./bergtest.py --clean
regression-test:
@cd ./tests; python3 -u ./bergtest.py --file regressionResaro.yaml | tee regression-tests.log
@cd ./tests; python3 -u ./bergtest.py --clean
# Clean all .mod and .o files as well as mod and obj folders
clean:
@if [ ! -d source/make/user_profiles ] ; then mkdir source/make/user_profiles ; fi
rm -f ./source/*.o ./source/*/*.o ./source/mod/*.mod ./source/$(PROG) ./source/*/*/*.o ./source/*/*/*/*.o
# Run same make file but with proper profile syntax and parallel make and print to log file
$(SYSTEMS):
@if [ ! -d source/make/user_profiles ] ; then mkdir source/make/user_profiles ; fi
@cd ./source; $(MAKE) PROFILE=$@
@if [ ! -d ./bin ] ; then mkdir ./bin ; fi
@cp ./source/sd ./bin/sd.$@
# Generate an compressed archive
dist:
@echo "Packaging source, examples, documentation, and tests to ./UppASD_dist.tar.gz"
@cd tests ; ./cleanAll.sh ; cd ..
@tar cf ./UppASD_dist.tar Makefile setup_UppASD.sh \
./source/*.f90 ./source/*/*.f90 ./source/make/ ./source/gpu_files/ ./source/README/ \
./source/Third_party/ \
./examples ./docs/Doxyfile ./docs/*.pdf ASD_GUI/*.py \
./docs/Manual/*.tex ./docs/Manual/*.ist ./docs/Manual/Pictures/*.png \
./tests/ ; \
gzip --best -f ./UppASD_dist.tar
dist_minimal:
@echo "Packaging source to ./UppASD_src.tar.gz"
@cd tests ; ./cleanAll.sh ; cd ..
@tar cf ./UppASD_src.tar Makefile setup_UppASD.sh \
./source/*.f90 ./source/*/*.f90 ./source/make/ ./source/gpu_files/ ./source/README/ \
./source/Third_party/ ; \
gzip --best -f ./UppASD_src.tar
sources:
@echo "Packaging source to ./UppASD_src.tar.gz"
@cd tests ; ./cleanAll.sh ; cd ..
@tar cf ./UppASD_src.tar ./CMakeLists.txt \
./source/*.f90 ./source/CMakeLists.txt ./source/*/CMakeLists.txt ./source/*/*.f90 ./source/gpu_files/ \
./source/Third_party/ ./cmake tests
@gzip --best -f ./UppASD_src.tar