2 # Copyright (C) 2008-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
13 include $(INCLUDE_DIR
)/package.mk
14 include $(INCLUDE_DIR
)/kernel.mk
16 define Package
/swconfig
19 DEPENDS
:=@LINUX_2_6
+libuci
+libnl-tiny
20 TITLE
:=Switch configuration utility
25 -I
$(STAGING_DIR
)/usr
/include/libnl-tiny \
26 -I
$(LINUX_DIR
)/include \
31 mkdir
-p
$(PKG_BUILD_DIR
)
32 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
36 CFLAGS
="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
37 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
38 $(TARGET_CONFIGURE_OPTS
) \
39 LIBS
="$(TARGET_LDFLAGS) -lnl-tiny -lm -luci"
42 define Package
/swconfig
/install
43 $(INSTALL_DIR
) $(1)/sbin
$(1)/lib
/network
44 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/swconfig
$(1)/sbin
/swconfig
45 $(INSTALL_DATA
) .
/files
/switch.sh
$(1)/lib
/network
/
48 $(eval
$(call BuildPackage
,swconfig
))