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 # XXX: build failure on cris
22 # wprobe-lib.c:145: error: 'packed' attribute ignored for field of type 'struct <anonymous>'
23 # wprobe-lib.c:149: error: 'packed' attribute ignored for field of type 'struct <anonymous>'
25 define Package
/wprobe
/Default
26 DEPENDS
:=@LINUX_2_6 @
(!(TARGET_ps3||TARGET_pxcab||cris
)||BROKEN
)
29 define KernelPackage
/wprobe
30 $(call Package
/wprobe
/Default
)
31 SUBMENU
:=Network Support
32 TITLE
:=Wireless driver probe infrastructure
34 $(PKG_BUILD_DIR
)/kernel
/wprobe.
$(LINUX_KMOD_SUFFIX
)
35 AUTOLOAD
:=$(call AutoLoad
,01,wprobe
)
38 define KernelPackage
/wprobe
/description
39 A module that exports measurement data from wireless driver to user space
42 define Package
/wprobe-util
43 $(call Package
/wprobe
/Default
)
46 DEPENDS
+=+kmod-wprobe
+libnl-tiny
47 TITLE
:=Wireless measurement utility
50 define Package
/wprobe-util
/description
51 wprobe-util uses the wprobe kernel module to query
52 wireless driver measurement data from an interface
55 define Package
/wprobe-export
56 $(call Package
/wprobe
/Default
)
60 TITLE
:=Wireless measurement data exporter
63 define Package
/wprobe-export
/description
64 wprobe-export uses the wprobe kernel module to
export
65 wireless driver measurement data via the IPFIX protocol
69 mkdir
-p
$(PKG_BUILD_DIR
)
70 $(CP
) src
/* $(PKG_BUILD_DIR
)/
75 -I
$(STAGING_DIR
)/usr
/include/libnl-tiny \
78 ifdef CONFIG_PACKAGE_kmod-wprobe
79 define Build
/Compile
/kmod
80 $(MAKE
) -C
$(LINUX_DIR
) \
81 CROSS_COMPILE
="$(KERNEL_CROSS)" \
82 ARCH
="$(LINUX_KARCH)" \
83 SUBDIRS
="$(PKG_BUILD_DIR)/kernel" \
84 KERNELDIR
=$(LINUX_DIR
) \
86 EXTRA_CFLAGS
="-I$(PKG_BUILD_DIR)/kernel" \
91 define Build
/Compile
/lib
92 $(MAKE
) -C
$(PKG_BUILD_DIR
)/user \
93 $(TARGET_CONFIGURE_OPTS
) \
94 CFLAGS
="$(TARGET_CFLAGS)" \
95 CPPFLAGS
="$(TARGET_CPPFLAGS) -I$(PKG_BUILD_DIR)/kernel" \
96 LDFLAGS
="$(TARGET_LDFLAGS)" \
101 ifdef CONFIG_PACKAGE_wprobe-export
102 define Build
/Compile
/exporter
103 $(MAKE
) -C
$(PKG_BUILD_DIR
)/exporter \
104 $(TARGET_CONFIGURE_OPTS
) \
105 CFLAGS
="$(TARGET_CFLAGS)" \
106 CPPFLAGS
="$(TARGET_CPPFLAGS) -I$(PKG_BUILD_DIR)/kernel -I$(PKG_BUILD_DIR)/user" \
107 LDFLAGS
="$(TARGET_LDFLAGS)" \
108 LIBS
="$(PKG_BUILD_DIR)/user/libwprobe.a $(STAGING_DIR)/usr/lib/libipfix.a $(STAGING_DIR)/usr/lib/libmisc.a -lnl-tiny -lm"
113 $(Build
/Compile
/kmod
)
115 $(Build
/Compile
/exporter
)
118 define Build
/InstallDev
119 $(INSTALL_DIR
) $(1)/usr
/include/wprobe
120 $(CP
) $(PKG_BUILD_DIR
)/kernel
/linux
$(1)/usr
/include/wprobe
123 define Package
/wprobe-util
/install
124 $(INSTALL_DIR
) $(1)/sbin
125 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/user
/wprobe-util
$(1)/sbin
/
128 define Package
/wprobe-export
/install
129 $(INSTALL_DIR
) $(1)/sbin
$(1)/etc
/init.d
$(1)/etc
/config
130 $(INSTALL_BIN
) .
/files
/wprobe.init
$(1)/etc
/init.d
/wprobe
131 $(INSTALL_BIN
) .
/files
/wprobe.config
$(1)/etc
/config
/wprobe
132 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/exporter
/wprobe-export
$(1)/sbin
/
135 $(eval
$(call KernelPackage
,wprobe
))
136 $(eval
$(call BuildPackage
,wprobe-util
))
137 $(eval
$(call BuildPackage
,wprobe-export
))