forked from plumed/plumed2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
139 lines (101 loc) · 2.7 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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),distclean)
ifneq ($(MAKECMDGOALS),fullclean)
-include Makefile.conf
endif
endif
endif
SRCDIRS := src test
SUBDIRS := $(SRCDIRS) user-doc developer-doc regtest macports vim json astyle python
SUBDIRSCLEAN:=$(addsuffix .clean,$(SUBDIRS))
.PHONY: all lib clean $(SRCDIRS) doc docclean check installcheck cppcheck distclean all_plus_docs macports codecheck plumedcheck astyle nmcheck
# if machine dependent configuration has been found:
ifdef GCCDEP
all:
$(MAKE) lib
$(MAKE) -C vim
$(MAKE) -C python
LD_LIBRARY_PATH="$(realpath .)/src/lib":${LD_LIBRARY_PATH} PLUMED_PREPEND_PATH="$(realpath .)/src/lib" $(MAKE) -C json
# target useful for macports
# it builds the code then the documentation
all_plus_docs:
$(MAKE) all
$(MAKE) docs
lib:
$(MAKE) -C src
install:
$(MAKE) -C src install
uninstall:
$(MAKE) -C src uninstall
# standard target (according to GNU doc)
html:
$(MAKE) doc
# standard target (according to GNU doc)
install-html: doc
$(MAKE) -C src install-html
$(SRCDIRS):
$(MAKE) -C $@
# compile plumed before tests:
test: src
# doxygen
doc:
$(MAKE) -C user-doc
$(MAKE) -C developer-doc
docs:
$(MAKE) doc
# regtests
# perform tests using non-installed plumed
check:
LD_LIBRARY_PATH="$(realpath .)/src/lib":${LD_LIBRARY_PATH} PLUMED_PREPEND_PATH="$(realpath .)/src/lib" $(MAKE) -C regtest
$(MAKE) -C regtest checkfail
# perform tests using the installed version of plumed
installcheck:
PLUMED_PREPEND_PATH="$(bindir)" PLUMED_PROGRAM_NAME="$(program_name)" $(MAKE) -C regtest
$(MAKE) -C regtest checkfail
else
all:
@echo No configuration available
@echo First run ./configure
endif
# these targets are available also without configuration
clean: $(SUBDIRSCLEAN)
rm -f *~ */*~ */*/*~
$(SUBDIRSCLEAN): %.clean:
[ ! -e $* ] || $(MAKE) -C $* clean
distclean: fullclean
fullclean:
make clean
rm -f Makefile.conf
rm -f sourceme.sh
rm -f config.log
rm -f stamp-h
rm -f */*.on */*.off
docclean:
cd user-doc && make clean
cd developer-doc && make clean
cppcheck:
$(MAKE) -C src cppcheck
codecheck:
$(MAKE) -C src codecheck
plumedcheck:
$(MAKE) -C src plumedcheck
macports:
$(MAKE) -C macports
# stamp-h file keeps track of when ./configure was last applied
# the procedure below is taken from:
# https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Automatic-Remaking.html#Automatic-Remaking
Makefile.conf: stamp-h
stamp-h: sourceme.sh.in Makefile.conf.in config.status
./config.status
config.status: configure
./config.status --recheck
astyle:
$(MAKE) -C astyle
$(MAKE) -C src astyle
ifeq ($(use_debug_glibcxx),yes)
nmcheck:
@echo SKIPPING nmcheck due to debug flags
else
nmcheck:
$(MAKE) -C src nmcheck
endif