summaryrefslogtreecommitdiff
path: root/package/mtd/mtd.mk
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2007-01-14 01:01:07 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2007-01-14 01:01:07 +0000
commitd67d790dd17b8a0e13aabed13f302cfde9cc3057 (patch)
tree7e4c0a60bde7a32546ab79b34ec914c738db29c5 /package/mtd/mtd.mk
parent0a4b6a3bc7e9f325efbf8f3b01e90c762172e7d7 (diff)
Correct spelling error and config option to create symlinks for old naming of MTD utilities. Also add in LDFLAGS and such to building with external toolchains.
Diffstat (limited to 'package/mtd/mtd.mk')
-rw-r--r--package/mtd/mtd.mk18
1 files changed, 16 insertions, 2 deletions
diff --git a/package/mtd/mtd.mk b/package/mtd/mtd.mk
index 2d122e6e1..2f3c782aa 100644
--- a/package/mtd/mtd.mk
+++ b/package/mtd/mtd.mk
@@ -116,14 +116,21 @@ MTD_TARGETS_$(BR2_PACKAGE_MTD_DOC_LOADBIOS) += doc_loadbios
MTD_BUILD_TARGETS := $(addprefix $(MTD_DIR)/util/, $(MTD_TARGETS_y))
$(MTD_BUILD_TARGETS): $(MTD_DIR)/.unpacked
- CFLAGS="-I$(LINUX_HEADERS_DIR)/include $(TARGET_CFLAGS)" \
- $(MAKE) CC=$(TARGET_CC) LINUXDIR=$(LINUX_DIR) -C $(MTD_DIR)/util
+ $(MAKE) CC=$(TARGET_CC) CFLAGS="-I$(LINUX_HEADERS_DIR)/include -I$(MTD_DIR)/include $(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" LINUXDIR=$(LINUX_DIR) -C $(MTD_DIR)/util
MTD_TARGETS := $(addprefix $(TARGET_DIR)/usr/sbin/, $(MTD_TARGETS_y))
$(MTD_TARGETS): $(TARGET_DIR)/usr/sbin/% : $(MTD_DIR)/util/%
+ mkdir -p $(TARGET_DIR)/usr/sbin
cp -f $< $@
$(STRIP) $@
+ifneq ($(BR2_PACKAGE_MTD_FLASHCP),)
+ -ln -sf flashcp $(TARGET_DIR)/usr/sbin/fcp
+endif
+ifneq ($(BR2_PACKAGE_MTD_ERASE),)
+ -ln -sf flash_erase $(TARGET_DIR)/usr/sbin/erase
+ -ln -sf flash_eraseall $(TARGET_DIR)/usr/sbin/eraseall
+endif
mtd: zlib $(MTD_TARGETS)
@@ -131,6 +138,13 @@ mtd-source: $(DL_DIR)/$(MTD_SOURCE)
mtd-clean:
-$(MAKE) -C $(MTD_DIR) clean
+ifneq ($(BR2_PACKAGE_MTD_FLASHCP),)
+ -rm -f $(MTD_TARGETS) $(TARGET_DIR)/usr/sbin/fcp
+endif
+ifneq ($(BR2_PACKAGE_MTD_ERASE),)
+ -rm -f $(MTD_TARGETS) $(TARGET_DIR)/usr/sbin/erase
+ -rm -f $(MTD_TARGETS) $(TARGET_DIR)/usr/sbin/eraseall
+endif
mtd-dirclean:
rm -rf $(MTD_DIR)