blob: 0eb3d7ea33219145318c36c0bef38369a6a4b068 [file] [log] [blame]
developerfd40db22021-04-29 10:08:25 +08001#
2# hua.shao@mediatek.com
3#
4# MTK Property Software.
5#
6
7include $(TOPDIR)/rules.mk
8
9PKG_NAME:=switch
10PKG_RELEASE:=1
11
12PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
13include $(INCLUDE_DIR)/package.mk
14include $(INCLUDE_DIR)/kernel.mk
15
16define Package/switch
17 SECTION:=MTK Properties
18 CATEGORY:=MTK Properties
19 DEPENDS:=+libnl-tiny
20 TITLE:=Command to config switch
21 SUBMENU:=Applications
22endef
23
24define Package/switch/description
25 An program to config switch.
26endef
27
28TARGET_CPPFLAGS := \
29 -D_GNU_SOURCE \
30 -I$(LINUX_DIR)/user_headers/include \
31 -I$(STAGING_DIR)/usr/include/libnl-tiny \
32 -I$(PKG_BUILD_DIR) \
33 $(TARGET_CPPFLAGS) \
34
35define Build/Compile
36 CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
37 $(MAKE) -C $(PKG_BUILD_DIR) \
38 $(TARGET_CONFIGURE_OPTS) \
39 LIBS="$(TARGET_LDFLAGS) -lnl-tiny -lm"
40endef
41
42define Package/switch/install
43 $(INSTALL_DIR) $(1)/usr/sbin
44 $(INSTALL_DIR) $(1)/lib/network
45 $(INSTALL_BIN) $(PKG_BUILD_DIR)/switch $(1)/usr/sbin
46endef
47
48$(eval $(call BuildPackage,switch))