summaryrefslogtreecommitdiff
path: root/makefiles/sub.mk
blob: ef4030135612946db501c38e2f09df6a87ffab7a (plain)
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
# makefile for a sub package
#
# requires:
# - TOPDIR
# - SUBDIRS
# - INCLUDE_DIRS
#
# provides:
# - target: all targets

-include $(TOPDIR)/makefiles/platform.mk
-include $(TOPDIR)/makefiles/compiler.mk

.PHONY: all $(SUBDIRS) local_all
all: local_all $(OBJS) $(CPPOBJS) $(BIN_OBJS) $(CPP_BIN_OBJS) $(BINS) $(CPP_BINS) $(CMODULES) $(CPPMODULES)
	@test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \
	  (set -e; $(MAKE) -C $$d all || exit 1); done)

.PHONY: test local_test
test: local_test $(OBJS) $(CPPOBJS) $(BIN_OBJS) $(BINS) $(CPP_BINS) $(CMODULES) $(CPPMODULES)
	@test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \
	  (set -e; $(MAKE) -C $$d test || exit 1); done)

-include $(TOPDIR)/makefiles/depend.mk
-include $(TOPDIR)/makefiles/clean.mk