[wpa_supplicant] Fix menuconfig
[openwrt/svn-archive/archive.git] / package / wpa_supplicant / 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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=wpa_supplicant
12 PKG_VERSION:=0.6.3
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=b51b2975f21006f85f7297f3fb1acde1
15
16 PKG_SOURCE_URL:=http://hostap.epitest.fi/releases
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18
19 include $(INCLUDE_DIR)/package.mk
20 STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar,CONFIG_PACKAGE_kmod-madwifi CONFIG_WPA_SUPPLICANT_NO_TIMESTAMP_CHECK)
21
22 define Package/wpa-supplicant
23 SECTION:=net
24 CATEGORY:=Network
25 TITLE:=WPA Supplicant
26 URL:=http://hostap.epitest.fi/wpa_supplicant/
27 endef
28
29 define Package/wpa-supplicant/Description
30 WPA Supplicant
31 endef
32
33 define Package/wpa-supplicant/config
34 source "$(SOURCE)/Config.in"
35 endef
36
37
38 define Package/wpa-cli
39 SECTION:=net
40 CATEGORY:=Network
41 DEPENDS:=wpa-supplicant
42 TITLE:=WPA Supplicant command line interface
43 endef
44
45 define Package/wpa-cli/Description
46 WPA Supplicant control utility
47 endef
48
49 CONFIG=$(firstword $(wildcard ./files/config.$(BOARD) ./files/config.$(ARCH) ./config))
50 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/madwifi $(if $(CONFIG_WPA_SUPPLICANT_NO_TIMESTAMP_CHECK),-DNO_TIMESTAMP_CHECK)
51
52 define Build/Configure
53 cp $(CONFIG) $(PKG_BUILD_DIR)/wpa_supplicant/.config
54 $(if $(CONFIG_PACKAGE_kmod-madwifi),,$(SED) 's,^CONFIG_DRIVER_MADWIFI,#CONFIG_DRIVER_MADWIFI,g' $(PKG_BUILD_DIR)/wpa_supplicant/.config)
55 endef
56
57 define Build/Compile
58 rm -rf $(PKG_INSTALL_DIR)
59 mkdir -p $(PKG_INSTALL_DIR)
60 CFLAGS="$(TARGET_CFLAGS)" \
61 $(MAKE) -C $(PKG_BUILD_DIR)/wpa_supplicant \
62 CC="$(TARGET_CC)" \
63 KERNEL=$(LINUX_DIR) \
64 CPPFLAGS="$(TARGET_CPPFLAGS)" \
65 LDFLAGS="$(TARGET_LDFLAGS)" \
66 all
67 endef
68
69 define Package/wpa-supplicant/install
70 $(INSTALL_DIR) $(1)/usr/sbin
71 $(CP) \
72 $(PKG_BUILD_DIR)/wpa_supplicant/wpa_supplicant \
73 $(PKG_BUILD_DIR)/wpa_supplicant/wpa_passphrase \
74 $(1)/usr/sbin/
75 endef
76
77 define Package/wpa-cli/install
78 $(INSTALL_DIR) $(1)/usr/sbin
79 $(CP) $(PKG_BUILD_DIR)/wpa_cli $(1)/usr/sbin/
80 endef
81
82 $(eval $(call BuildPackage,wpa-supplicant))
83 $(eval $(call BuildPackage,wpa-cli))