[tools] fix segfault when using the maxlen argument (#4359)
[openwrt.git] / package / swconfig / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.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:=swconfig
11 PKG_RELEASE:=1
12
13 include $(INCLUDE_DIR)/package.mk
14 include $(INCLUDE_DIR)/kernel.mk
15
16 define Package/swconfig
17 SECTION:=base
18 CATEGORY:=Base system
19 DEPENDS:=@LINUX_2_6 +libuci +libnl-tiny
20 TITLE:=Switch configuration utility
21 endef
22
23 TARGET_CPPFLAGS := \
24 -I$(STAGING_DIR)/usr/include/libnl-tiny \
25 -I$(LINUX_DIR)/include \
26 -I$(PKG_BUILD_DIR) \
27 $(TARGET_CPPFLAGS)
28
29 define Build/Prepare
30 mkdir -p $(PKG_BUILD_DIR)
31 $(CP) ./src/* $(PKG_BUILD_DIR)/
32 endef
33
34 define Build/Compile
35 CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
36 $(MAKE) -C $(PKG_BUILD_DIR) \
37 $(TARGET_CONFIGURE_OPTS) \
38 LIBS="$(TARGET_LDFLAGS) -lnl-tiny -lm -luci"
39 endef
40
41 define Package/swconfig/install
42 $(INSTALL_DIR) $(1)/bin $(1)/lib/network
43 $(INSTALL_BIN) $(PKG_BUILD_DIR)/swconfig $(1)/bin/swconfig
44 $(INSTALL_DATA) ./files/switch.sh $(1)/lib/network/
45 endef
46
47 $(eval $(call BuildPackage,swconfig))
This page took 0.039263 seconds and 5 git commands to generate.