Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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:=10
  10. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  11. PKG_FLAGS:=nonshared
  12. include $(INCLUDE_DIR)/package.mk
  13. define Package/nvram
  14. SECTION:=utils
  15. CATEGORY:=Base system
  16. TITLE:=Userspace port of the Broadcom NVRAM manipulation tool
  17. MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
  18. DEPENDS:=@TARGET_brcm47xx||@TARGET_bcm53xx||@TARGET_ar71xx
  19. endef
  20. define Package/nvram/description
  21. This package contains an utility to manipulate NVRAM on Broadcom based devices.
  22. It works on bcm47xx (Linux 2.6) without using the kernel api.
  23. endef
  24. define Build/Configure
  25. endef
  26. define Build/Compile
  27. $(MAKE) -C $(PKG_BUILD_DIR) \
  28. CC="$(TARGET_CC)" \
  29. CFLAGS="$(TARGET_CFLAGS) -Wall" \
  30. LDFLAGS="$(TARGET_LDFLAGS)"
  31. endef
  32. define Package/nvram/install
  33. $(INSTALL_DIR) $(1)/usr/sbin
  34. $(INSTALL_BIN) $(PKG_BUILD_DIR)/nvram $(1)/usr/sbin/
  35. ifneq ($(CONFIG_TARGET_brcm47xx),)
  36. $(INSTALL_DIR) $(1)/etc/init.d
  37. $(INSTALL_BIN) ./files/nvram.init $(1)/etc/init.d/nvram
  38. endif
  39. endef
  40. $(eval $(call BuildPackage,nvram))