Move headers out into their own directory (include/eruntime).
[eruntime.git] / Makefile
blob1e71c18fb5cf7e538eb22f9dc6861cc563ee8b5c
1 # Top-level Makefile
3 include Makefile.top
5 SUBDIRS = src
6 CLEANDIRS = $(SUBDIRS) tests
8 .PHONY: all all-recursive
9 all: all-recursive
11 all-recursive: $(SUBDIRS)
12 @list='$^'; for dir in $$list; do \
13 echo -e "\\n... Building $$dir"; \
14 $(SUBMAKE) -C $$dir || exit 1; \
15 done
17 .PHONY: deps deps-recursive
18 deps: deps-recursive
20 deps-recursive: $(SUBDIRS)
21 @list='$^'; for dir in $$list; do \
22 echo -e "\\n... Generating dependency information for $$dir"; \
23 $(SUBMAKE) -C $$dir deps || exit 1; \
24 done
26 .PHONY: install install-local install-recursive
28 install: install-top install-local install-recursive
29 install-local: install-bin
31 install-top:
32 @echo -e "\\n... Installing from top-level"
34 install-bin: eruntime-config
35 @dir='$(DESTDIR)$(bindir)'; \
36 $(INSTALL_DIR) $(DESTDIR)$(bindir) || exit 1; \
37 list='$^'; for bin in $$list; do \
38 echo "Installing $$bin..."; \
39 $(INSTALL_BIN) $$bin $$dir || exit 1; \
40 done
42 install-recursive: $(SUBDIRS)
43 @list='$^'; for dir in $$list; do \
44 echo -e "\\n... Installing from $$dir"; \
45 $(SUBMAKE) -C $$dir install || exit 1; \
46 done
48 .PHONY: check
49 check: all tests
50 @echo -e "\\n... Building tests"; \
51 $(SUBMAKE) -C tests all || exit 1; \
52 echo -e "\\n... Running tests"; \
53 $(SUBMAKE) -C tests check
55 .PHONY: clean clean-recursive
56 clean: clean-recursive
58 clean-recursive: $(CLEANDIRS)
59 @echo; list='$^'; \
60 for dir in $$list; do \
61 echo -e "\\n... Cleaning $$dir"; \
62 $(SUBMAKE) -C $$dir clean || exit 1; \
63 done
65 # vim: ts=8 sw=8 noet fdm=marker tw=80