target/sdk: use .config instead of unconditionally enabling all build dirs
[openwrt.org/openwrt.git] / include / toplevel.mk
blob:a/include/toplevel.mk -> blob:b/include/toplevel.mk
--- a/include/toplevel.mk
+++ b/include/toplevel.mk
@@ -156,6 +156,15 @@
 	@+$(MAKE) -r -s tmp/.prereq-build $(PREP_MK)
 	@+$(NO_TRACE_MAKE) -r -s $@
 
+ifeq ($(SDK),1)
+
+%::
+	@+$(PREP_MK) $(NO_TRACE_MAKE) -r -s prereq
+	@./scripts/config/conf --defconfig=.config Config.in
+	@+$(ULIMIT_FIX) $(SUBMAKE) -r $@
+
+else
+
 %::
 	@+$(PREP_MK) $(NO_TRACE_MAKE) -r -s prereq
 	@( \
@@ -167,6 +176,8 @@
 	)
 	@+$(ULIMIT_FIX) $(SUBMAKE) -r $@
 
+endif
+
 help:
 	cat README
 

comments