add wireless measurement probe infrastructure, developed at Fraunhofer FOKUS
[openwrt.git] / package / wprobe / Makefile
1 #
2 # Copyright (C) 2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/kernel.mk
9
10 PKG_NAME:=wprobe
11 PKG_VERSION:=1
12
13 PKG_BUILD_DEPENDS:=libnl libipfix
14
15 include $(INCLUDE_DIR)/package.mk
16
17 define KernelPackage/wprobe
18 SUBMENU:=Network Support
19 TITLE:=Wireless driver probe infrastructure
20 FILES:= \
21 $(PKG_BUILD_DIR)/kernel/wprobe.$(LINUX_KMOD_SUFFIX)
22 AUTOLOAD:=$(call AutoLoad,01,wprobe)
23 endef
24
25 define KernelPackage/wprobe/description
26 A module that exports measurement data from wireless driver to user space
27 endef
28
29 define Package/wprobe-info
30 SECTION:=net
31 CATEGORY:=Network
32 DEPENDS:=+kmod-wprobe
33 TITLE:=Wireless measurement utility
34 endef
35
36 define Package/wprobe-info/description
37 wprobe-info uses the wprobe kernel module to query
38 wireless driver measurement data from an interface
39 endef
40
41 define Package/wprobe-export
42 SECTION:=net
43 CATEGORY:=Network
44 DEPENDS:=+kmod-wprobe
45 TITLE:=Wireless measurement data exporter
46 endef
47
48 define Package/wprobe-export/description
49 wprobe-export uses the wprobe kernel module to export
50 wireless driver measurement data via the IPFIX protocol
51 endef
52
53 define Build/Prepare
54 mkdir -p $(PKG_BUILD_DIR)
55 $(CP) src/* $(PKG_BUILD_DIR)/
56 endef
57
58 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
59
60 define Build/Compile/kmod
61 $(MAKE) -C $(LINUX_DIR) \
62 CROSS_COMPILE="$(TARGET_CROSS)" \
63 ARCH="$(LINUX_KARCH)" \
64 SUBDIRS="$(PKG_BUILD_DIR)/kernel" \
65 KERNELDIR=$(LINUX_DIR) \
66 CC="$(TARGET_CC)" \
67 EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/kernel" \
68 modules
69 endef
70
71 define Build/Compile/lib
72 $(MAKE) -C $(PKG_BUILD_DIR)/user \
73 $(TARGET_CONFIGURE_OPTS) \
74 CFLAGS="$(TARGET_CFLAGS)" \
75 CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PKG_BUILD_DIR)/kernel" \
76 LDFLAGS="$(TARGET_LDFLAGS)" \
77 LIBNL="$(STAGING_DIR)/usr/lib/libnl.a"
78 endef
79
80 define Build/Compile/exporter
81 $(MAKE) -C $(PKG_BUILD_DIR)/exporter \
82 $(TARGET_CONFIGURE_OPTS) \
83 CFLAGS="$(TARGET_CFLAGS)" \
84 CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PKG_BUILD_DIR)/kernel -I$(PKG_BUILD_DIR)/user" \
85 LDFLAGS="$(TARGET_LDFLAGS)" \
86 LIBS="$(PKG_BUILD_DIR)/user/libwprobe.a $(STAGING_DIR)/usr/lib/libipfix.a $(STAGING_DIR)/usr/lib/libmisc.a $(STAGING_DIR)/usr/lib/libnl.a -lm"
87 endef
88
89 define Build/Compile
90 $(Build/Compile/kmod)
91 $(Build/Compile/lib)
92 $(Build/Compile/exporter)
93 endef
94
95 define Build/InstallDev
96 $(INSTALL_DIR) $(1)/usr/include
97 $(CP) $(PKG_BUILD_DIR)/kernel/linux $(1)/usr/include
98 endef
99
100 define Package/wprobe-info/install
101 $(INSTALL_DIR) $(1)/sbin
102 $(INSTALL_BIN) $(PKG_BUILD_DIR)/user/wprobe-info $(1)/sbin/
103 endef
104
105 define Package/wprobe-export/install
106 $(INSTALL_DIR) $(1)/sbin
107 $(INSTALL_BIN) $(PKG_BUILD_DIR)/exporter/wprobe-export $(1)/sbin/
108 endef
109
110 $(eval $(call KernelPackage,wprobe))
111 $(eval $(call BuildPackage,wprobe-info))
112 $(eval $(call BuildPackage,wprobe-export))
This page took 0.054946 seconds and 5 git commands to generate.