Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #
  2. # Copyright (C) 2009-2010 Jo-Philipp Wich <xm@subsignal.org>
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=nvram
  9. PKG_RELEASE:=9
  10. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  11. include $(INCLUDE_DIR)/package.mk
  12. define Package/nvram
  13. SECTION:=utils
  14. CATEGORY:=Base system
  15. TITLE:=Userspace port of the Broadcom NVRAM manipulation tool
  16. MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
  17. DEPENDS:=@TARGET_brcm47xx||@TARGET_bcm53xx||@TARGET_ar71xx
  18. endef
  19. define Package/nvram/description
  20. This package contains an utility to manipulate NVRAM on Broadcom based devices.
  21. It works on bcm47xx (Linux 2.6) without using the kernel api.
  22. endef
  23. define Build/Prepare
  24. mkdir -p $(PKG_BUILD_DIR)
  25. $(CP) ./src/* $(PKG_BUILD_DIR)/
  26. endef
  27. define Build/Configure
  28. endef
  29. define Build/Compile
  30. $(MAKE) -C $(PKG_BUILD_DIR) \
  31. CC="$(TARGET_CC)" \
  32. CFLAGS="$(TARGET_CFLAGS) -Wall" \
  33. LDFLAGS="$(TARGET_LDFLAGS)"
  34. endef
  35. define Package/nvram/install
  36. $(INSTALL_DIR) $(1)/etc/init.d
  37. $(INSTALL_BIN) ./files/nvram.init $(1)/etc/init.d/nvram
  38. $(INSTALL_DIR) $(1)/usr/sbin
  39. $(INSTALL_BIN) $(PKG_BUILD_DIR)/nvram $(1)/usr/sbin/
  40. endef
  41. $(eval $(call BuildPackage,nvram))