ramips: add support for the Senao/EnGenius ESR-9753 board
[openwrt.git] / package / iwinfo / Makefile
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
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=libiwinfo
10 PKG_RELEASE:=21
11
12 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
13
14 include $(INCLUDE_DIR)/package.mk
15
16
17 define 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>
23 endef
24
25 define Package/libiwinfo/description
26 Wireless information library with consistent interface for proprietary Broadcom,
27 madwifi, nl80211 and wext driver interfaces.
28 endef
29
30
31 define 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>
38 endef
39
40 define Package/libiwinfo-lua/description
41 This is the Lua binding for the iwinfo library. It provides access to all enabled
42 backends.
43 endef
44
45
46 define 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>
52 endef
53
54 define Package/iwinfo/description
55 Command line frontend for the wireless information library.
56 endef
57
58
59 define Build/Prepare
60 mkdir -p $(PKG_BUILD_DIR)
61 $(CP) ./src/* $(PKG_BUILD_DIR)/
62 endef
63
64 define Build/Configure
65 endef
66
67 IWINFO_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
74 TARGET_CFLAGS += \
75 -I$(STAGING_DIR)/usr/include/libnl-tiny \
76 -I$(STAGING_DIR)/usr/include \
77 -D_GNU_SOURCE
78
79 MAKE_FLAGS += \
80 FPIC="$(FPIC)" \
81 CFLAGS="$(TARGET_CFLAGS)" \
82 LDFLAGS="$(TARGET_LDFLAGS)" \
83 BACKENDS="$(IWINFO_BACKENDS)"
84
85 define 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
93 endef
94
95 define Package/libiwinfo/install
96 $(INSTALL_DIR) $(1)/usr/lib
97 $(INSTALL_BIN) $(PKG_BUILD_DIR)/libiwinfo.so $(1)/usr/lib/libiwinfo.so
98 endef
99
100 define 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
103 endef
104
105 define Package/iwinfo/install
106 $(INSTALL_DIR) $(1)/usr/bin
107 $(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo $(1)/usr/bin/iwinfo
108 endef
109
110 $(eval $(call BuildPackage,libiwinfo))
111 $(eval $(call BuildPackage,libiwinfo-lua))
112 $(eval $(call BuildPackage,iwinfo))
This page took 0.045648 seconds and 5 git commands to generate.