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
)/
65 -I
$(STAGING_DIR
)/usr
/include/libnl-tiny \
68 ifdef CONFIG_PACKAGE_kmod-wprobe
69 define Build
/Compile
/kmod
70 $(MAKE
) -C
$(LINUX_DIR
) \
71 CROSS_COMPILE
="$(KERNEL_CROSS)" \
72 ARCH
="$(LINUX_KARCH)" \
73 SUBDIRS
="$(PKG_BUILD_DIR)/kernel" \
74 KERNELDIR
=$(LINUX_DIR
) \
76 EXTRA_CFLAGS
="-I$(PKG_BUILD_DIR)/kernel" \
81 define Build
/Compile
/lib
82 $(MAKE
) -C
$(PKG_BUILD_DIR
)/user \
83 $(TARGET_CONFIGURE_OPTS
) \
84 CFLAGS
="$(TARGET_CFLAGS)" \
85 CPPFLAGS
="$(TARGET_CPPFLAGS) -I$(PKG_BUILD_DIR)/kernel" \
86 LDFLAGS
="$(TARGET_LDFLAGS)" \
91 ifdef CONFIG_PACKAGE_wprobe-export
92 define Build
/Compile
/exporter
93 $(MAKE
) -C
$(PKG_BUILD_DIR
)/exporter \
94 $(TARGET_CONFIGURE_OPTS
) \
95 CFLAGS
="$(TARGET_CFLAGS)" \
96 CPPFLAGS
="$(TARGET_CPPFLAGS) -I$(PKG_BUILD_DIR)/kernel -I$(PKG_BUILD_DIR)/user" \
97 LDFLAGS
="$(TARGET_LDFLAGS)" \
98 LIBS
="$(PKG_BUILD_DIR)/user/libwprobe.a $(STAGING_DIR)/usr/lib/libipfix.a $(STAGING_DIR)/usr/lib/libmisc.a -lnl-tiny -lm"
103 $(Build
/Compile
/kmod
)
105 $(Build
/Compile
/exporter
)
108 define Build
/InstallDev
109 $(INSTALL_DIR
) $(1)/usr
/include/wprobe
110 $(CP
) $(PKG_BUILD_DIR
)/kernel
/linux
$(1)/usr
/include/wprobe
113 define Package
/wprobe-util
/install
114 $(INSTALL_DIR
) $(1)/sbin
115 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/user
/wprobe-util
$(1)/sbin
/
118 define Package
/wprobe-export
/install
119 $(INSTALL_DIR
) $(1)/sbin
$(1)/etc
/init.d
$(1)/etc
/config
120 $(INSTALL_BIN
) .
/files
/wprobe.init
$(1)/etc
/init.d
/wprobe
121 $(INSTALL_BIN
) .
/files
/wprobe.config
$(1)/etc
/config
/wprobe
122 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/exporter
/wprobe-export
$(1)/sbin
/
125 $(eval
$(call KernelPackage
,wprobe
))
126 $(eval
$(call BuildPackage
,wprobe-util
))
127 $(eval
$(call BuildPackage
,wprobe-export
))