2005-07-21 00:27:08 +00:00
|
|
|
# $Id$
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME := mtd
|
2005-09-14 15:30:53 +00:00
|
|
|
PKG_RELEASE := 2
|
2005-07-21 00:27:08 +00:00
|
|
|
|
|
|
|
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
|
|
|
|
|
|
|
include $(TOPDIR)/package/rules.mk
|
|
|
|
|
|
|
|
$(eval $(call PKG_template,MTD,$(PKG_NAME),$(PKG_RELEASE),$(ARCH)))
|
2005-09-14 15:30:53 +00:00
|
|
|
$(eval $(call PKG_template,MTD_STATIC,mtd-static,$(PKG_RELEASE),$(ARCH)))
|
2005-07-21 00:27:08 +00:00
|
|
|
|
|
|
|
$(PKG_BUILD_DIR)/.prepared:
|
2005-11-07 18:12:11 +00:00
|
|
|
mkdir -p $(PKG_BUILD_DIR)
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(PKG_BUILD_DIR)/.configured:
|
2005-07-21 00:27:08 +00:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(PKG_BUILD_DIR)/.built:
|
2005-09-04 00:13:34 +00:00
|
|
|
$(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/mtd mtd.c
|
2005-09-14 15:30:53 +00:00
|
|
|
$(TARGET_CC) -static $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/mtd-static mtd.c
|
2005-07-21 00:27:08 +00:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(IPKG_MTD):
|
|
|
|
install -d -m0755 $(IDIR_MTD)/sbin
|
|
|
|
install -m0755 $(PKG_BUILD_DIR)/mtd $(IDIR_MTD)/sbin
|
2005-07-21 11:33:05 +00:00
|
|
|
$(RSTRIP) $(IDIR_MTD)/sbin/*
|
2005-07-21 00:27:08 +00:00
|
|
|
$(IPKG_BUILD) $(IDIR_MTD) $(PACKAGE_DIR)
|
2005-09-14 15:30:53 +00:00
|
|
|
|
|
|
|
$(IPKG_MTD_STATIC):
|
|
|
|
install -d -m0755 $(IDIR_MTD_STATIC)/sbin
|
|
|
|
install -m0755 $(PKG_BUILD_DIR)/mtd-static $(IDIR_MTD_STATIC)/sbin
|
|
|
|
$(RSTRIP) $(IDIR_MTD_STATIC)/sbin/*
|
|
|
|
$(IPKG_BUILD) $(IDIR_MTD_STATIC) $(PACKAGE_DIR)
|