2 # Copyright (C) 2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
8 include $(INCLUDE_DIR
)/kernel.mk
13 PKG_BUILD_DEPENDS
:=PACKAGE_wprobe-export
:libipfix
15 PKG_CONFIG_DEPENDS
= \
16 CONFIG_PACKAGE_kmod-wprobe \
17 CONFIG_PACKAGE_wprobe-export \
19 include $(INCLUDE_DIR
)/package.mk
21 define KernelPackage
/wprobe
22 SUBMENU
:=Network Support
24 TITLE
:=Wireless driver probe infrastructure
26 $(PKG_BUILD_DIR
)/kernel
/wprobe.
$(LINUX_KMOD_SUFFIX
)
27 AUTOLOAD
:=$(call AutoLoad
,01,wprobe
)
30 define KernelPackage
/wprobe
/description
31 A module that exports measurement data from wireless driver to user space
34 define Package
/wprobe-util
37 DEPENDS
:=+kmod-wprobe
+libnl-tiny
38 TITLE
:=Wireless measurement utility
41 define Package
/wprobe-util
/description
42 wprobe-util uses the wprobe kernel module to query
43 wireless driver measurement data from an interface
46 define Package
/wprobe-export
50 TITLE
:=Wireless measurement data exporter
53 define Package
/wprobe-export
/description
54 wprobe-export uses the wprobe kernel module to
export
55 wireless driver measurement data via the IPFIX protocol
59 mkdir
-p
$(PKG_BUILD_DIR
)
60 $(CP
) src
/* $(PKG_BUILD_DIR
)/
64 -I
$(STAGING_DIR
)/usr
/include/libnl-tiny \
67 ifdef CONFIG_PACKAGE_kmod-wprobe
68 define Build
/Compile
/kmod
69 $(MAKE
) -C
$(LINUX_DIR
) \
70 CROSS_COMPILE
="$(KERNEL_CROSS)" \
71 ARCH
="$(LINUX_KARCH)" \
72 SUBDIRS
="$(PKG_BUILD_DIR)/kernel" \
73 KERNELDIR
=$(LINUX_DIR
) \
75 EXTRA_CFLAGS
="-I$(PKG_BUILD_DIR)/kernel" \
80 define Build
/Compile
/lib
81 $(MAKE
) -C
$(PKG_BUILD_DIR
)/user \
82 $(TARGET_CONFIGURE_OPTS
) \
83 CFLAGS
="$(TARGET_CFLAGS)" \
84 CPPFLAGS
="$(TARGET_CPPFLAGS) -I$(PKG_BUILD_DIR)/kernel" \
85 LDFLAGS
="$(TARGET_LDFLAGS)" \
90 ifdef CONFIG_PACKAGE_wprobe-export
91 define Build
/Compile
/exporter
92 $(MAKE
) -C
$(PKG_BUILD_DIR
)/exporter \
93 $(TARGET_CONFIGURE_OPTS
) \
94 CFLAGS
="$(TARGET_CFLAGS)" \
95 CPPFLAGS
="$(TARGET_CPPFLAGS) -I$(PKG_BUILD_DIR)/kernel -I$(PKG_BUILD_DIR)/user" \
96 LDFLAGS
="$(TARGET_LDFLAGS)" \
97 LIBS
="$(PKG_BUILD_DIR)/user/libwprobe.a $(STAGING_DIR)/usr/lib/libipfix.a $(STAGING_DIR)/usr/lib/libmisc.a -lnl-tiny -lm"
102 $(Build
/Compile
/kmod
)
104 $(Build
/Compile
/exporter
)
107 define Build
/InstallDev
108 $(INSTALL_DIR
) $(1)/usr
/include/wprobe
109 $(CP
) $(PKG_BUILD_DIR
)/kernel
/linux
$(1)/usr
/include/wprobe
112 define Package
/wprobe-util
/install
113 $(INSTALL_DIR
) $(1)/sbin
114 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/user
/wprobe-util
$(1)/sbin
/
117 define Package
/wprobe-export
/install
118 $(INSTALL_DIR
) $(1)/sbin
$(1)/etc
/init.d
$(1)/etc
/config
119 $(INSTALL_BIN
) .
/files
/wprobe.init
$(1)/etc
/init.d
/wprobe
120 $(INSTALL_BIN
) .
/files
/wprobe.config
$(1)/etc
/config
/wprobe
121 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/exporter
/wprobe-export
$(1)/sbin
/
124 $(eval
$(call KernelPackage
,wprobe
))
125 $(eval
$(call BuildPackage
,wprobe-util
))
126 $(eval
$(call BuildPackage
,wprobe-export
))