blob: 621c4cde6b796d92e2a31915cea9904e66457065 [file] [log] [blame]
developere5e687d2023-08-08 16:05:33 +08001# SPDX-License-Identifier: GPL-2.0-or-later
2#
3# Copyright (C) 2023 Mediatek Inc. All Rights Reserved.
4# Author: Alvin Kuo <alvin.kuo@mediatek.com>
5#
6
7include $(TOPDIR)/rules.mk
8
9PKG_NAME:=tops-tool
10PKG_RELEASE:=1
11
12include $(INCLUDE_DIR)/package.mk
13include $(INCLUDE_DIR)/package-defaults.mk
14
15define Package/tops-tool
16 TITLE:=Mediatek Tunnel Offload Processor System User Tool
17 SECTION:=MTK Properties
18 CATEGORY:=MTK Properties
19 DEFAULT:=y
20 SUBMENU:=Applications
21 DEPENDS:=kmod-tops
22endef
23
24define Package/tops-tool/description
25 Mediatek Tunnel Offload Processor System User Tool
26endef
27
28TARGET_CFLAGS += \
29 -I$(PKG_BUILD_DIR)/inc
30
31define Build/Compile
32 $(MAKE) -C $(PKG_BUILD_DIR) \
33 CC="$(TARGET_CC)" \
34 CFLAGS="$(TARGET_CFLAGS) -Wall -Wextra" \
35 LDFLAGS="$(TARGET_LDFLAGS)"
36endef
37
38define Package/tops-tool/install
39 $(INSTALL_DIR) $(1)/usr/sbin
40 $(INSTALL_BIN) $(PKG_BUILD_DIR)/tops-tool $(1)/usr/sbin/
41
42 $(INSTALL_DIR) $(1)/etc/init.d
43 $(INSTALL_BIN) ./files/tops-tool.init $(1)/etc/init.d/tops-tool
44endef
45
46$(eval $(call BuildPackage,tops-tool))