developer | e5e687d | 2023-08-08 16:05:33 +0800 | [diff] [blame^] | 1 | # 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 | |
| 7 | include $(TOPDIR)/rules.mk |
| 8 | |
| 9 | PKG_NAME:=tops-tool |
| 10 | PKG_RELEASE:=1 |
| 11 | |
| 12 | include $(INCLUDE_DIR)/package.mk |
| 13 | include $(INCLUDE_DIR)/package-defaults.mk |
| 14 | |
| 15 | define 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 |
| 22 | endef |
| 23 | |
| 24 | define Package/tops-tool/description |
| 25 | Mediatek Tunnel Offload Processor System User Tool |
| 26 | endef |
| 27 | |
| 28 | TARGET_CFLAGS += \ |
| 29 | -I$(PKG_BUILD_DIR)/inc |
| 30 | |
| 31 | define Build/Compile |
| 32 | $(MAKE) -C $(PKG_BUILD_DIR) \ |
| 33 | CC="$(TARGET_CC)" \ |
| 34 | CFLAGS="$(TARGET_CFLAGS) -Wall -Wextra" \ |
| 35 | LDFLAGS="$(TARGET_LDFLAGS)" |
| 36 | endef |
| 37 | |
| 38 | define 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 |
| 44 | endef |
| 45 | |
| 46 | $(eval $(call BuildPackage,tops-tool)) |