forked from plumed/plumed2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
97 lines (65 loc) · 1.57 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
-include Makefile.conf
SRCDIRS := src test
SUBDIRS := $(SRCDIRS) user-doc developer-doc regtest
SUBDIRSCLEAN:=$(addsuffix .clean,$(SUBDIRS))
.PHONY: all lib clean $(SRCDIRS) doc docclean check cppcheck distclean
# if machine dependent configuration has been found:
ifdef GCCDEP
all:
$(MAKE) lib
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
# 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