Makefile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #
  2. # Copyright (C) 2009 Jo-Philipp Wich <[email protected]>
  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:=5
  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. DEPENDS:=@TARGET_brcm_2_4||@TARGET_brcm47xx
  17. endef
  18. define Package/nvram/description
  19. This package contains an utility to manipulate NVRAM on Broadcom based devices.
  20. It works on both brcm-2.4 and bcm47xx (Linux 2.6) without using the kernel api.
  21. endef
  22. define Build/Prepare
  23. mkdir -p $(PKG_BUILD_DIR)
  24. $(CP) ./src/* $(PKG_BUILD_DIR)/
  25. endef
  26. define Build/Configure
  27. endef
  28. define Build/Compile
  29. $(MAKE) -C $(PKG_BUILD_DIR) \
  30. CC="$(TARGET_CC)" \
  31. CFLAGS="$(TARGET_CFLAGS) -Wall" \
  32. LDFLAGS="$(TARGET_LDFLAGS)"
  33. endef
  34. define Package/nvram/install
  35. $(INSTALL_DIR) $(1)/etc/init.d
  36. $(INSTALL_BIN) ./files/nvram.init $(1)/etc/init.d/nvram
  37. $(INSTALL_DIR) $(1)/usr/sbin
  38. $(INSTALL_BIN) $(PKG_BUILD_DIR)/nvram $(1)/usr/sbin/
  39. $(INSTALL_DIR) $(1)/usr/lib
  40. $(INSTALL_BIN) $(PKG_BUILD_DIR)/libnvram.so.0.1 $(1)/usr/lib/
  41. endef
  42. $(eval $(call BuildPackage,nvram))