[package] iwinfo: plug memory leak in nl80211 backend, nl80211_close() did not put...
[openwrt.git] / package / iwinfo / Makefile
1 #
2 # Copyright (C) 2010-2012 Jo-Philipp Wich <xm@subsignal.org>
3 #
4 # This is free software, licensed under the GPL 2 license.
5 #
6
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=libiwinfo
10 PKG_RELEASE:=23
11
12 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
13 PKG_CONFIG_DEPENDS := \
14 CONFIG_PACKAGE_kmod-brcm-wl \
15 CONFIG_PACKAGE_kmod-brcm-wl-mini \
16 CONFIG_PACKAGE_kmod-brcm-wl-mimo \
17 CONFIG_PACKAGE_kmod-madwifi \
18 CONFIG_PACKAGE_kmod-mac80211
19
20 include $(INCLUDE_DIR)/package.mk
21
22
23 define Package/libiwinfo
24 SECTION:=libs
25 CATEGORY:=Libraries
26 TITLE:=Generalized Wireless Information Library (iwinfo)
27 DEPENDS:=+PACKAGE_kmod-mac80211:libnl-tiny
28 MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
29 endef
30
31 define Package/libiwinfo/description
32 Wireless information library with consistent interface for proprietary Broadcom,
33 madwifi, nl80211 and wext driver interfaces.
34 endef
35
36
37 define Package/libiwinfo-lua
38 SUBMENU:=Lua
39 SECTION:=lang
40 CATEGORY:=Languages
41 TITLE:=libiwinfo Lua binding
42 DEPENDS:=+libiwinfo +liblua +lua
43 MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
44 endef
45
46 define Package/libiwinfo-lua/description
47 This is the Lua binding for the iwinfo library. It provides access to all enabled
48 backends.
49 endef
50
51
52 define Package/iwinfo
53 SECTION:=utils
54 CATEGORY:=Utilities
55 TITLE:=Generalized Wireless Information utility
56 DEPENDS:=+libiwinfo
57 MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
58 endef
59
60 define Package/iwinfo/description
61 Command line frontend for the wireless information library.
62 endef
63
64
65 define Build/Prepare
66 mkdir -p $(PKG_BUILD_DIR)
67 $(CP) ./src/* $(PKG_BUILD_DIR)/
68 endef
69
70 define Build/Configure
71 endef
72
73 IWINFO_BACKENDS := \
74 $(if $(CONFIG_PACKAGE_kmod-brcm-wl),wl) \
75 $(if $(CONFIG_PACKAGE_kmod-brcm-wl-mini),wl) \
76 $(if $(CONFIG_PACKAGE_kmod-brcm-wl-mimo),wl) \
77 $(if $(CONFIG_PACKAGE_kmod-madwifi),madwifi) \
78 $(if $(CONFIG_PACKAGE_kmod-mac80211),nl80211)
79
80 TARGET_CFLAGS += \
81 -I$(STAGING_DIR)/usr/include/libnl-tiny \
82 -I$(STAGING_DIR)/usr/include \
83 -D_GNU_SOURCE
84
85 MAKE_FLAGS += \
86 FPIC="$(FPIC)" \
87 CFLAGS="$(TARGET_CFLAGS)" \
88 LDFLAGS="$(TARGET_LDFLAGS)" \
89 BACKENDS="$(IWINFO_BACKENDS)"
90
91 define Build/InstallDev
92 $(INSTALL_DIR) $(1)/usr/include/iwinfo
93 $(CP) $(PKG_BUILD_DIR)/include/iwinfo.h $(1)/usr/include/
94 $(CP) $(PKG_BUILD_DIR)/include/iwinfo/* $(1)/usr/include/iwinfo/
95 $(INSTALL_DIR) $(1)/usr/lib
96 $(INSTALL_BIN) $(PKG_BUILD_DIR)/libiwinfo.so $(1)/usr/lib/libiwinfo.so
97 $(INSTALL_DIR) $(1)/usr/lib/lua
98 $(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo.so $(1)/usr/lib/lua/iwinfo.so
99 endef
100
101 define Package/libiwinfo/install
102 $(INSTALL_DIR) $(1)/usr/lib
103 $(INSTALL_BIN) $(PKG_BUILD_DIR)/libiwinfo.so $(1)/usr/lib/libiwinfo.so
104 endef
105
106 define Package/libiwinfo-lua/install
107 $(INSTALL_DIR) $(1)/usr/lib/lua
108 $(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo.so $(1)/usr/lib/lua/iwinfo.so
109 endef
110
111 define Package/iwinfo/install
112 $(INSTALL_DIR) $(1)/usr/bin
113 $(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo $(1)/usr/bin/iwinfo
114 endef
115
116 $(eval $(call BuildPackage,libiwinfo))
117 $(eval $(call BuildPackage,libiwinfo-lua))
118 $(eval $(call BuildPackage,iwinfo))
This page took 0.044518 seconds and 5 git commands to generate.