-
-$(DL_DIR)/$(UCLIBC_SOURCE):
- mkdir -p $(DL_DIR)
- $(SCRIPT_DIR)/download.pl $(DL_DIR) $(UCLIBC_SOURCE) $(UCLIBC_MD5SUM) $(UCLIBC_SITE)
-
-$(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE)
- mkdir -p $(TOOL_BUILD_DIR)
- bzcat $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) -
- $(PATCH) $(UCLIBC_DIR) ./patches
- touch $(UCLIBC_DIR)/.unpacked
-
-$(UCLIBC_DIR)/.configured: $(UCLIBC_DIR)/.unpacked
- $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(UCLIBC_DIR)/Rules.mak
- $(CP) ./files/config.$(ARCH) $(UCLIBC_DIR)/.config
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(PKG_BUILD_DIR)/Rules.mak
+ if [ -e config/$(ARCH).$(BOARD) ]; then \
+ $(CP) config/$(ARCH).$(BOARD) $(PKG_BUILD_DIR)/.config; \
+ else \
+ $(CP) config/$(ARCH) $(PKG_BUILD_DIR)/.config; \
+ fi