source: trunk/package/iwinfo/Makefile @ 29462

Last change on this file since 29462 was 29462, checked in by jow, 4 years ago

[package] iwinfo: support nl80211 hardware identification against radioX pseudo interfaces, useful if radio is not up yet

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