-#
-# Linux router shared code Makefile
-#
-# Copyright 2001-2003, Broadcom Corporation
-# All Rights Reserved.
-#
-# THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
-# KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
-# SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
-# FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
-#
# $Id$
+
include $(TOPDIR)/rules.mk
PKG_NAME:=libnvram
$(PKG_BUILD_DIR):
mkdir -p $(PKG_BUILD_DIR)
-$(PKG_BUILD_DIR)/nvram: $(PKG_BUILD_DIR)/main.o
- $(TARGET_CC) $(TARGET_CFLAGS) -o $@ $^ -L$(PKG_BUILD_DIR) -lnvram
+$(PKG_BUILD_DIR)/nvram: $(PKG_BUILD_DIR)/main.o $(PKG_BUILD_DIR)/libnvram.so
+ $(TARGET_CC) $(TARGET_CFLAGS) -o $@ $< -L$(PKG_BUILD_DIR) -lnvram
$(PKG_BUILD_DIR)/libnvram.so: $(LIBNVRAM_OBJS)
$(TARGET_CC) -shared -o $@ $^
$(TARGET_DIR)/usr/sbin/nvram: $(PKG_BUILD_DIR)/nvram
mkdir -p $(TARGET_DIR)/usr/sbin
- install -m 644 $< $@
+ install -m 755 $< $@
$(STRIP) $@
compile: $(PKG_BUILD_DIR)/libnvram.so $(PKG_BUILD_DIR)/nvram