fix pdc20xx compile for linux 2.6
[openwrt.git] / package / wpa_supplicant / Makefile
1 #
2 # Copyright (C) 2008-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=wpa_supplicant
11 PKG_VERSION:=0.6.9
12 PKG_RELEASE:=2
13 PKG_MD5SUM:=0efb8fcedf0a8acf6f423dfdb0658fdd
14
15 PKG_SOURCE_URL:=http://hostap.epitest.fi/releases
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17
18 PKG_BUILD_DEPENDS:= \
19 PACKAGE_kmod-madwifi:madwifi \
20
21 PKG_CONFIG_DEPENDS:= \
22 CONFIG_PACKAGE_kmod-madwifi \
23 CONFIG_WPA_SUPPLICANT_NO_TIMESTAMP_CHECK \
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/wpa-supplicant
28 SECTION:=net
29 CATEGORY:=Network
30 TITLE:=WPA Supplicant
31 DEPENDS:=$(if $(CONFIG_WPA_SUPPLICANT_OPENSSL),+libopenssl)
32 URL:=http://hostap.epitest.fi/wpa_supplicant/
33 endef
34
35 define Package/wpa-supplicant/Description
36 WPA Supplicant
37 endef
38
39 define Package/wpa-supplicant/config
40 source "$(SOURCE)/Config.in"
41 endef
42
43 define Package/wpa-cli
44 SECTION:=net
45 CATEGORY:=Network
46 DEPENDS:=wpa-supplicant
47 TITLE:=WPA Supplicant command line interface
48 endef
49
50 define Package/wpa-cli/Description
51 WPA Supplicant control utility
52 endef
53
54 CONFIG=$(firstword $(wildcard ./files/config.$(BOARD) ./files/config.$(ARCH) ./config))
55 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/madwifi $(if $(CONFIG_WPA_SUPPLICANT_NO_TIMESTAMP_CHECK),-DNO_TIMESTAMP_CHECK)
56
57 define Build/Configure
58 cp $(CONFIG) $(PKG_BUILD_DIR)/wpa_supplicant/.config
59 [ -f $(STAMP_CONFIGURED) ] || $(MAKE) -C $(PKG_BUILD_DIR)/wpa_supplicant clean
60 rm -f $(PKG_BUILD_DIR)/.configured*
61 $(if $(CONFIG_PACKAGE_kmod-madwifi),,$(SED) 's,^CONFIG_DRIVER_MADWIFI,#CONFIG_DRIVER_MADWIFI,g' $(PKG_BUILD_DIR)/wpa_supplicant/.config)
62 $(if $(CONFIG_PACKAGE_kmod-hostap),,$(SED) 's,^CONFIG_DRIVER_HOSTAP,#CONFIG_DRIVER_HOSTAP,g' $(PKG_BUILD_DIR)/wpa_supplicant/.config)
63 $(if $(CONFIG_WPA_SUPPLICANT_OPENSSL),$(SED) 's|^CONFIG_TLS.*|CONFIG_TLS=openssl|g' $(PKG_BUILD_DIR)/wpa_supplicant/.config)
64 endef
65
66 define Build/Compile
67 rm -rf $(PKG_INSTALL_DIR)
68 mkdir -p $(PKG_INSTALL_DIR)
69 CFLAGS="$(TARGET_CFLAGS)" \
70 $(MAKE) -C $(PKG_BUILD_DIR)/wpa_supplicant \
71 CC="$(TARGET_CC)" \
72 KERNEL=$(LINUX_DIR) \
73 CPPFLAGS="$(TARGET_CPPFLAGS)" \
74 LDFLAGS="$(TARGET_LDFLAGS)" \
75 all
76 endef
77
78 define Package/wpa-supplicant/install
79 $(INSTALL_DIR) $(1)/usr/sbin
80 $(CP) \
81 $(PKG_BUILD_DIR)/wpa_supplicant/wpa_supplicant \
82 $(PKG_BUILD_DIR)/wpa_supplicant/wpa_passphrase \
83 $(1)/usr/sbin/
84 $(INSTALL_DIR) $(1)/lib/wifi
85 $(INSTALL_DATA) ./files/wpa_supplicant.sh $(1)/lib/wifi/wpa_supplicant.sh
86 endef
87
88 define Package/wpa-cli/install
89 $(INSTALL_DIR) $(1)/usr/sbin
90 $(CP) $(PKG_BUILD_DIR)/wpa_supplicant/wpa_cli $(1)/usr/sbin/
91 endef
92
93 $(eval $(call BuildPackage,wpa-supplicant))
94 $(eval $(call BuildPackage,wpa-cli))
This page took 0.052523 seconds and 5 git commands to generate.