forked from plumed/plumed2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
118 lines (82 loc) · 1.96 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
ifneq ($(MAKECMDGOALS),clean)
-include Makefile.conf
endif
SRCDIRS := src test
SUBDIRS := $(SRCDIRS) user-doc developer-doc regtest macports vim astyle
SUBDIRSCLEAN:=$(addsuffix .clean,$(SUBDIRS))
.PHONY: all lib clean $(SRCDIRS) doc docclean check cppcheck distclean all_plus_docs macports codecheck plumedcheck astyle
# if machine dependent configuration has been found:
ifdef GCCDEP
all:
$(MAKE) lib
$(MAKE) -C vim
# 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
check: src test
$(MAKE) -C regtest
else
all:
@echo No configuration available
@echo First run ./configure
endif
# these targets are available also without configuration
clean: $(SUBDIRSCLEAN)
rm -f *~ */*~ */*/*~
$(SUBDIRSCLEAN): %.clean:
$(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