Makefile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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/Prepare
  25. mkdir -p $(PKG_BUILD_DIR)
  26. $(CP) ./src/* $(PKG_BUILD_DIR)/
  27. endef
  28. define Build/Configure
  29. endef
  30. define Build/Compile
  31. $(MAKE) -C $(PKG_BUILD_DIR) \
  32. CC="$(TARGET_CC)" \
  33. CFLAGS="$(TARGET_CFLAGS) -Wall" \
  34. LDFLAGS="$(TARGET_LDFLAGS)"
  35. endef
  36. define Package/nvram/install
  37. $(INSTALL_DIR) $(1)/usr/sbin
  38. $(INSTALL_BIN) $(PKG_BUILD_DIR)/nvram $(1)/usr/sbin/
  39. ifneq ($(CONFIG_TARGET_brcm47xx),)
  40. $(INSTALL_DIR) $(1)/etc/init.d
  41. $(INSTALL_BIN) ./files/nvram.init $(1)/etc/init.d/nvram
  42. endif
  43. endef
  44. $(eval $(call BuildPackage,nvram))