You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.4 KiB

  1. #
  2. # Copyright (C) 2017 Banglang Huang
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=pf-ring
  10. PKG_VERSION:=7.4.0
  11. PKG_RELEASE:=1
  12. PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
  13. PKG_LICENSE:=GPL-2.0-only
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  15. PKG_SOURCE_URL:=https://codeload.github.com/ntop/PF_RING/tar.gz/$(PKG_VERSION)?
  16. PKG_HASH:=e1c9cb44d8072854220f493c56fa5cba99a6b8336883939dc18b3e30c2954b68
  17. PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/PF_RING-$(PKG_VERSION)
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. CONFIGURE_PATH:=kernel
  22. MAKE_PATH:=kernel
  23. define KernelPackage/pf-ring
  24. SUBMENU:=Network Support
  25. TITLE:=PF_RING Kernel driver
  26. FILES:=$(PKG_BUILD_DIR)/kernel/pf_ring.ko
  27. AUTOLOAD:=$(call AutoLoad,90,pf_ring,1)
  28. endef
  29. define KernelPackage/pf-ring/description
  30. Kernel module for libpf-ring package
  31. endef
  32. EXTRA_CFLAGS += \
  33. -I$(PKG_BUILD_DIR)/kernel
  34. MAKE_OPTS := \
  35. ARCH="$(LINUX_KARCH)" \
  36. CROSS_COMPILE="$(TARGET_CROSS)" \
  37. SUBDIRS="$(PKG_BUILD_DIR)/kernel" \
  38. CFLAGS="$(TARGET_CFLAGS)" \
  39. EXTRA_CFLAGS="$(EXTRA_CFLAGS)"
  40. define Build/InstallDev
  41. $(INSTALL_DIR) $(1)/usr/include/linux
  42. $(CP) $(PKG_INSTALL_DIR)/usr/include/linux/*.h $(1)/usr/include/linux
  43. endef
  44. define Build/Compile
  45. +$(MAKE) -C "$(LINUX_DIR)" \
  46. $(MAKE_OPTS) \
  47. modules
  48. endef
  49. $(eval $(call KernelPackage,pf-ring))