1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2010-2014 Intel Corporation
5 # .mk to build subdirectories
8 include $(RTE_SDK)/mk/internal/rte.install-pre.mk
9 include $(RTE_SDK)/mk/internal/rte.clean-pre.mk
10 include $(RTE_SDK)/mk/internal/rte.build-pre.mk
12 ALL_DEPDIRS := $(patsubst DEPDIRS-%,%,$(filter DEPDIRS-%,$(.VARIABLES)))
14 CLEANDIRS = $(addsuffix _clean,$(DIRS-y) $(DIRS-n) $(DIRS-))
18 _INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y)
25 install: build _postinstall
35 @[ -d $(CURDIR)/$@ ] || mkdir -p $(CURDIR)/$@
36 @echo "== Build $S/$@"
37 @$(MAKE) S=$S/$@ -f $(SRCDIR)/$@/Makefile -C $(CURDIR)/$@ all
43 @echo "== Clean $S/$*"
44 @if [ -f $(SRCDIR)/$*/Makefile -a -d $(CURDIR)/$* ]; then \
45 $(MAKE) S=$S/$* -f $(SRCDIR)/$*/Makefile -C $(CURDIR)/$* clean ; \
47 @rm -f $(_BUILD_TARGETS) $(_INSTALL_TARGETS) $(_CLEAN_TARGETS)
52 $(1): | $(DEPDIRS-$(1))
54 $(if $(D),$(info $(1) depends on $(DEPDIRS-$(1))))
57 $(foreach dir,$(ALL_DEPDIRS),\
58 $(eval $(call depdirs_rule,$(dir))))
60 include $(RTE_SDK)/mk/internal/rte.install-post.mk
61 include $(RTE_SDK)/mk/internal/rte.clean-post.mk
62 include $(RTE_SDK)/mk/internal/rte.build-post.mk