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 Package
/wprobe
/Default
22 DEPENDS
:=@LINUX_2_6 @
(!(TARGET_ps3||TARGET_pxcab
)||BROKEN
)
25 define KernelPackage
/wprobe
26 $(call Package
/wprobe
/Default
)
27 SUBMENU
:=Network Support
28 TITLE
:=Wireless driver probe infrastructure
30 $(PKG_BUILD_DIR
)/kernel
/wprobe.
$(LINUX_KMOD_SUFFIX
)
31 AUTOLOAD
:=$(call AutoLoad
,01,wprobe
)
34 define KernelPackage
/wprobe
/description
35 A module that exports measurement data from wireless driver to user space
38 define Package
/wprobe-util
39 $(call Package
/wprobe
/Default
)
42 DEPENDS
+=+kmod-wprobe
+libnl-tiny
43 TITLE
:=Wireless measurement utility
46 define Package
/wprobe-util
/description
47 wprobe-util uses the wprobe kernel module to query
48 wireless driver measurement data from an interface
51 define Package
/wprobe-export
52 $(call Package
/wprobe
/Default
)
56 TITLE
:=Wireless measurement data exporter
59 define Package
/wprobe-export
/description
60 wprobe-export uses the wprobe kernel module to
export
61 wireless driver measurement data via the IPFIX protocol
65 mkdir
-p
$(PKG_BUILD_DIR
)
66 $(CP
) src
/* $(PKG_BUILD_DIR
)/
71 -I
$(STAGING_DIR
)/usr
/include/libnl-tiny \
74 ifdef CONFIG_PACKAGE_kmod-wprobe
75 define Build
/Compile
/kmod
76 $(MAKE
) -C
$(LINUX_DIR
) \
77 CROSS_COMPILE
="$(KERNEL_CROSS)" \
78 ARCH
="$(LINUX_KARCH)" \
79 SUBDIRS
="$(PKG_BUILD_DIR)/kernel" \
80 KERNELDIR
=$(LINUX_DIR
) \
82 EXTRA_CFLAGS
="-I$(PKG_BUILD_DIR)/kernel" \
87 define Build
/Compile
/lib
88 $(MAKE
) -C
$(PKG_BUILD_DIR
)/user \
89 $(TARGET_CONFIGURE_OPTS
) \
90 CFLAGS
="$(TARGET_CFLAGS)" \
91 CPPFLAGS
="$(TARGET_CPPFLAGS) -I$(PKG_BUILD_DIR)/kernel" \
92 LDFLAGS
="$(TARGET_LDFLAGS)" \
97 ifdef CONFIG_PACKAGE_wprobe-export
98 define Build
/Compile
/exporter
99 $(MAKE
) -C
$(PKG_BUILD_DIR
)/exporter \
100 $(TARGET_CONFIGURE_OPTS
) \
101 CFLAGS
="$(TARGET_CFLAGS)" \
102 CPPFLAGS
="$(TARGET_CPPFLAGS) -I$(PKG_BUILD_DIR)/kernel -I$(PKG_BUILD_DIR)/user" \
103 LDFLAGS
="$(TARGET_LDFLAGS)" \
104 LIBS
="$(PKG_BUILD_DIR)/user/libwprobe.a $(STAGING_DIR)/usr/lib/libipfix.a $(STAGING_DIR)/usr/lib/libmisc.a -lnl-tiny -lm"
109 $(Build
/Compile
/kmod
)
111 $(Build
/Compile
/exporter
)
114 define Build
/InstallDev
115 $(INSTALL_DIR
) $(1)/usr
/include/wprobe
116 $(CP
) $(PKG_BUILD_DIR
)/kernel
/linux
$(1)/usr
/include/wprobe
119 define Package
/wprobe-util
/install
120 $(INSTALL_DIR
) $(1)/sbin
121 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/user
/wprobe-util
$(1)/sbin
/
124 define Package
/wprobe-export
/install
125 $(INSTALL_DIR
) $(1)/sbin
$(1)/etc
/init.d
$(1)/etc
/config
126 $(INSTALL_BIN
) .
/files
/wprobe.init
$(1)/etc
/init.d
/wprobe
127 $(INSTALL_BIN
) .
/files
/wprobe.config
$(1)/etc
/config
/wprobe
128 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/exporter
/wprobe-export
$(1)/sbin
/
131 $(eval
$(call KernelPackage
,wprobe
))
132 $(eval
$(call BuildPackage
,wprobe-util
))
133 $(eval
$(call BuildPackage
,wprobe-export
))