aboutsummaryrefslogtreecommitdiffstats
path: root/rules.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-01-18 14:00:48 +0100
committerFelix Fietkau <nbd@nbd.name>2017-01-18 23:57:07 +0100
commit6cf067d084cc551c721e98b6d6c6403a63e521d5 (patch)
treecba95f698e521269aa3530791b758ac8f636d842 /rules.mk
parentc99f8815680fb4abf42cbb2e9d1a909f8f373b02 (diff)
downloadupstream-6cf067d084cc551c721e98b6d6c6403a63e521d5.tar.gz
upstream-6cf067d084cc551c721e98b6d6c6403a63e521d5.tar.bz2
upstream-6cf067d084cc551c721e98b6d6c6403a63e521d5.zip
build: define common subdir targets in rules.mk
Reduce build system clutter and enable further rework Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/rules.mk b/rules.mk
index 95b18f9e5c..e54acc9858 100644
--- a/rules.mk
+++ b/rules.mk
@@ -101,6 +101,15 @@ ifdef CONFIG_MIPS64_ABI
endif
endif
+DEFAULT_SUBDIR_TARGETS:=clean download prepare compile install update refresh prereq dist distcheck configure check
+
+define DefaultTargets
+$(foreach t,$(DEFAULT_SUBDIR_TARGETS),
+ $(t):
+ .PHONY: $(t)
+)
+endef
+
DL_DIR:=$(if $(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(TOPDIR)/dl)
OUTPUT_DIR:=$(if $(call qstrip,$(CONFIG_BINARY_FOLDER)),$(call qstrip,$(CONFIG_BINARY_FOLDER)),$(TOPDIR)/bin)
BIN_DIR:=$(OUTPUT_DIR)/targets/$(BOARD)/$(SUBTARGET)