1 ################################################################################
5 ################################################################################
7 WPA_SUPPLICANT_VERSION
= 2.6
8 WPA_SUPPLICANT_SITE
= http
://hostap.epitest.fi
/releases
9 WPA_SUPPLICANT_LICENSE
= BSD-3c
10 WPA_SUPPLICANT_LICENSE_FILES
= README
11 WPA_SUPPLICANT_CONFIG
= $(WPA_SUPPLICANT_DIR
)/wpa_supplicant
/.config
12 WPA_SUPPLICANT_SUBDIR
= wpa_supplicant
13 WPA_SUPPLICANT_DBUS_OLD_SERVICE
= fi.epitest.hostap.WPASupplicant
14 WPA_SUPPLICANT_DBUS_NEW_SERVICE
= fi.w1.wpa_supplicant1
15 WPA_SUPPLICANT_CFLAGS
= $(TARGET_CFLAGS
) -I
$(STAGING_DIR
)/usr
/include/libnl3
/
16 WPA_SUPPLICANT_LDFLAGS
= $(TARGET_LDFLAGS
)
18 # install the wpa_client library
19 WPA_SUPPLICANT_INSTALL_STAGING
= YES
21 WPA_SUPPLICANT_CONFIG_EDITS
=
23 # Add support for simple background scan
24 WPA_SUPPLICANT_CONFIG_SET
= CONFIG_BGSCAN_SIMPLE
26 WPA_SUPPLICANT_CONFIG_ENABLE
= \
30 CONFIG_INTERNAL_LIBTOMMATH \
34 WPA_SUPPLICANT_CONFIG_DISABLE
= \
37 # libnl-3 needs -lm (for rint) and -lpthread if linking statically
38 # And library order matters hence stick -lnl-3 first since it's appended
39 # in the wpa_supplicant Makefiles as in LIBS+=-lnl-3 ... thus failing
40 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_NL80211
),y
)
41 ifeq ($(BR2_STATIC_LIBS
),y
)
42 WPA_SUPPLICANT_LIBS
+= -lnl-3
-lm
-lpthread
44 WPA_SUPPLICANT_DEPENDENCIES
+= host-pkgconf libnl
45 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_LIBNL32
47 WPA_SUPPLICANT_CONFIG_DISABLE
+= CONFIG_DRIVER_NL80211
50 # Trailing underscore on purpose to not enable CONFIG_EAPOL_TEST
51 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_EAP
),y
)
52 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_EAP_
54 ifeq ($(BR2_STATIC_LIBS
),y
)
55 WPA_SUPPLICANT_CONFIG_DISABLE
+= CONFIG_EAP_TNC
58 WPA_SUPPLICANT_CONFIG_DISABLE
+= CONFIG_EAP
61 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_HOTSPOT
),y
)
62 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_HS20 \
66 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT
),y
)
67 WPA_SUPPLICANT_CONFIG_ENABLE
+= \
72 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_WIFI_DISPLAY
),y
)
73 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_WIFI_DISPLAY
76 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_MESH_NETWORKING
),y
)
77 WPA_SUPPLICANT_CONFIG_SET
+= CONFIG_MESH
78 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_IEEE80211W
81 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_AUTOSCAN
),y
)
82 WPA_SUPPLICANT_CONFIG_ENABLE
+= \
83 CONFIG_AUTOSCAN_EXPONENTIAL \
84 CONFIG_AUTOSCAN_PERIODIC
87 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_WPS
),y
)
88 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_WPS
91 # Try to use openssl if it's already available
92 ifeq ($(BR2_PACKAGE_OPENSSL
),y
)
93 WPA_SUPPLICANT_DEPENDENCIES
+= openssl
94 WPA_SUPPLICANT_LIBS
+= $(if
$(BR2_STATIC_LIBS
),-lcrypto
-lz
)
95 WPA_SUPPLICANT_CONFIG_EDITS
+= 's/\#\(CONFIG_TLS=openssl\)/\1/'
97 WPA_SUPPLICANT_CONFIG_DISABLE
+= CONFIG_EAP_PWD
98 WPA_SUPPLICANT_CONFIG_EDITS
+= 's/\#\(CONFIG_TLS=\).*/\1internal/'
101 ifeq ($(BR2_PACKAGE_DBUS
),y
)
102 WPA_SUPPLICANT_DEPENDENCIES
+= host-pkgconf dbus
103 WPA_SUPPLICANT_MAKE_ENV
= \
104 PKG_CONFIG_SYSROOT_DIR
="$(STAGING_DIR)" \
105 PKG_CONFIG_PATH
="$(STAGING_DIR)/usr/lib/pkgconfig"
107 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_OLD
),y
)
108 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_CTRL_IFACE_DBUS
=
109 define WPA_SUPPLICANT_INSTALL_DBUS_OLD
110 $(INSTALL
) -m
0644 -D \
111 $(@D
)/wpa_supplicant
/dbus
/$(WPA_SUPPLICANT_DBUS_OLD_SERVICE
).service \
112 $(TARGET_DIR
)/usr
/share
/dbus-1
/system-services
/$(WPA_SUPPLICANT_DBUS_OLD_SERVICE
).service
116 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW
),y
)
117 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_CTRL_IFACE_DBUS_NEW
118 define WPA_SUPPLICANT_INSTALL_DBUS_NEW
119 $(INSTALL
) -m
0644 -D \
120 $(@D
)/wpa_supplicant
/dbus
/$(WPA_SUPPLICANT_DBUS_NEW_SERVICE
).service \
121 $(TARGET_DIR
)/usr
/share
/dbus-1
/system-services
/$(WPA_SUPPLICANT_DBUS_NEW_SERVICE
).service
125 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION
),y
)
126 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_CTRL_IFACE_DBUS_INTRO
131 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DEBUG_SYSLOG
),y
)
132 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_DEBUG_SYSLOG
135 ifeq ($(BR2_PACKAGE_READLINE
),y
)
136 WPA_SUPPLICANT_DEPENDENCIES
+= readline
137 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_READLINE
140 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_WPA_CLIENT_SO
),y
)
141 WPA_SUPPLICANT_CONFIG_SET
+= CONFIG_BUILD_WPA_CLIENT_SO
142 define WPA_SUPPLICANT_INSTALL_WPA_CLIENT_SO
143 $(INSTALL
) -m
0644 -D
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)/libwpa_client.so \
144 $(TARGET_DIR
)/usr
/lib
/libwpa_client.so
145 $(INSTALL
) -m
0644 -D
$(@D
)/src
/common
/wpa_ctrl.h \
146 $(TARGET_DIR
)/usr
/include/wpa_ctrl.h
148 define WPA_SUPPLICANT_INSTALL_STAGING_WPA_CLIENT_SO
149 $(INSTALL
) -m
0644 -D
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)/libwpa_client.so \
150 $(STAGING_DIR
)/usr
/lib
/libwpa_client.so
151 $(INSTALL
) -m
0644 -D
$(@D
)/src
/common
/wpa_ctrl.h \
152 $(STAGING_DIR
)/usr
/include/wpa_ctrl.h
156 define WPA_SUPPLICANT_CONFIGURE_CMDS
157 cp
$(@D
)/wpa_supplicant
/defconfig
$(WPA_SUPPLICANT_CONFIG
)
158 sed
-i
$(patsubst %,-e
's/^#\(%\)/\1/',$(WPA_SUPPLICANT_CONFIG_ENABLE
)) \
159 $(patsubst %,-e
's/^\(%\)/#\1/',$(WPA_SUPPLICANT_CONFIG_DISABLE
)) \
160 $(patsubst %,-e
'1i%=y',$(WPA_SUPPLICANT_CONFIG_SET
)) \
161 $(patsubst %,-e
%,$(WPA_SUPPLICANT_CONFIG_EDITS
)) \
162 $(WPA_SUPPLICANT_CONFIG
)
165 # LIBS for wpa_supplicant, LIBS_c for wpa_cli, LIBS_p for wpa_passphrase
166 define WPA_SUPPLICANT_BUILD_CMDS
167 $(TARGET_MAKE_ENV
) CFLAGS
="$(WPA_SUPPLICANT_CFLAGS)" \
168 LDFLAGS
="$(TARGET_LDFLAGS)" BINDIR
=/usr
/sbin \
169 LIBS
="$(WPA_SUPPLICANT_LIBS)" LIBS_c
="$(WPA_SUPPLICANT_LIBS)" \
170 LIBS_p
="$(WPA_SUPPLICANT_LIBS)" \
171 $(MAKE
) CC
="$(TARGET_CC)" -C
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)
174 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_CLI
),y
)
175 define WPA_SUPPLICANT_INSTALL_CLI
176 $(INSTALL
) -m
0755 -D
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)/wpa_cli \
177 $(TARGET_DIR
)/usr
/sbin
/wpa_cli
181 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE
),y
)
182 define WPA_SUPPLICANT_INSTALL_PASSPHRASE
183 $(INSTALL
) -m
0755 -D
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)/wpa_passphrase \
184 $(TARGET_DIR
)/usr
/sbin
/wpa_passphrase
188 ifeq ($(BR2_PACKAGE_DBUS
),y
)
189 define WPA_SUPPLICANT_INSTALL_DBUS
190 $(INSTALL
) -m
0644 -D \
191 $(@D
)/wpa_supplicant
/dbus
/dbus-wpa_supplicant.conf \
192 $(TARGET_DIR
)/etc
/dbus-1
/system.d
/wpa_supplicant.conf
193 $(WPA_SUPPLICANT_INSTALL_DBUS_OLD
)
194 $(WPA_SUPPLICANT_INSTALL_DBUS_NEW
)
198 define WPA_SUPPLICANT_INSTALL_STAGING_CMDS
199 $(WPA_SUPPLICANT_INSTALL_STAGING_WPA_CLIENT_SO
)
202 define WPA_SUPPLICANT_INSTALL_TARGET_CMDS
203 $(INSTALL
) -m
0755 -D
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)/wpa_supplicant \
204 $(TARGET_DIR
)/usr
/sbin
/wpa_supplicant
205 $(INSTALL
) -m
644 -D package
/wpa_supplicant
/wpa_supplicant.conf \
206 $(TARGET_DIR
)/etc
/wpa_supplicant.conf
207 $(WPA_SUPPLICANT_INSTALL_CLI
)
208 $(WPA_SUPPLICANT_INSTALL_PASSPHRASE
)
209 $(WPA_SUPPLICANT_INSTALL_DBUS
)
210 $(WPA_SUPPLICANT_INSTALL_WPA_CLIENT_SO
)
213 define WPA_SUPPLICANT_INSTALL_INIT_SYSTEMD
214 $(INSTALL
) -m
0644 -D
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)/systemd
/wpa_supplicant.service \
215 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/wpa_supplicant.service
216 $(INSTALL
) -m
0644 -D
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)/systemd
/wpa_supplicant@.service \
217 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/wpa_supplicant@.service
218 $(INSTALL
) -m
0644 -D
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)/systemd
/wpa_supplicant-nl80211@.service \
219 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/wpa_supplicant-nl80211@.service
220 $(INSTALL
) -m
0644 -D
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)/systemd
/wpa_supplicant-wired@.service \
221 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/wpa_supplicant-wired@.service
224 $(eval
$(generic-package
))