Makefile 953 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #
  2. # Copyright (C) 2006 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. # $Id$
  8. include $(TOPDIR)/rules.mk
  9. include $(INCLUDE_DIR)/kernel.mk
  10. PKG_NAME:=mtd
  11. PKG_RELEASE:=4
  12. PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/$(PKG_NAME)
  13. include $(INCLUDE_DIR)/package.mk
  14. define Package/mtd
  15. SECTION:=utils
  16. CATEGORY:=Base system
  17. DEFAULT:=y
  18. TITLE:=Update utility for trx firmware images
  19. DESCRIPTION:=\
  20. This package contains an utility useful to upgrade from other firmware or \\\
  21. older OpenWrt releases.
  22. endef
  23. define Build/Prepare
  24. mkdir -p $(PKG_BUILD_DIR)
  25. $(CP) ./src/* $(PKG_BUILD_DIR)/
  26. endef
  27. define Build/Compile
  28. $(MAKE) -C $(PKG_BUILD_DIR) \
  29. $(TARGET_CONFIGURE_OPTS) \
  30. CFLAGS="$(TARGET_CFLAGS) -Dtarget_$(BOARD)=1"
  31. endef
  32. define Package/mtd/install
  33. install -d -m0755 $(1)/sbin
  34. install -m0755 $(PKG_BUILD_DIR)/mtd $(1)/sbin/
  35. endef
  36. $(eval $(call BuildPackage,mtd))