You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.1 KiB
50 lines
1.1 KiB
15 years ago
|
#
|
||
15 years ago
|
# Copyright (C) 2008-2010 OpenWrt.org
|
||
16 years ago
|
#
|
||
|
# This is free software, licensed under the GNU General Public License v2.
|
||
|
# See /LICENSE for more information.
|
||
|
#
|
||
|
|
||
|
include $(TOPDIR)/rules.mk
|
||
|
|
||
16 years ago
|
PKG_NAME:=swconfig
|
||
13 years ago
|
PKG_RELEASE:=10
|
||
16 years ago
|
|
||
12 years ago
|
PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
|
||
|
|
||
16 years ago
|
include $(INCLUDE_DIR)/package.mk
|
||
16 years ago
|
include $(INCLUDE_DIR)/kernel.mk
|
||
16 years ago
|
|
||
|
define Package/swconfig
|
||
|
SECTION:=base
|
||
|
CATEGORY:=Base system
|
||
15 years ago
|
DEPENDS:=@!TARGET_brcm47xx +libuci +libnl-tiny
|
||
16 years ago
|
TITLE:=Switch configuration utility
|
||
|
endef
|
||
|
|
||
16 years ago
|
TARGET_CPPFLAGS := \
|
||
15 years ago
|
-D_GNU_SOURCE \
|
||
16 years ago
|
-I$(STAGING_DIR)/usr/include/libnl-tiny \
|
||
|
-I$(PKG_BUILD_DIR) \
|
||
|
$(TARGET_CPPFLAGS)
|
||
16 years ago
|
|
||
|
define Build/Prepare
|
||
|
mkdir -p $(PKG_BUILD_DIR)
|
||
|
$(CP) ./src/* $(PKG_BUILD_DIR)/
|
||
|
endef
|
||
|
|
||
|
define Build/Compile
|
||
16 years ago
|
CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
|
||
16 years ago
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||
|
$(TARGET_CONFIGURE_OPTS) \
|
||
16 years ago
|
LIBS="$(TARGET_LDFLAGS) -lnl-tiny -lm -luci"
|
||
16 years ago
|
endef
|
||
|
|
||
|
define Package/swconfig/install
|
||
15 years ago
|
$(INSTALL_DIR) $(1)/sbin $(1)/lib/network
|
||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/swconfig $(1)/sbin/swconfig
|
||
16 years ago
|
$(INSTALL_DATA) ./files/switch.sh $(1)/lib/network/
|
||
16 years ago
|
endef
|
||
|
|
||
|
$(eval $(call BuildPackage,swconfig))
|