b2a163248a5d80f66c5f13aa337bbc12aadd3411
[openwrt/openwrt.git] / package / utils / admswconfig / Makefile
1 #
2 # Copyright (C) 2007 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:=admswconfig
11 PKG_VERSION:=0.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://downloads.openwrt.org/sources
16 PKG_HASH:=37b4409ea2105520b4a7327e53c3210251000ddf58f81a8e4c19e6ff9d615afe
17
18 PKG_FLAGS:=nonshared
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/admswconfig
23 SECTION:=utils
24 CATEGORY:=Utilities
25 TITLE:=ADM5120 Switch configuration tool
26 DEPENDS:=@TARGET_adm5120
27 MAINTAINER:=Florian Fainelli <florian@openwrt.org>
28 endef
29
30 define Package/admswconfig/description
31 A program to configure the internal ethernet switch of an ADM5120 processor.
32 You need the corresponding driver for the switch in the kernel.
33 With this program you can configure which ports of the switch belong
34 to the different ethernet devices.
35 endef
36
37 define Build/Configure
38 endef
39
40 define Build/Compile
41 $(TARGET_CC) $(TARGET_CFLAGS) -Os $(PKG_BUILD_DIR)/admswconfig.c -o $(PKG_BUILD_DIR)/$(PKG_NAME)
42 endef
43
44 define Package/admswconfig/install
45 $(INSTALL_DIR) $(1)/sbin
46 $(INSTALL_BIN) $(PKG_BUILD_DIR)/admswconfig $(1)/sbin/
47 $(INSTALL_DIR) $(1)/lib/network/
48 $(INSTALL_DATA) ./files/admswswitch.sh $(1)/lib/network/admswswitch.sh
49 $(INSTALL_DIR) $(1)/etc/init.d
50 $(INSTALL_BIN) ./files/admswconfig $(1)/etc/init.d/admswconfig
51 endef
52
53 $(eval $(call BuildPackage,admswconfig))