summaryrefslogtreecommitdiff
path: root/makefiles/gmake/sub.mk
blob: 787fb0b15a4dbc860fcd34e9e52647763de3b410 (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
26
27
28
29
30
31
32
33
34
35
# makefile for a sub package
#
# requires:
# - TOPDIR
# - SUBDIRS
# - INCLUDE_DIRS
#
# provides:
# - target: all targets

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

.PHONY: all subdirs $(SUBDIRS) local_all
all: subdirs depend $(BINS) $(CPP_BINS) $(STATIC_LIB) $(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR).$(DYNAMIC_LIB_MINOR).$(DYNAMIC_LIB_PATCH) $(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR) $(DYNAMIC_LIB) $(DYNAMIC_MODULE) local_all all_po
subdirs: $(SUBDIRS)

$(SUBDIRS):
	$(MAKE) -C $@ all

.PHONY: test local_test
test: all $(TEST_BINS) $(TEST_CPP_BINS) local_test
	@test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \
	  (set -e; $(MAKE) -C $$d test || exit 1); done)

.PHONY: longtest local_longtest
longtest: test local_longtest
	@test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \
	  (set -e; $(MAKE) -C $$d longtest || exit 1); done)

-include $(TOPDIR)/makefiles/gmake/depend.mk
-include $(TOPDIR)/makefiles/gmake/clean.mk
-include $(TOPDIR)/makefiles/gmake/install.mk
-include $(TOPDIR)/makefiles/gmake/i18n.mk
-include $(TOPDIR)/makefiles/gmake/libs.mk