Makefile 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  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. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=hostapd
  8. PKG_RELEASE:=2
  9. PKG_SOURCE_URL:=http://w1.fi/hostap.git
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE_DATE:=2018-12-02
  12. PKG_SOURCE_VERSION:=c2c6c01bb8b6fafc2074b46a53c4eab2c145ac6f
  13. PKG_MIRROR_HASH:=d381123fe42059b553d96122a03c35e7d1709153c3aaf10fa4e74fe59be243dd
  14. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  15. PKG_LICENSE:=BSD-3-Clause
  16. PKG_CPE_ID:=cpe:/a:w1.fi:hostapd
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_CONFIG_DEPENDS:= \
  19. CONFIG_WPA_SUPPLICANT_NO_TIMESTAMP_CHECK \
  20. CONFIG_PACKAGE_kmod-ath9k \
  21. CONFIG_PACKAGE_kmod-cfg80211 \
  22. CONFIG_PACKAGE_hostapd \
  23. CONFIG_PACKAGE_hostapd-basic \
  24. CONFIG_PACKAGE_hostapd-mini \
  25. CONFIG_WPA_RFKILL_SUPPORT \
  26. CONFIG_DRIVER_WEXT_SUPPORT \
  27. CONFIG_DRIVER_11N_SUPPORT \
  28. CONFIG_DRIVER_11AC_SUPPORT \
  29. EAPOL_TEST_PROVIDERS:=eapol-test eapol-test-openssl eapol-test-wolfssl
  30. SUPPLICANT_PROVIDERS:=
  31. HOSTAPD_PROVIDERS:=
  32. LOCAL_TYPE=$(strip \
  33. $(if $(findstring wpad,$(BUILD_VARIANT)),wpad, \
  34. $(if $(findstring supplicant,$(BUILD_VARIANT)),supplicant, \
  35. hostapd \
  36. )))
  37. LOCAL_AND_LIB_VARIANT=$(patsubst hostapd-%,%,\
  38. $(patsubst wpad-%,%,\
  39. $(patsubst supplicant-%,%,\
  40. $(BUILD_VARIANT)\
  41. )))
  42. LOCAL_VARIANT=$(patsubst %-internal,%,\
  43. $(patsubst %-openssl,%,\
  44. $(patsubst %-wolfssl,%,\
  45. $(LOCAL_AND_LIB_VARIANT)\
  46. )))
  47. SSL_VARIANT=$(strip \
  48. $(if $(findstring openssl,$(LOCAL_AND_LIB_VARIANT)),openssl,\
  49. $(if $(findstring wolfssl,$(LOCAL_AND_LIB_VARIANT)),wolfssl,\
  50. internal\
  51. )))
  52. CONFIG_VARIANT:=$(LOCAL_VARIANT)
  53. ifeq ($(LOCAL_VARIANT),mesh)
  54. CONFIG_VARIANT:=full
  55. endif
  56. PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  57. include $(INCLUDE_DIR)/package.mk
  58. STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(CONFIG_WPA_MSG_MIN_PRIORITY)
  59. ifneq ($(CONFIG_DRIVER_11N_SUPPORT),)
  60. HOSTAPD_IEEE80211N:=y
  61. endif
  62. ifneq ($(CONFIG_DRIVER_11AC_SUPPORT),)
  63. HOSTAPD_IEEE80211AC:=y
  64. endif
  65. DRIVER_MAKEOPTS= \
  66. CONFIG_ACS=$(CONFIG_PACKAGE_kmod-cfg80211) \
  67. CONFIG_DRIVER_NL80211=$(CONFIG_PACKAGE_kmod-cfg80211) \
  68. CONFIG_IEEE80211N=$(HOSTAPD_IEEE80211N) \
  69. CONFIG_IEEE80211AC=$(HOSTAPD_IEEE80211AC) \
  70. CONFIG_DRIVER_WEXT=$(CONFIG_DRIVER_WEXT_SUPPORT) \
  71. space :=
  72. space +=
  73. ifeq ($(LOCAL_VARIANT),full)
  74. DRIVER_MAKEOPTS += CONFIG_IEEE80211W=$(CONFIG_DRIVER_11W_SUPPORT)
  75. endif
  76. ifeq ($(LOCAL_VARIANT),basic)
  77. DRIVER_MAKEOPTS += CONFIG_IEEE80211W=$(CONFIG_DRIVER_11W_SUPPORT)
  78. endif
  79. ifeq ($(LOCAL_VARIANT),full)
  80. ifeq ($(SSL_VARIANT),openssl)
  81. DRIVER_MAKEOPTS += CONFIG_TLS=openssl CONFIG_SAE=y CONFIG_OWE=y CONFIG_SUITEB192=y
  82. TARGET_LDFLAGS += -lcrypto -lssl
  83. endif
  84. ifeq ($(SSL_VARIANT),wolfssl)
  85. DRIVER_MAKEOPTS += CONFIG_TLS=wolfssl CONFIG_WPS_NFC=1 CONFIG_SAE=y CONFIG_OWE=y CONFIG_SUITEB192=y
  86. TARGET_LDFLAGS += -lwolfssl
  87. endif
  88. endif
  89. ifneq ($(LOCAL_TYPE),hostapd)
  90. ifeq ($(LOCAL_VARIANT),mesh)
  91. ifeq ($(SSL_VARIANT),openssl)
  92. DRIVER_MAKEOPTS += CONFIG_TLS=openssl CONFIG_AP=y CONFIG_SAE=y CONFIG_MESH=y
  93. TARGET_LDFLAGS += -lcrypto -lssl
  94. endif
  95. ifeq ($(SSL_VARIANT),wolfssl)
  96. DRIVER_MAKEOPTS += CONFIG_TLS=wolfssl CONFIG_WPS_NFC=1 CONFIG_AP=y CONFIG_SAE=y CONFIG_MESH=y
  97. TARGET_LDFLAGS += -lwolfssl
  98. endif
  99. endif
  100. ifdef CONFIG_WPA_SUPPLICANT_NO_TIMESTAMP_CHECK
  101. TARGET_CFLAGS += -DNO_TIMESTAMP_CHECK
  102. endif
  103. ifdef CONFIG_WPA_RFKILL_SUPPORT
  104. DRIVER_MAKEOPTS += NEED_RFKILL=y
  105. endif
  106. DRIVER_MAKEOPTS += \
  107. CONFIG_DRIVER_ROBOSWITCH=$(CONFIG_PACKAGE_kmod-switch)
  108. endif
  109. ifdef CONFIG_USE_GLIBC
  110. TARGET_LDFLAGS += -lrt
  111. TARGET_LDFLAGS_C += -lrt
  112. endif
  113. DRV_DEPENDS:=+PACKAGE_kmod-cfg80211:libnl-tiny
  114. define Package/hostapd/Default
  115. SECTION:=net
  116. CATEGORY:=Network
  117. TITLE:=IEEE 802.1x Authenticator
  118. URL:=http://hostap.epitest.fi/
  119. DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
  120. PROVIDES:=hostapd
  121. CONFLICTS:=$(HOSTAPD_PROVIDERS)
  122. HOSTAPD_PROVIDERS+=$(1)
  123. endef
  124. define Package/hostapd
  125. $(call Package/hostapd/Default,$(1))
  126. TITLE+= (full)
  127. VARIANT:=full-internal
  128. endef
  129. define Package/hostapd/description
  130. This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS
  131. Authenticator.
  132. endef
  133. define Package/hostapd-openssl
  134. $(call Package/hostapd/Default,$(1))
  135. TITLE+= (full)
  136. VARIANT:=full-openssl
  137. DEPENDS+=+libopenssl
  138. endef
  139. Package/hostapd-openssl/description = $(Package/hostapd/description)
  140. define Package/hostapd-wolfssl
  141. $(call Package/hostapd/Default,$(1))
  142. TITLE+= (full)
  143. VARIANT:=full-wolfssl
  144. DEPENDS+=+libwolfssl
  145. endef
  146. Package/hostapd-wolfssl/description = $(Package/hostapd/description)
  147. define Package/hostapd-basic
  148. $(call Package/hostapd/Default,$(1))
  149. TITLE+= (WPA-PSK, 11r and 11w)
  150. VARIANT:=basic
  151. endef
  152. define Package/hostapd-basic/description
  153. This package contains a basic IEEE 802.1x/WPA Authenticator with WPA-PSK, 802.11r and 802.11w support.
  154. endef
  155. define Package/hostapd-mini
  156. $(call Package/hostapd/Default,$(1))
  157. TITLE+= (WPA-PSK only)
  158. VARIANT:=mini
  159. endef
  160. define Package/hostapd-mini/description
  161. This package contains a minimal IEEE 802.1x/WPA Authenticator (WPA-PSK only).
  162. endef
  163. define Package/wpad/Default
  164. SECTION:=net
  165. CATEGORY:=Network
  166. TITLE:=IEEE 802.1x Authenticator/Supplicant
  167. DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
  168. URL:=http://hostap.epitest.fi/
  169. PROVIDES:=hostapd wpa-supplicant
  170. CONFLICTS:=$(HOSTAPD_PROVIDERS) $(SUPPLICANT_PROVIDERS)
  171. HOSTAPD_PROVIDERS+=$(1)
  172. SUPPLICANT_PROVIDERS+=$(1)
  173. endef
  174. define Package/wpad
  175. $(call Package/wpad/Default,$(1))
  176. TITLE+= (full)
  177. VARIANT:=wpad-full-internal
  178. endef
  179. define Package/wpad/description
  180. This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS
  181. Authenticator and Supplicant
  182. endef
  183. define Package/wpad-openssl
  184. $(call Package/wpad/Default,$(1))
  185. TITLE+= (full)
  186. VARIANT:=wpad-full-openssl
  187. DEPENDS+=+libopenssl
  188. endef
  189. Package/wpad-openssl/description = $(Package/wpad/description)
  190. define Package/wpad-wolfssl
  191. $(call Package/wpad/Default,$(1))
  192. TITLE+= (full)
  193. VARIANT:=wpad-full-wolfssl
  194. DEPENDS+=+libwolfssl
  195. endef
  196. Package/wpad-wolfssl/description = $(Package/wpad/description)
  197. define Package/wpad-basic
  198. $(call Package/wpad/Default,$(1))
  199. TITLE+= (WPA-PSK, 11r and 11w)
  200. VARIANT:=wpad-basic
  201. endef
  202. define Package/wpad-basic/description
  203. This package contains a basic IEEE 802.1x/WPA Authenticator and Supplicant with WPA-PSK, 802.11r and 802.11w support.
  204. endef
  205. define Package/wpad-mini
  206. $(call Package/wpad/Default,$(1))
  207. TITLE+= (WPA-PSK only)
  208. VARIANT:=wpad-mini
  209. endef
  210. define Package/wpad-mini/description
  211. This package contains a minimal IEEE 802.1x/WPA Authenticator and Supplicant (WPA-PSK only).
  212. endef
  213. define Package/wpad-mesh
  214. $(call Package/wpad/Default,$(1))
  215. TITLE+= (with 802.11s mesh and SAE support)
  216. DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN)
  217. PROVIDES+=wpa-supplicant-mesh wpad-mesh
  218. endef
  219. define Package/wpad-mesh/description
  220. This package contains a minimal IEEE 802.1x/WPA Authenticator and Supplicant (with 802.11s mesh and SAE support).
  221. endef
  222. define Package/wpad-mesh-openssl
  223. $(call Package/wpad-mesh,$(1))
  224. DEPENDS+=+libopenssl
  225. VARIANT:=wpad-mesh-openssl
  226. endef
  227. Package/wpad-mesh-openssl/description = $(Package/wpad-mesh/description)
  228. define Package/wpad-mesh-wolfssl
  229. $(call Package/wpad-mesh,$(1))
  230. DEPENDS+=+libwolfssl
  231. VARIANT:=wpad-mesh-wolfssl
  232. endef
  233. Package/wpad-mesh-wolfssl/description = $(Package/wpad-mesh/description)
  234. define Package/wpa-supplicant/Default
  235. SECTION:=net
  236. CATEGORY:=Network
  237. TITLE:=WPA Supplicant
  238. URL:=http://hostap.epitest.fi/wpa_supplicant/
  239. DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
  240. PROVIDES:=wpa-supplicant
  241. CONFLICTS:=$(SUPPLICANT_PROVIDERS)
  242. SUPPLICANT_PROVIDERS+=$(1)
  243. endef
  244. define Package/wpa-supplicant
  245. $(call Package/wpa-supplicant/Default,$(1))
  246. VARIANT:=supplicant-full-internal
  247. endef
  248. define Package/wpa-supplicant-openssl
  249. $(call Package/wpa-supplicant/Default,$(1))
  250. VARIANT:=supplicant-full-openssl
  251. DEPENDS+=+libopenssl
  252. endef
  253. define Package/wpa-supplicant-wolfssl
  254. $(call Package/wpa-supplicant/Default,$(1))
  255. VARIANT:=supplicant-full-wolfssl
  256. DEPENDS+=+libwolfssl
  257. endef
  258. define Package/wpa-supplicant/config
  259. source "$(SOURCE)/Config.in"
  260. endef
  261. define Package/wpa-supplicant-p2p
  262. $(call Package/wpa-supplicant/Default,$(1))
  263. TITLE+= (with Wi-Fi P2P support)
  264. DEPENDS+=@PACKAGE_kmod-cfg80211
  265. VARIANT:=supplicant-p2p-internal
  266. endef
  267. define Package/wpa-supplicant-mesh/Default
  268. $(call Package/wpa-supplicant/Default,$(1))
  269. TITLE+= (with 802.11s and SAE)
  270. DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN)
  271. PROVIDES+=wpa-supplicant-mesh
  272. endef
  273. define Package/wpa-supplicant-mesh-openssl
  274. $(call Package/wpa-supplicant-mesh/Default,$(1))
  275. VARIANT:=supplicant-mesh-openssl
  276. DEPENDS+=+libopenssl
  277. endef
  278. define Package/wpa-supplicant-mesh-wolfssl
  279. $(call Package/wpa-supplicant-mesh/Default,$(1))
  280. VARIANT:=supplicant-mesh-wolfssl
  281. DEPENDS+=+libwolfssl
  282. endef
  283. define Package/wpa-supplicant-basic
  284. $(call Package/wpa-supplicant/Default,$(1))
  285. TITLE+= (with 11r and 11w)
  286. VARIANT:=supplicant-basic
  287. endef
  288. define Package/wpa-supplicant-mini
  289. $(call Package/wpa-supplicant/Default,$(1))
  290. TITLE+= (minimal version)
  291. VARIANT:=supplicant-mini
  292. endef
  293. define Package/hostapd-common
  294. TITLE:=hostapd/wpa_supplicant common support files
  295. SECTION:=net
  296. CATEGORY:=Network
  297. endef
  298. define Package/hostapd-utils
  299. SECTION:=net
  300. CATEGORY:=Network
  301. TITLE:=IEEE 802.1x Authenticator (utils)
  302. URL:=http://hostap.epitest.fi/
  303. DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(HOSTAPD_PROVIDERS),PACKAGE_$(pkg)))
  304. endef
  305. define Package/hostapd-utils/description
  306. This package contains a command line utility to control the
  307. IEEE 802.1x/WPA/EAP/RADIUS Authenticator.
  308. endef
  309. define Package/wpa-cli
  310. SECTION:=net
  311. CATEGORY:=Network
  312. DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(SUPPLICANT_PROVIDERS),PACKAGE_$(pkg)))
  313. TITLE:=WPA Supplicant command line control utility
  314. endef
  315. define Package/eapol-test
  316. TITLE:=802.1x authentication test utility
  317. SECTION:=net
  318. CATEGORY:=Network
  319. VARIANT:=supplicant-full-internal
  320. DEPENDS:=$(DRV_DEPENDS) +libubus
  321. endef
  322. define Package/eapol-test-openssl
  323. TITLE:=802.1x authentication test utility
  324. SECTION:=net
  325. CATEGORY:=Network
  326. VARIANT:=supplicant-full-openssl
  327. CONFLICTS:=$(filter-out eapol-test-openssl ,$(EAPOL_TEST_PROVIDERS))
  328. DEPENDS:=$(DRV_DEPENDS) +libubus +libopenssl
  329. PROVIDES:=eapol-test
  330. endef
  331. define Package/eapol-test-wolfssl
  332. TITLE:=802.1x authentication test utility
  333. SECTION:=net
  334. CATEGORY:=Network
  335. VARIANT:=supplicant-full-wolfssl
  336. CONFLICTS:=$(filter-out eapol-test-openssl ,$(filter-out eapol-test-wolfssl ,$(EAPOL_TEST_PROVIDERS)))
  337. DEPENDS:=$(DRV_DEPENDS) +libubus +libwolfssl
  338. PROVIDES:=eapol-test
  339. endef
  340. ifneq ($(wildcard $(PKG_BUILD_DIR)/.config_*),$(subst .configured_,.config_,$(STAMP_CONFIGURED)))
  341. define Build/Configure/rebuild
  342. $(FIND) $(PKG_BUILD_DIR) -name \*.o -or -name \*.a | $(XARGS) rm -f
  343. rm -f $(PKG_BUILD_DIR)/hostapd/hostapd
  344. rm -f $(PKG_BUILD_DIR)/wpa_supplicant/wpa_supplicant
  345. rm -f $(PKG_BUILD_DIR)/.config_*
  346. touch $(subst .configured_,.config_,$(STAMP_CONFIGURED))
  347. endef
  348. endif
  349. define Build/Configure
  350. $(Build/Configure/rebuild)
  351. $(if $(wildcard ./files/hostapd-$(CONFIG_VARIANT).config), \
  352. $(CP) ./files/hostapd-$(CONFIG_VARIANT).config $(PKG_BUILD_DIR)/hostapd/.config \
  353. )
  354. $(CP) ./files/wpa_supplicant-$(CONFIG_VARIANT).config $(PKG_BUILD_DIR)/wpa_supplicant/.config
  355. endef
  356. TARGET_CPPFLAGS := \
  357. -I$(STAGING_DIR)/usr/include/libnl-tiny \
  358. -I$(PKG_BUILD_DIR)/src/crypto \
  359. $(TARGET_CPPFLAGS) \
  360. -DCONFIG_LIBNL20 \
  361. -D_GNU_SOURCE \
  362. $(if $(CONFIG_WPA_MSG_MIN_PRIORITY),-DCONFIG_MSG_MIN_PRIORITY=$(CONFIG_WPA_MSG_MIN_PRIORITY))
  363. TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
  364. TARGET_LDFLAGS += -Wl,--gc-sections -flto=jobserver -fuse-linker-plugin -lubox -lubus
  365. ifdef CONFIG_PACKAGE_kmod-cfg80211
  366. TARGET_LDFLAGS += -lm -lnl-tiny
  367. endif
  368. define Build/RunMake
  369. CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
  370. $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(1) \
  371. $(TARGET_CONFIGURE_OPTS) \
  372. $(DRIVER_MAKEOPTS) \
  373. LIBS="$(TARGET_LDFLAGS)" \
  374. LIBS_c="$(TARGET_LDFLAGS_C)" \
  375. AR="$(TARGET_CROSS)gcc-ar" \
  376. BCHECK= \
  377. $(2)
  378. endef
  379. define Build/Compile/wpad
  380. echo ` \
  381. $(call Build/RunMake,hostapd,-s MULTICALL=1 dump_cflags); \
  382. $(call Build/RunMake,wpa_supplicant,-s MULTICALL=1 dump_cflags) | \
  383. sed -e 's,-n ,,g' -e 's^$(TARGET_CFLAGS)^^' \
  384. ` > $(PKG_BUILD_DIR)/.cflags
  385. sed -i 's/"/\\"/g' $(PKG_BUILD_DIR)/.cflags
  386. +$(call Build/RunMake,hostapd, \
  387. CFLAGS="$$$$(cat $(PKG_BUILD_DIR)/.cflags)" \
  388. MULTICALL=1 \
  389. hostapd_cli hostapd_multi.a \
  390. )
  391. +$(call Build/RunMake,wpa_supplicant, \
  392. CFLAGS="$$$$(cat $(PKG_BUILD_DIR)/.cflags)" \
  393. MULTICALL=1 \
  394. wpa_cli wpa_supplicant_multi.a \
  395. )
  396. +export MAKEFLAGS="$(MAKE_JOBSERVER)"; $(TARGET_CC) -o $(PKG_BUILD_DIR)/wpad \
  397. $(TARGET_CFLAGS) \
  398. ./files/multicall.c \
  399. $(PKG_BUILD_DIR)/hostapd/hostapd_multi.a \
  400. $(PKG_BUILD_DIR)/wpa_supplicant/wpa_supplicant_multi.a \
  401. $(TARGET_LDFLAGS)
  402. endef
  403. define Build/Compile/hostapd
  404. +$(call Build/RunMake,hostapd, \
  405. hostapd hostapd_cli \
  406. )
  407. endef
  408. define Build/Compile/supplicant
  409. +$(call Build/RunMake,wpa_supplicant, \
  410. wpa_cli wpa_supplicant \
  411. )
  412. endef
  413. define Build/Compile/supplicant-full-internal
  414. +$(call Build/RunMake,wpa_supplicant, \
  415. eapol_test \
  416. )
  417. endef
  418. define Build/Compile/supplicant-full-openssl
  419. +$(call Build/RunMake,wpa_supplicant, \
  420. eapol_test \
  421. )
  422. endef
  423. define Build/Compile/supplicant-full-wolfssl
  424. +$(call Build/RunMake,wpa_supplicant, \
  425. eapol_test \
  426. )
  427. endef
  428. define Build/Compile
  429. $(Build/Compile/$(LOCAL_TYPE))
  430. $(Build/Compile/$(BUILD_VARIANT))
  431. endef
  432. define Install/hostapd
  433. $(INSTALL_DIR) $(1)/usr/sbin
  434. endef
  435. define Install/supplicant
  436. $(INSTALL_DIR) $(1)/usr/sbin
  437. endef
  438. define Package/hostapd-common/install
  439. $(INSTALL_DIR) $(1)/lib/netifd $(1)/etc/rc.button
  440. $(INSTALL_DATA) ./files/hostapd.sh $(1)/lib/netifd/hostapd.sh
  441. $(INSTALL_BIN) ./files/wps-hotplug.sh $(1)/etc/rc.button/wps
  442. endef
  443. define Package/hostapd/install
  444. $(call Install/hostapd,$(1))
  445. $(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd/hostapd $(1)/usr/sbin/
  446. endef
  447. Package/hostapd-basic/install = $(Package/hostapd/install)
  448. Package/hostapd-mini/install = $(Package/hostapd/install)
  449. Package/hostapd-openssl/install = $(Package/hostapd/install)
  450. Package/hostapd-wolfssl/install = $(Package/hostapd/install)
  451. ifneq ($(LOCAL_TYPE),supplicant)
  452. define Package/hostapd-utils/install
  453. $(INSTALL_DIR) $(1)/usr/sbin
  454. $(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd/hostapd_cli $(1)/usr/sbin/
  455. endef
  456. endif
  457. define Package/wpad/install
  458. $(call Install/hostapd,$(1))
  459. $(call Install/supplicant,$(1))
  460. $(INSTALL_BIN) $(PKG_BUILD_DIR)/wpad $(1)/usr/sbin/
  461. $(LN) wpad $(1)/usr/sbin/hostapd
  462. $(LN) wpad $(1)/usr/sbin/wpa_supplicant
  463. endef
  464. Package/wpad-basic/install = $(Package/wpad/install)
  465. Package/wpad-mini/install = $(Package/wpad/install)
  466. Package/wpad-openssl/install = $(Package/wpad/install)
  467. Package/wpad-wolfssl/install = $(Package/wpad/install)
  468. Package/wpad-mesh-openssl/install = $(Package/wpad/install)
  469. Package/wpad-mesh-wolfssl/install = $(Package/wpad/install)
  470. define Package/wpa-supplicant/install
  471. $(call Install/supplicant,$(1))
  472. $(INSTALL_BIN) $(PKG_BUILD_DIR)/wpa_supplicant/wpa_supplicant $(1)/usr/sbin/
  473. endef
  474. Package/wpa-supplicant-basic/install = $(Package/wpa-supplicant/install)
  475. Package/wpa-supplicant-mini/install = $(Package/wpa-supplicant/install)
  476. Package/wpa-supplicant-p2p/install = $(Package/wpa-supplicant/install)
  477. Package/wpa-supplicant-openssl/install = $(Package/wpa-supplicant/install)
  478. Package/wpa-supplicant-wolfssl/install = $(Package/wpa-supplicant/install)
  479. Package/wpa-supplicant-mesh-openssl/install = $(Package/wpa-supplicant/install)
  480. Package/wpa-supplicant-mesh-wolfssl/install = $(Package/wpa-supplicant/install)
  481. ifneq ($(LOCAL_TYPE),hostapd)
  482. define Package/wpa-cli/install
  483. $(INSTALL_DIR) $(1)/usr/sbin
  484. $(CP) $(PKG_BUILD_DIR)/wpa_supplicant/wpa_cli $(1)/usr/sbin/
  485. endef
  486. endif
  487. ifeq ($(BUILD_VARIANT),supplicant-full-internal)
  488. define Package/eapol-test/install
  489. $(INSTALL_DIR) $(1)/usr/sbin
  490. $(CP) $(PKG_BUILD_DIR)/wpa_supplicant/eapol_test $(1)/usr/sbin/
  491. endef
  492. endif
  493. ifeq ($(BUILD_VARIANT),supplicant-full-openssl)
  494. define Package/eapol-test-openssl/install
  495. $(INSTALL_DIR) $(1)/usr/sbin
  496. $(CP) $(PKG_BUILD_DIR)/wpa_supplicant/eapol_test $(1)/usr/sbin/
  497. endef
  498. endif
  499. ifeq ($(BUILD_VARIANT),supplicant-full-wolfssl)
  500. define Package/eapol-test-wolfssl/install
  501. $(INSTALL_DIR) $(1)/usr/sbin
  502. $(CP) $(PKG_BUILD_DIR)/wpa_supplicant/eapol_test $(1)/usr/sbin/
  503. endef
  504. endif
  505. $(eval $(call BuildPackage,hostapd))
  506. $(eval $(call BuildPackage,hostapd-basic))
  507. $(eval $(call BuildPackage,hostapd-mini))
  508. $(eval $(call BuildPackage,hostapd-openssl))
  509. $(eval $(call BuildPackage,hostapd-wolfssl))
  510. $(eval $(call BuildPackage,wpad))
  511. $(eval $(call BuildPackage,wpad-mesh-openssl))
  512. $(eval $(call BuildPackage,wpad-mesh-wolfssl))
  513. $(eval $(call BuildPackage,wpad-basic))
  514. $(eval $(call BuildPackage,wpad-mini))
  515. $(eval $(call BuildPackage,wpad-openssl))
  516. $(eval $(call BuildPackage,wpad-wolfssl))
  517. $(eval $(call BuildPackage,wpa-supplicant))
  518. $(eval $(call BuildPackage,wpa-supplicant-mesh-openssl))
  519. $(eval $(call BuildPackage,wpa-supplicant-mesh-wolfssl))
  520. $(eval $(call BuildPackage,wpa-supplicant-basic))
  521. $(eval $(call BuildPackage,wpa-supplicant-mini))
  522. $(eval $(call BuildPackage,wpa-supplicant-p2p))
  523. $(eval $(call BuildPackage,wpa-supplicant-openssl))
  524. $(eval $(call BuildPackage,wpa-supplicant-wolfssl))
  525. $(eval $(call BuildPackage,wpa-cli))
  526. $(eval $(call BuildPackage,hostapd-utils))
  527. $(eval $(call BuildPackage,hostapd-common))
  528. $(eval $(call BuildPackage,eapol-test))
  529. $(eval $(call BuildPackage,eapol-test-openssl))
  530. $(eval $(call BuildPackage,eapol-test-wolfssl))