developer | 0f54b52 | 2023-03-08 10:04:11 +0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2009-2013 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:=netfilter_flowtable |
| 11 | PKG_VERSION:=1.0 |
| 12 | PKG_RELEASE:=1 |
| 13 | |
| 14 | PKG_LICENSE:=GPL-2.0+ |
| 15 | #PKG_INSTALL:=1 |
| 16 | |
| 17 | include $(INCLUDE_DIR)/package.mk |
| 18 | |
| 19 | define Package/netfilter-flowtable |
| 20 | SECTION:=MTK Properties |
| 21 | CATEGORY:=MTK Properties |
| 22 | DEPENDS:=+libnfnetlink +libmnl +kmod-nf-flow-netlink |
| 23 | TITLE:=API to the in-kernel flow offload table |
| 24 | SUBMENU:=Applications |
| 25 | endef |
| 26 | |
| 27 | define Package/netfilter-flowtable/description |
| 28 | API to the in-kernel flow offload table |
| 29 | endef |
| 30 | |
| 31 | TARGET_CFLAGS += $(FPIC) |
| 32 | |
| 33 | TARGET_CPPFLAGS := \ |
| 34 | -D_GNU_SOURCE \ |
| 35 | -I$(LINUX_DIR)/user_headers/include \ |
| 36 | -I$(PKG_BUILD_DIR) \ |
| 37 | $(TARGET_CPPFLAGS) \ |
| 38 | |
| 39 | define Build/Compile |
| 40 | CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \ |
| 41 | $(MAKE) -C $(PKG_BUILD_DIR) \ |
| 42 | $(TARGET_CONFIGURE_OPTS) \ |
| 43 | LIBS="$(TARGET_LDFLAGS) -lnfnetlink -lm" |
| 44 | endef |
| 45 | |
| 46 | define Package/netfilter-flowtable/install |
| 47 | $(INSTALL_DIR) $(1)/usr/bin |
| 48 | $(CP) $(PKG_BUILD_DIR)/ftnl $(1)/usr/bin/ |
| 49 | endef |
| 50 | |
| 51 | $(eval $(call BuildPackage,netfilter-flowtable)) |