-download: .config FORCE
- @+$(SUBMAKE) tools/download
- @+$(SUBMAKE) toolchain/download
- @+$(SUBMAKE) package/download
- @+$(SUBMAKE) target/download
+ifndef SDK
+ DOWNLOAD_DIRS = tools/download toolchain/download package/download target/download
+else
+ DOWNLOAD_DIRS = package/download
+endif
+
+download: .config FORCE $(if $(wildcard $(TOPDIR)/staging_dir/host/bin/flock),,tools/flock/compile)
+ @+$(foreach dir,$(DOWNLOAD_DIRS),$(SUBMAKE) $(dir);)