4498fbde5c9d3e5d1321b64fda8ef61441535d87
[openwrt/openwrt.git] / package / network / services / hostapd / Makefile
1 # Copyright (C) 2006-2014 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=hostapd
10 PKG_RELEASE:=13
11
12 PKG_SOURCE_URL:=http://w1.fi/hostap.git
13 PKG_SOURCE_PROTO:=git
14 PKG_SOURCE_DATE:=2020-06-08
15 PKG_SOURCE_VERSION:=5a8b366233f5585e68a4ffbb604fbb4a848eb325
16 PKG_MIRROR_HASH:=1b2a4947034142587a3f81eac2ea27dd64650e77f8943d973623b47533be2393
17
18 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
19 PKG_LICENSE:=BSD-3-Clause
20 PKG_CPE_ID:=cpe:/a:w1.fi:hostapd
21
22 PKG_BUILD_PARALLEL:=1
23 PKG_ASLR_PIE_REGULAR:=1
24
25 PKG_CONFIG_DEPENDS:= \
26 CONFIG_PACKAGE_kmod-ath9k \
27 CONFIG_PACKAGE_kmod-cfg80211 \
28 CONFIG_PACKAGE_hostapd \
29 CONFIG_PACKAGE_hostapd-basic \
30 CONFIG_PACKAGE_hostapd-mini \
31 CONFIG_WPA_RFKILL_SUPPORT \
32 CONFIG_DRIVER_WEXT_SUPPORT \
33 CONFIG_DRIVER_11N_SUPPORT \
34 CONFIG_DRIVER_11AC_SUPPORT \
35 CONFIG_DRIVER_11AX_SUPPORT \
36 CONFIG_WPA_ENABLE_WEP
37
38 EAPOL_TEST_PROVIDERS:=eapol-test eapol-test-openssl eapol-test-wolfssl
39
40 SUPPLICANT_PROVIDERS:=
41 HOSTAPD_PROVIDERS:=
42
43 LOCAL_TYPE=$(strip \
44 $(if $(findstring wpad,$(BUILD_VARIANT)),wpad, \
45 $(if $(findstring supplicant,$(BUILD_VARIANT)),supplicant, \
46 hostapd \
47 )))
48
49 LOCAL_AND_LIB_VARIANT=$(patsubst hostapd-%,%,\
50 $(patsubst wpad-%,%,\
51 $(patsubst supplicant-%,%,\
52 $(BUILD_VARIANT)\
53 )))
54
55 LOCAL_VARIANT=$(patsubst %-internal,%,\
56 $(patsubst %-openssl,%,\
57 $(patsubst %-wolfssl,%,\
58 $(LOCAL_AND_LIB_VARIANT)\
59 )))
60
61 SSL_VARIANT=$(strip \
62 $(if $(findstring openssl,$(LOCAL_AND_LIB_VARIANT)),openssl,\
63 $(if $(findstring wolfssl,$(LOCAL_AND_LIB_VARIANT)),wolfssl,\
64 internal\
65 )))
66
67 CONFIG_VARIANT:=$(LOCAL_VARIANT)
68 ifeq ($(LOCAL_VARIANT),mesh)
69 CONFIG_VARIANT:=full
70 endif
71 ifeq ($(LOCAL_VARIANT),hs20)
72 CONFIG_VARIANT:=full
73 endif
74
75 include $(INCLUDE_DIR)/package.mk
76
77 STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(CONFIG_WPA_MSG_MIN_PRIORITY)
78
79
80 ifneq ($(CONFIG_DRIVER_11N_SUPPORT),)
81 HOSTAPD_IEEE80211N:=y
82 endif
83
84 ifneq ($(CONFIG_DRIVER_11AC_SUPPORT),)
85 HOSTAPD_IEEE80211AC:=y
86 endif
87
88 ifneq ($(CONFIG_DRIVER_11AX_SUPPORT),)
89 HOSTAPD_IEEE80211AX:=y
90 endif
91
92 DRIVER_MAKEOPTS= \
93 CONFIG_ACS=$(CONFIG_PACKAGE_kmod-cfg80211) \
94 CONFIG_DRIVER_NL80211=$(CONFIG_PACKAGE_kmod-cfg80211) \
95 CONFIG_IEEE80211N=$(HOSTAPD_IEEE80211N) \
96 CONFIG_IEEE80211AC=$(HOSTAPD_IEEE80211AC) \
97 CONFIG_IEEE80211AX=$(HOSTAPD_IEEE80211AX) \
98 CONFIG_DRIVER_WEXT=$(CONFIG_DRIVER_WEXT_SUPPORT) \
99
100 ifneq ($(LOCAL_VARIANT),mini)
101 DRIVER_MAKEOPTS += CONFIG_IEEE80211W=$(CONFIG_DRIVER_11W_SUPPORT)
102 endif
103
104 ifeq ($(SSL_VARIANT),openssl)
105 DRIVER_MAKEOPTS += CONFIG_TLS=openssl CONFIG_SAE=y
106 TARGET_LDFLAGS += -lcrypto -lssl
107
108 ifeq ($(LOCAL_VARIANT),mesh)
109 DRIVER_MAKEOPTS += CONFIG_AP=y CONFIG_MESH=y
110 endif
111 ifeq ($(LOCAL_VARIANT),full)
112 DRIVER_MAKEOPTS += CONFIG_OWE=y CONFIG_SUITEB192=y CONFIG_AP=y CONFIG_MESH=y
113 endif
114 ifeq ($(LOCAL_VARIANT),hs20)
115 DRIVER_MAKEOPTS += CONFIG_OWE=y CONFIG_SUITEB192=y CONFIG_AP=y CONFIG_MESH=y CONFIG_DPP=y CONFIG_HS20=y CONFIG_INTERWORKING=y
116 endif
117
118 endif
119
120 ifeq ($(SSL_VARIANT),wolfssl)
121 DRIVER_MAKEOPTS += CONFIG_TLS=wolfssl CONFIG_SAE=y
122 TARGET_LDFLAGS += -lwolfssl
123
124 ifeq ($(LOCAL_VARIANT),mesh)
125 DRIVER_MAKEOPTS += CONFIG_AP=y CONFIG_MESH=y CONFIG_WPS_NFC=1
126 endif
127 ifeq ($(LOCAL_VARIANT),full)
128 DRIVER_MAKEOPTS += CONFIG_OWE=y CONFIG_SUITEB192=y CONFIG_AP=y CONFIG_MESH=y CONFIG_WPS_NFC=1
129 endif
130 endif
131
132 ifneq ($(LOCAL_TYPE),hostapd)
133 ifdef CONFIG_WPA_RFKILL_SUPPORT
134 DRIVER_MAKEOPTS += NEED_RFKILL=y
135 endif
136 endif
137
138 ifdef CONFIG_USE_GLIBC
139 TARGET_LDFLAGS += -lrt
140 TARGET_LDFLAGS_C += -lrt
141 endif
142
143 DRV_DEPENDS:=+PACKAGE_kmod-cfg80211:libnl-tiny
144
145
146 define Package/hostapd/Default
147 SECTION:=net
148 CATEGORY:=Network
149 SUBMENU:=WirelessAPD
150 TITLE:=IEEE 802.1x Authenticator
151 URL:=http://hostap.epitest.fi/
152 DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
153 PROVIDES:=hostapd
154 CONFLICTS:=$(HOSTAPD_PROVIDERS)
155 HOSTAPD_PROVIDERS+=$(1)
156 endef
157
158 define Package/hostapd
159 $(call Package/hostapd/Default,$(1))
160 TITLE+= (built-in full)
161 VARIANT:=full-internal
162 endef
163
164 define Package/hostapd/description
165 This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS
166 Authenticator.
167 endef
168
169 define Package/hostapd-openssl
170 $(call Package/hostapd/Default,$(1))
171 TITLE+= (OpenSSL full)
172 VARIANT:=full-openssl
173 DEPENDS+=+libopenssl
174 endef
175
176 Package/hostapd-openssl/description = $(Package/hostapd/description)
177
178 define Package/hostapd-hs20
179 $(call Package/hostapd/Default,$(1))
180 TITLE+= (OpenSSL with Hotspot 2.0)
181 VARIANT:=hs20-openssl
182 DEPENDS+=+libopenssl
183 endef
184
185 Package/hostapd-hs20/description = $(Package/hostapd/description)
186
187 define Package/hostapd-wolfssl
188 $(call Package/hostapd/Default,$(1))
189 TITLE+= (wolfSSL full)
190 VARIANT:=full-wolfssl
191 DEPENDS+=+libwolfssl
192 endef
193
194 Package/hostapd-wolfssl/description = $(Package/hostapd/description)
195
196 define Package/hostapd-basic
197 $(call Package/hostapd/Default,$(1))
198 TITLE+= (WPA-PSK, 11r, 11w)
199 VARIANT:=basic
200 endef
201
202 define Package/hostapd-basic/description
203 This package contains a basic IEEE 802.1x/WPA Authenticator with WPA-PSK, 802.11r and 802.11w support.
204 endef
205
206 define Package/hostapd-mini
207 $(call Package/hostapd/Default,$(1))
208 TITLE+= (WPA-PSK only)
209 VARIANT:=mini
210 endef
211
212 define Package/hostapd-mini/description
213 This package contains a minimal IEEE 802.1x/WPA Authenticator (WPA-PSK only).
214 endef
215
216
217 define Package/wpad/Default
218 SECTION:=net
219 CATEGORY:=Network
220 SUBMENU:=WirelessAPD
221 TITLE:=IEEE 802.1x Auth/Supplicant
222 DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
223 URL:=http://hostap.epitest.fi/
224 PROVIDES:=hostapd wpa-supplicant
225 CONFLICTS:=$(HOSTAPD_PROVIDERS) $(SUPPLICANT_PROVIDERS)
226 HOSTAPD_PROVIDERS+=$(1)
227 SUPPLICANT_PROVIDERS+=$(1)
228 endef
229
230 define Package/wpad
231 $(call Package/wpad/Default,$(1))
232 TITLE+= (built-in full)
233 VARIANT:=wpad-full-internal
234 endef
235
236 define Package/wpad/description
237 This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS
238 Authenticator and Supplicant
239 endef
240
241 define Package/wpad-openssl
242 $(call Package/wpad/Default,$(1))
243 TITLE+= (OpenSSL full)
244 VARIANT:=wpad-full-openssl
245 DEPENDS+=+libopenssl
246 endef
247
248 Package/wpad-openssl/description = $(Package/wpad/description)
249
250 define Package/wpad-wolfssl
251 $(call Package/wpad/Default,$(1))
252 TITLE+= (wolfSSL full)
253 VARIANT:=wpad-full-wolfssl
254 DEPENDS+=+libwolfssl
255 endef
256
257 Package/wpad-wolfssl/description = $(Package/wpad/description)
258
259 define Package/wpad-basic
260 $(call Package/wpad/Default,$(1))
261 TITLE+= (WPA-PSK, 11r, 11w)
262 VARIANT:=wpad-basic
263 endef
264
265 define Package/wpad-basic/description
266 This package contains a basic IEEE 802.1x/WPA Authenticator and Supplicant with WPA-PSK, 802.11r and 802.11w support.
267 endef
268
269 define Package/wpad-basic-wolfssl
270 $(call Package/wpad/Default,$(1))
271 TITLE+= (wolfSSL, 11r, 11w)
272 VARIANT:=wpad-basic-wolfssl
273 DEPENDS+=+libwolfssl
274 endef
275
276 define Package/wpad-basic-wolfssl/description
277 This package contains a basic IEEE 802.1x/WPA Authenticator and Supplicant with WPA-PSK, SAE (WPA3-Personal), 802.11r and 802.11w support.
278 endef
279
280 define Package/wpad-mini
281 $(call Package/wpad/Default,$(1))
282 TITLE+= (WPA-PSK only)
283 VARIANT:=wpad-mini
284 endef
285
286 define Package/wpad-mini/description
287 This package contains a minimal IEEE 802.1x/WPA Authenticator and Supplicant (WPA-PSK only).
288 endef
289
290 define Package/wpad-mesh
291 $(call Package/wpad/Default,$(1))
292 DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN)
293 PROVIDES+=wpa-supplicant-mesh wpad-mesh
294 endef
295
296 define Package/wpad-mesh/description
297 This package contains a minimal IEEE 802.1x/WPA Authenticator and Supplicant (with 802.11s mesh and SAE support).
298 endef
299
300 define Package/wpad-mesh-openssl
301 $(call Package/wpad-mesh,$(1))
302 TITLE+= (OpenSSL, 11s, SAE)
303 DEPENDS+=+libopenssl
304 VARIANT:=wpad-mesh-openssl
305 endef
306
307 Package/wpad-mesh-openssl/description = $(Package/wpad-mesh/description)
308
309 define Package/wpad-mesh-wolfssl
310 $(call Package/wpad-mesh,$(1))
311 TITLE+= (wolfSSL, 11s, SAE)
312 DEPENDS+=+libwolfssl
313 VARIANT:=wpad-mesh-wolfssl
314 endef
315
316 Package/wpad-mesh-wolfssl/description = $(Package/wpad-mesh/description)
317
318
319 define Package/wpa-supplicant/Default
320 SECTION:=net
321 CATEGORY:=Network
322 SUBMENU:=WirelessAPD
323 TITLE:=WPA Supplicant
324 URL:=http://hostap.epitest.fi/wpa_supplicant/
325 DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
326 PROVIDES:=wpa-supplicant
327 CONFLICTS:=$(SUPPLICANT_PROVIDERS)
328 SUPPLICANT_PROVIDERS+=$(1)
329 endef
330
331 define Package/wpa-supplicant
332 $(call Package/wpa-supplicant/Default,$(1))
333 TITLE+= (built-in full)
334 VARIANT:=supplicant-full-internal
335 endef
336
337 define Package/wpa-supplicant-openssl
338 $(call Package/wpa-supplicant/Default,$(1))
339 TITLE+= (OpenSSL full)
340 VARIANT:=supplicant-full-openssl
341 DEPENDS+=+libopenssl
342 endef
343
344 define Package/wpa-supplicant-wolfssl
345 $(call Package/wpa-supplicant/Default,$(1))
346 TITLE+= (wolfSSL full)
347 VARIANT:=supplicant-full-wolfssl
348 DEPENDS+=+libwolfssl
349 endef
350
351 define Package/wpa-supplicant/config
352 source "$(SOURCE)/Config.in"
353 endef
354
355 define Package/wpa-supplicant-p2p
356 $(call Package/wpa-supplicant/Default,$(1))
357 TITLE+= (Wi-Fi P2P support)
358 DEPENDS+=@PACKAGE_kmod-cfg80211
359 VARIANT:=supplicant-p2p-internal
360 endef
361
362 define Package/wpa-supplicant-mesh/Default
363 $(call Package/wpa-supplicant/Default,$(1))
364 DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN)
365 PROVIDES+=wpa-supplicant-mesh
366 endef
367
368 define Package/wpa-supplicant-mesh-openssl
369 $(call Package/wpa-supplicant-mesh/Default,$(1))
370 TITLE+= (OpenSSL, 11s, SAE)
371 VARIANT:=supplicant-mesh-openssl
372 DEPENDS+=+libopenssl
373 endef
374
375 define Package/wpa-supplicant-mesh-wolfssl
376 $(call Package/wpa-supplicant-mesh/Default,$(1))
377 TITLE+= (wolfSSL, 11s, SAE)
378 VARIANT:=supplicant-mesh-wolfssl
379 DEPENDS+=+libwolfssl
380 endef
381
382 define Package/wpa-supplicant-basic
383 $(call Package/wpa-supplicant/Default,$(1))
384 TITLE+= (11r, 11w)
385 VARIANT:=supplicant-basic
386 endef
387
388 define Package/wpa-supplicant-mini
389 $(call Package/wpa-supplicant/Default,$(1))
390 TITLE+= (minimal)
391 VARIANT:=supplicant-mini
392 endef
393
394
395 define Package/hostapd-common
396 TITLE:=hostapd/wpa_supplicant common support files
397 SECTION:=net
398 CATEGORY:=Network
399 SUBMENU:=WirelessAPD
400 endef
401
402 define Package/hostapd-utils
403 SECTION:=net
404 CATEGORY:=Network
405 SUBMENU:=WirelessAPD
406 TITLE:=IEEE 802.1x Authenticator (utils)
407 URL:=http://hostap.epitest.fi/
408 DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(HOSTAPD_PROVIDERS),PACKAGE_$(pkg)))
409 endef
410
411 define Package/hostapd-utils/description
412 This package contains a command line utility to control the
413 IEEE 802.1x/WPA/EAP/RADIUS Authenticator.
414 endef
415
416 define Package/wpa-cli
417 SECTION:=net
418 CATEGORY:=Network
419 SUBMENU:=WirelessAPD
420 DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(SUPPLICANT_PROVIDERS),PACKAGE_$(pkg)))
421 TITLE:=WPA Supplicant command line control utility
422 endef
423
424 define Package/eapol-test/Default
425 TITLE:=802.1x auth test utility
426 SECTION:=net
427 SUBMENU:=WirelessAPD
428 CATEGORY:=Network
429 DEPENDS:=$(DRV_DEPENDS) +libubus
430 endef
431
432 define Package/eapol-test
433 $(call Package/eapol-test/Default,$(1))
434 TITLE+= (built-in full)
435 VARIANT:=supplicant-full-internal
436 endef
437
438 define Package/eapol-test-openssl
439 $(call Package/eapol-test/Default,$(1))
440 TITLE+= (OpenSSL full)
441 VARIANT:=supplicant-full-openssl
442 CONFLICTS:=$(filter-out eapol-test-openssl ,$(EAPOL_TEST_PROVIDERS))
443 DEPENDS+=+libopenssl
444 PROVIDES:=eapol-test
445 endef
446
447 define Package/eapol-test-wolfssl
448 $(call Package/eapol-test/Default,$(1))
449 TITLE+= (wolfSSL full)
450 VARIANT:=supplicant-full-wolfssl
451 CONFLICTS:=$(filter-out eapol-test-openssl ,$(filter-out eapol-test-wolfssl ,$(EAPOL_TEST_PROVIDERS)))
452 DEPENDS+=+libwolfssl
453 PROVIDES:=eapol-test
454 endef
455
456
457 ifneq ($(wildcard $(PKG_BUILD_DIR)/.config_*),$(subst .configured_,.config_,$(STAMP_CONFIGURED)))
458 define Build/Configure/rebuild
459 $(FIND) $(PKG_BUILD_DIR) -name \*.o -or -name \*.a | $(XARGS) rm -f
460 rm -f $(PKG_BUILD_DIR)/hostapd/hostapd
461 rm -f $(PKG_BUILD_DIR)/wpa_supplicant/wpa_supplicant
462 rm -f $(PKG_BUILD_DIR)/.config_*
463 touch $(subst .configured_,.config_,$(STAMP_CONFIGURED))
464 endef
465 endif
466
467 define Build/Configure
468 $(Build/Configure/rebuild)
469 $(if $(wildcard ./files/hostapd-$(CONFIG_VARIANT).config), \
470 $(CP) ./files/hostapd-$(CONFIG_VARIANT).config $(PKG_BUILD_DIR)/hostapd/.config \
471 )
472 $(if $(wildcard ./files/wpa_supplicant-$(CONFIG_VARIANT).config), \
473 $(CP) ./files/wpa_supplicant-$(CONFIG_VARIANT).config $(PKG_BUILD_DIR)/wpa_supplicant/.config
474 )
475 endef
476
477 TARGET_CPPFLAGS := \
478 -I$(STAGING_DIR)/usr/include/libnl-tiny \
479 -I$(PKG_BUILD_DIR)/src/crypto \
480 $(TARGET_CPPFLAGS) \
481 -DCONFIG_LIBNL20 \
482 -D_GNU_SOURCE \
483 $(if $(CONFIG_WPA_MSG_MIN_PRIORITY),-DCONFIG_MSG_MIN_PRIORITY=$(CONFIG_WPA_MSG_MIN_PRIORITY))
484
485 TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
486 TARGET_LDFLAGS += -Wl,--gc-sections -flto=jobserver -fuse-linker-plugin -lubox -lubus
487
488 ifdef CONFIG_PACKAGE_kmod-cfg80211
489 TARGET_LDFLAGS += -lm -lnl-tiny
490 endif
491
492 ifdef CONFIG_WPA_ENABLE_WEP
493 DRIVER_MAKEOPTS += CONFIG_WEP=y
494 endif
495
496 define Build/RunMake
497 CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
498 $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(1) \
499 $(TARGET_CONFIGURE_OPTS) \
500 $(DRIVER_MAKEOPTS) \
501 LIBS="$(TARGET_LDFLAGS)" \
502 LIBS_c="$(TARGET_LDFLAGS_C)" \
503 AR="$(TARGET_CROSS)gcc-ar" \
504 BCHECK= \
505 $(2)
506 endef
507
508 define Build/Compile/wpad
509 echo ` \
510 $(call Build/RunMake,hostapd,-s MULTICALL=1 dump_cflags); \
511 $(call Build/RunMake,wpa_supplicant,-s MULTICALL=1 dump_cflags) | \
512 sed -e 's,-n ,,g' -e 's^$(TARGET_CFLAGS)^^' \
513 ` > $(PKG_BUILD_DIR)/.cflags
514 sed -i 's/"/\\"/g' $(PKG_BUILD_DIR)/.cflags
515 +$(call Build/RunMake,hostapd, \
516 CFLAGS="$$$$(cat $(PKG_BUILD_DIR)/.cflags)" \
517 MULTICALL=1 \
518 hostapd_cli hostapd_multi.a \
519 )
520 +$(call Build/RunMake,wpa_supplicant, \
521 CFLAGS="$$$$(cat $(PKG_BUILD_DIR)/.cflags)" \
522 MULTICALL=1 \
523 wpa_cli wpa_supplicant_multi.a \
524 )
525 +export MAKEFLAGS="$(MAKE_JOBSERVER)"; $(TARGET_CC) -o $(PKG_BUILD_DIR)/wpad \
526 $(TARGET_CFLAGS) \
527 ./files/multicall.c \
528 $(PKG_BUILD_DIR)/hostapd/hostapd_multi.a \
529 $(PKG_BUILD_DIR)/wpa_supplicant/wpa_supplicant_multi.a \
530 $(TARGET_LDFLAGS)
531 endef
532
533 define Build/Compile/hostapd
534 +$(call Build/RunMake,hostapd, \
535 hostapd hostapd_cli \
536 )
537 endef
538
539 define Build/Compile/supplicant
540 +$(call Build/RunMake,wpa_supplicant, \
541 wpa_cli wpa_supplicant \
542 )
543 endef
544
545 define Build/Compile/supplicant-full-internal
546 +$(call Build/RunMake,wpa_supplicant, \
547 eapol_test \
548 )
549 endef
550
551 define Build/Compile/supplicant-full-openssl
552 +$(call Build/RunMake,wpa_supplicant, \
553 eapol_test \
554 )
555 endef
556
557 define Build/Compile/supplicant-full-wolfssl
558 +$(call Build/RunMake,wpa_supplicant, \
559 eapol_test \
560 )
561 endef
562
563 define Build/Compile
564 $(Build/Compile/$(LOCAL_TYPE))
565 $(Build/Compile/$(BUILD_VARIANT))
566 endef
567
568 define Install/hostapd
569 $(INSTALL_DIR) $(1)/usr/sbin
570 endef
571
572 define Install/supplicant
573 $(INSTALL_DIR) $(1)/usr/sbin
574 endef
575
576 define Package/hostapd-common/install
577 $(INSTALL_DIR) $(1)/lib/netifd $(1)/etc/rc.button $(1)/etc/hotplug.d/ieee80211 $(1)/etc/init.d
578 $(INSTALL_DATA) ./files/hostapd.sh $(1)/lib/netifd/hostapd.sh
579 $(INSTALL_BIN) ./files/wpad.init $(1)/etc/init.d/wpad
580 $(INSTALL_BIN) ./files/wps-hotplug.sh $(1)/etc/rc.button/wps
581 endef
582
583 define Package/hostapd/install
584 $(call Install/hostapd,$(1))
585 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd/hostapd $(1)/usr/sbin/
586 endef
587 Package/hostapd-basic/install = $(Package/hostapd/install)
588 Package/hostapd-hs20/install = $(Package/hostapd/install)
589 Package/hostapd-mini/install = $(Package/hostapd/install)
590 Package/hostapd-openssl/install = $(Package/hostapd/install)
591 Package/hostapd-wolfssl/install = $(Package/hostapd/install)
592
593 ifneq ($(LOCAL_TYPE),supplicant)
594 define Package/hostapd-utils/install
595 $(INSTALL_DIR) $(1)/usr/sbin
596 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd/hostapd_cli $(1)/usr/sbin/
597 endef
598 endif
599
600 define Package/wpad/install
601 $(call Install/hostapd,$(1))
602 $(call Install/supplicant,$(1))
603 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wpad $(1)/usr/sbin/
604 $(LN) wpad $(1)/usr/sbin/hostapd
605 $(LN) wpad $(1)/usr/sbin/wpa_supplicant
606 endef
607 Package/wpad-basic/install = $(Package/wpad/install)
608 Package/wpad-basic-wolfssl/install = $(Package/wpad/install)
609 Package/wpad-mini/install = $(Package/wpad/install)
610 Package/wpad-openssl/install = $(Package/wpad/install)
611 Package/wpad-wolfssl/install = $(Package/wpad/install)
612 Package/wpad-mesh-openssl/install = $(Package/wpad/install)
613 Package/wpad-mesh-wolfssl/install = $(Package/wpad/install)
614
615 define Package/wpa-supplicant/install
616 $(call Install/supplicant,$(1))
617 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wpa_supplicant/wpa_supplicant $(1)/usr/sbin/
618 endef
619 Package/wpa-supplicant-basic/install = $(Package/wpa-supplicant/install)
620 Package/wpa-supplicant-mini/install = $(Package/wpa-supplicant/install)
621 Package/wpa-supplicant-p2p/install = $(Package/wpa-supplicant/install)
622 Package/wpa-supplicant-openssl/install = $(Package/wpa-supplicant/install)
623 Package/wpa-supplicant-wolfssl/install = $(Package/wpa-supplicant/install)
624 Package/wpa-supplicant-mesh-openssl/install = $(Package/wpa-supplicant/install)
625 Package/wpa-supplicant-mesh-wolfssl/install = $(Package/wpa-supplicant/install)
626
627 ifneq ($(LOCAL_TYPE),hostapd)
628 define Package/wpa-cli/install
629 $(INSTALL_DIR) $(1)/usr/sbin
630 $(CP) $(PKG_BUILD_DIR)/wpa_supplicant/wpa_cli $(1)/usr/sbin/
631 endef
632 endif
633
634 ifeq ($(BUILD_VARIANT),supplicant-full-internal)
635 define Package/eapol-test/install
636 $(INSTALL_DIR) $(1)/usr/sbin
637 $(CP) $(PKG_BUILD_DIR)/wpa_supplicant/eapol_test $(1)/usr/sbin/
638 endef
639 endif
640
641 ifeq ($(BUILD_VARIANT),supplicant-full-openssl)
642 define Package/eapol-test-openssl/install
643 $(INSTALL_DIR) $(1)/usr/sbin
644 $(CP) $(PKG_BUILD_DIR)/wpa_supplicant/eapol_test $(1)/usr/sbin/
645 endef
646 endif
647
648 ifeq ($(BUILD_VARIANT),supplicant-full-wolfssl)
649 define Package/eapol-test-wolfssl/install
650 $(INSTALL_DIR) $(1)/usr/sbin
651 $(CP) $(PKG_BUILD_DIR)/wpa_supplicant/eapol_test $(1)/usr/sbin/
652 endef
653 endif
654
655 $(eval $(call BuildPackage,hostapd))
656 $(eval $(call BuildPackage,hostapd-basic))
657 $(eval $(call BuildPackage,hostapd-hs20))
658 $(eval $(call BuildPackage,hostapd-mini))
659 $(eval $(call BuildPackage,hostapd-openssl))
660 $(eval $(call BuildPackage,hostapd-wolfssl))
661 $(eval $(call BuildPackage,wpad))
662 $(eval $(call BuildPackage,wpad-mesh-openssl))
663 $(eval $(call BuildPackage,wpad-mesh-wolfssl))
664 $(eval $(call BuildPackage,wpad-basic))
665 $(eval $(call BuildPackage,wpad-basic-wolfssl))
666 $(eval $(call BuildPackage,wpad-mini))
667 $(eval $(call BuildPackage,wpad-openssl))
668 $(eval $(call BuildPackage,wpad-wolfssl))
669 $(eval $(call BuildPackage,wpa-supplicant))
670 $(eval $(call BuildPackage,wpa-supplicant-mesh-openssl))
671 $(eval $(call BuildPackage,wpa-supplicant-mesh-wolfssl))
672 $(eval $(call BuildPackage,wpa-supplicant-basic))
673 $(eval $(call BuildPackage,wpa-supplicant-mini))
674 $(eval $(call BuildPackage,wpa-supplicant-p2p))
675 $(eval $(call BuildPackage,wpa-supplicant-openssl))
676 $(eval $(call BuildPackage,wpa-supplicant-wolfssl))
677 $(eval $(call BuildPackage,wpa-cli))
678 $(eval $(call BuildPackage,hostapd-utils))
679 $(eval $(call BuildPackage,hostapd-common))
680 $(eval $(call BuildPackage,eapol-test))
681 $(eval $(call BuildPackage,eapol-test-openssl))
682 $(eval $(call BuildPackage,eapol-test-wolfssl))