2009-03-26 20:56:47 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2008 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
|
|
|
|
PKG_NAME:=wprobe
|
|
|
|
PKG_VERSION:=1
|
|
|
|
|
2009-05-06 11:51:16 +00:00
|
|
|
PKG_BUILD_DEPENDS:=PACKAGE_wprobe-export:libipfix
|
2009-03-26 20:56:47 +00:00
|
|
|
|
2009-04-27 15:53:00 +00:00
|
|
|
PKG_CONFIG_DEPENDS = \
|
2009-04-06 09:56:34 +00:00
|
|
|
CONFIG_PACKAGE_kmod-wprobe \
|
2009-04-27 15:53:00 +00:00
|
|
|
CONFIG_PACKAGE_wprobe-export \
|
2009-04-06 09:56:34 +00:00
|
|
|
|
2009-04-27 15:53:00 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2009-04-06 09:56:34 +00:00
|
|
|
|
2009-03-26 20:56:47 +00:00
|
|
|
define KernelPackage/wprobe
|
|
|
|
SUBMENU:=Network Support
|
|
|
|
TITLE:=Wireless driver probe infrastructure
|
|
|
|
FILES:= \
|
|
|
|
$(PKG_BUILD_DIR)/kernel/wprobe.$(LINUX_KMOD_SUFFIX)
|
|
|
|
AUTOLOAD:=$(call AutoLoad,01,wprobe)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define KernelPackage/wprobe/description
|
|
|
|
A module that exports measurement data from wireless driver to user space
|
|
|
|
endef
|
|
|
|
|
2009-07-06 19:05:24 +00:00
|
|
|
define Package/wprobe-util
|
2009-03-26 20:56:47 +00:00
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
2009-05-06 11:51:16 +00:00
|
|
|
DEPENDS:=+kmod-wprobe +libnl-tiny
|
2009-03-26 20:56:47 +00:00
|
|
|
TITLE:=Wireless measurement utility
|
|
|
|
endef
|
|
|
|
|
2009-07-06 19:05:24 +00:00
|
|
|
define Package/wprobe-util/description
|
|
|
|
wprobe-util uses the wprobe kernel module to query
|
2009-03-26 20:56:47 +00:00
|
|
|
wireless driver measurement data from an interface
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/wprobe-export
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
2009-07-06 19:05:24 +00:00
|
|
|
DEPENDS:=+wprobe-util
|
2009-03-26 20:56:47 +00:00
|
|
|
TITLE:=Wireless measurement data exporter
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/wprobe-export/description
|
|
|
|
wprobe-export uses the wprobe kernel module to export
|
|
|
|
wireless driver measurement data via the IPFIX protocol
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Prepare
|
|
|
|
mkdir -p $(PKG_BUILD_DIR)
|
|
|
|
$(CP) src/* $(PKG_BUILD_DIR)/
|
|
|
|
endef
|
|
|
|
|
2009-05-06 13:54:42 +00:00
|
|
|
TARGET_CPPFLAGS := \
|
2009-05-06 11:51:16 +00:00
|
|
|
-I$(STAGING_DIR)/usr/include/libnl-tiny \
|
2009-05-06 13:54:42 +00:00
|
|
|
$(TARGET_CPPFLAGS)
|
2009-03-26 20:56:47 +00:00
|
|
|
|
2009-04-06 09:56:34 +00:00
|
|
|
ifdef CONFIG_PACKAGE_kmod-wprobe
|
|
|
|
define Build/Compile/kmod
|
2009-03-26 20:56:47 +00:00
|
|
|
$(MAKE) -C $(LINUX_DIR) \
|
|
|
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
|
|
|
ARCH="$(LINUX_KARCH)" \
|
|
|
|
SUBDIRS="$(PKG_BUILD_DIR)/kernel" \
|
|
|
|
KERNELDIR=$(LINUX_DIR) \
|
|
|
|
CC="$(TARGET_CC)" \
|
|
|
|
EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/kernel" \
|
|
|
|
modules
|
2009-04-06 09:56:34 +00:00
|
|
|
endef
|
|
|
|
endif
|
2009-03-26 20:56:47 +00:00
|
|
|
|
|
|
|
define Build/Compile/lib
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR)/user \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PKG_BUILD_DIR)/kernel" \
|
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
2009-07-06 19:05:24 +00:00
|
|
|
HOST_OS=Linux \
|
2009-05-06 11:51:16 +00:00
|
|
|
LIBNL="-lnl-tiny"
|
2009-03-26 20:56:47 +00:00
|
|
|
endef
|
|
|
|
|
2009-04-06 09:56:34 +00:00
|
|
|
ifdef CONFIG_PACKAGE_wprobe-export
|
|
|
|
define Build/Compile/exporter
|
2009-03-26 20:56:47 +00:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR)/exporter \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PKG_BUILD_DIR)/kernel -I$(PKG_BUILD_DIR)/user" \
|
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
2009-05-06 11:51:16 +00:00
|
|
|
LIBS="$(PKG_BUILD_DIR)/user/libwprobe.a $(STAGING_DIR)/usr/lib/libipfix.a $(STAGING_DIR)/usr/lib/libmisc.a -lnl-tiny -lm"
|
2009-04-06 09:56:34 +00:00
|
|
|
endef
|
|
|
|
endif
|
2009-03-26 20:56:47 +00:00
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
$(Build/Compile/kmod)
|
|
|
|
$(Build/Compile/lib)
|
|
|
|
$(Build/Compile/exporter)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/InstallDev
|
2009-04-23 14:55:11 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/include/wprobe
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/kernel/linux $(1)/usr/include/wprobe
|
2009-03-26 20:56:47 +00:00
|
|
|
endef
|
|
|
|
|
2009-07-06 19:05:24 +00:00
|
|
|
define Package/wprobe-util/install
|
2009-03-26 20:56:47 +00:00
|
|
|
$(INSTALL_DIR) $(1)/sbin
|
2009-07-06 19:05:24 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/user/wprobe-util $(1)/sbin/
|
2009-03-26 20:56:47 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/wprobe-export/install
|
2009-06-10 14:37:36 +00:00
|
|
|
$(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d $(1)/etc/config
|
2009-03-29 05:01:25 +00:00
|
|
|
$(INSTALL_BIN) ./files/wprobe.init $(1)/etc/init.d/
|
2009-06-10 14:37:36 +00:00
|
|
|
$(INSTALL_BIN) ./files/wprobe.config $(1)/etc/config/wprobe
|
2009-03-26 20:56:47 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/exporter/wprobe-export $(1)/sbin/
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call KernelPackage,wprobe))
|
2009-07-06 19:05:24 +00:00
|
|
|
$(eval $(call BuildPackage,wprobe-util))
|
2009-03-26 20:56:47 +00:00
|
|
|
$(eval $(call BuildPackage,wprobe-export))
|