-$(TOOL_BUILD_DIR):
- @mkdir -p $(TOOL_BUILD_DIR)
-
-$(STAGING_DIR):
- @mkdir -p $(STAGING_DIR)/lib
- @mkdir -p $(STAGING_DIR)/include
- @mkdir -p $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)
- @ln -sf ../lib $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib
-
-$(TARGET_DIR):
- if [ -f "$(TARGET_SKELETON)" ] ; then \
- zcat $(TARGET_SKELETON) | tar -C $(BUILD_DIR) -xf -; \
- fi;
- if [ -d "$(TARGET_SKEL_DIR)" ] ; then \
- cp -a $(TARGET_SKEL_DIR)/* $(TARGET_DIR)/; \
- fi;
- -find $(TARGET_DIR) -type d -name CVS | xargs rm -rf
- -find $(TARGET_DIR) -type d -name .svn | xargs rm -rf
- -ln -sf /tmp/resolv.conf $(TARGET_DIR)/etc
- -mkdir -p $(TARGET_DIR)/jffs
-
-source: $(TARGETS_SOURCE)
+source: toolchain/source package/source target/source
+
+package/%:
+ @$(TRACE) $@
+ $(MAKE) -C package $(patsubst package/%,%,$@)
+
+target/%:
+ @$(TRACE) $@
+ $(MAKE) -C target $(patsubst target/%,%,$@)
+
+toolchain/%:
+ @$(TRACE) $@
+ $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@)