1
2.PHONY: all clean lib install uninstall install-html astyle
3
4# by default we compile the lib directory, which in turn requests all the needeed modules
5all: lib
6
7lib:
8	$(MAKE) -C lib
9
10install:
11	$(MAKE) -C lib install
12
13install-html:
14	$(MAKE) -C lib install-html
15
16uninstall:
17	$(MAKE) -C lib uninstall
18
19# list of all the contained directories which can be cleaned
20SUBDIRS :=$(subst /Makefile,,$(wildcard */Makefile))
21SUBDIRSCLEAN :=$(addsuffix .clean,$(SUBDIRS))
22.PHONY: $(SUBDIRS)
23
24# this is cleaning all subdirectories
25clean: $(SUBDIRSCLEAN)
26	rm -f codecheck.log codecheck.fatal
27
28$(SUBDIRSCLEAN): %.clean:
29	$(MAKE) -C $* clean
30
31.PHONY: cppcheck
32cppcheck:
33	maketools/codecheck --cppcheck
34
35.PHONY: plumedcheck
36plumedcheck:
37	maketools/codecheck --plumedcheck
38
39.PHONY: codecheck
40codecheck:
41	maketools/codecheck
42
43.PHONY: help
44help:
45	@echo "Available targets are"
46	@echo "  all: compile everything (default)"
47	@echo "  clean: clean everything"
48	@echo "  codecheck: check source (requires cppcheck  and gawk installed)"
49	@echo "  cppcheck: check source (requires cppcheck and gawk installed)"
50	@echo "  plumedcheck: check source (requires gawk installed)"
51
52astyle:
53	$(MAKE) -C ../astyle
54	./astyle.sh
55
56
57