summaryrefslogtreecommitdiff
path: root/package/ramips/applications/hwnat/Makefile
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2018-09-16 20:17:57 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2018-09-16 20:17:57 +0200
commit85bdc5b94c8a1730d3077f361297028cfd8b9b78 (patch)
treea6835c355fde8ce9f36c808dbb9b50809d3c77f4 /package/ramips/applications/hwnat/Makefile
parent6e0004f572f23810c21d5fb4477d8b9347dffdbb (diff)
downloadmtk-20170518-mtk-20170518.zip
mtk-20170518-mtk-20170518.tar.gz
mtk-20170518-mtk-20170518.tar.bz2
MTK mt76 hwnat implementationHEADmtk-20170518
Diffstat (limited to 'package/ramips/applications/hwnat/Makefile')
-rwxr-xr-xpackage/ramips/applications/hwnat/Makefile62
1 files changed, 62 insertions, 0 deletions
diff --git a/package/ramips/applications/hwnat/Makefile b/package/ramips/applications/hwnat/Makefile
new file mode 100755
index 0000000..77a2ead
--- /dev/null
+++ b/package/ramips/applications/hwnat/Makefile
@@ -0,0 +1,62 @@
+#
+# hua.shao@mediatek.com
+#
+# MTK Property Software.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=hwnat
+PKG_RELEASE:=4200
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
+PKG_KCONFIG:=RALINK_MT7620 RALINK_MT7621 RALINK_MT7628 RALINK_MT7623 HNAT_V2
+PKG_CONFIG_DEPENDS:=$(foreach c, $(PKG_KCONFIG),$(if $(CONFIG_$c),CONFIG_$(c)))
+
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+define Package/hwnat
+ SECTION:=MTK Properties
+ CATEGORY:=MTK Properties
+ TITLE:=Hardware NAT command
+ DEPENDS:=@PACKAGE_kmod-hw_nat
+ SUBMENU:=Applications
+endef
+
+define Package/hwnat/description
+ An program to query info from hwnat driver
+endef
+
+define Build/Prepare
+ mkdir -p $(PKG_BUILD_DIR)
+ $(CP) ./src/* $(PKG_BUILD_DIR)/
+endef
+
+TARGET_CFLAGS += \
+ -I$(LINUX_DIR)/include \
+ -I$(LINUX_DIR)/arch/mips/include \
+ -I$(LINUX_DIR)/net/nat/hw_nat/ \
+ $(foreach c, $(PKG_KCONFIG),$(if $(CONFIG_$c),-DCONFIG_$(c)=$(CONFIG_$c)))
+
+MAKE_FLAGS += \
+ CFLAGS="$(TARGET_CFLAGS)"
+
+
+define Build/Configure
+endef
+
+define Package/hwnat/install
+ $(INSTALL_DIR) $(1)/bin
+ $(INSTALL_DIR) $(1)/etc/init.d/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ac $(1)/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/acl $(1)/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwnat $(1)/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/mtr $(1)/bin
+ $(INSTALL_BIN) ./files/* $(1)/etc/init.d
+endef
+
+
+$(eval $(call BuildPackage,hwnat))
+