040d9535820be5aaba8c8babe24595bf1c81bde1
[openwrt/openwrt.git] / package / utils / nvram / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=nvram
11 PKG_RELEASE:=9
12
13 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
14 PKG_FLAGS:=nonshared
15
16 include $(INCLUDE_DIR)/package.mk
17
18 define Package/nvram
19 SECTION:=utils
20 CATEGORY:=Base system
21 TITLE:=Userspace port of the Broadcom NVRAM manipulation tool
22 MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
23 DEPENDS:=@TARGET_brcm47xx||@TARGET_bcm53xx||@TARGET_ar71xx
24 endef
25
26 define Package/nvram/description
27 This package contains an utility to manipulate NVRAM on Broadcom based devices.
28 It works on bcm47xx (Linux 2.6) without using the kernel api.
29 endef
30
31 define Build/Prepare
32 mkdir -p $(PKG_BUILD_DIR)
33 $(CP) ./src/* $(PKG_BUILD_DIR)/
34 endef
35
36 define Build/Configure
37 endef
38
39 define Build/Compile
40 $(MAKE) -C $(PKG_BUILD_DIR) \
41 CC="$(TARGET_CC)" \
42 CFLAGS="$(TARGET_CFLAGS) -Wall" \
43 LDFLAGS="$(TARGET_LDFLAGS)"
44 endef
45
46 define Package/nvram/install
47 $(INSTALL_DIR) $(1)/etc/init.d
48 $(INSTALL_BIN) ./files/nvram.init $(1)/etc/init.d/nvram
49 $(INSTALL_DIR) $(1)/usr/sbin
50 $(INSTALL_BIN) $(PKG_BUILD_DIR)/nvram $(1)/usr/sbin/
51 endef
52
53 $(eval $(call BuildPackage,nvram))