Makefile 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679
  1. ifndef CC
  2. CC=gcc
  3. endif
  4. ifndef CFLAGS
  5. CFLAGS = -MMD -O2 -Wall -g
  6. endif
  7. export LIBDIR ?= /usr/local/lib/
  8. export BINDIR ?= /usr/local/sbin/
  9. PKG_CONFIG ?= pkg-config
  10. CFLAGS += -I../src
  11. CFLAGS += -I../src/utils
  12. -include .config
  13. BINALL=wpa_supplicant wpa_cli
  14. ifndef CONFIG_NO_WPA_PASSPHRASE
  15. BINALL += wpa_passphrase
  16. endif
  17. ALL = $(BINALL)
  18. ALL += systemd/wpa_supplicant.service
  19. ALL += systemd/wpa_supplicant@.service
  20. ALL += systemd/wpa_supplicant-nl80211@.service
  21. ALL += systemd/wpa_supplicant-wired@.service
  22. ALL += dbus/fi.epitest.hostap.WPASupplicant.service
  23. ALL += dbus/fi.w1.wpa_supplicant1.service
  24. all: verify_config $(ALL) dynamic_eap_methods
  25. verify_config:
  26. @if [ ! -r .config ]; then \
  27. echo 'Building wpa_supplicant requires a configuration file'; \
  28. echo '(.config). See README for more instructions. You can'; \
  29. echo 'run "cp defconfig .config" to create an example'; \
  30. echo 'configuration.'; \
  31. exit 1; \
  32. fi
  33. mkconfig:
  34. @if [ -f .config ]; then \
  35. echo '.config exists - did not replace it'; \
  36. exit 1; \
  37. fi
  38. echo CONFIG_DRIVER_HOSTAP=y >> .config
  39. echo CONFIG_DRIVER_WEXT=y >> .config
  40. $(DESTDIR)$(BINDIR)/%: %
  41. install -D $(<) $(@)
  42. install: $(addprefix $(DESTDIR)$(BINDIR)/,$(BINALL))
  43. $(MAKE) -C ../src install
  44. ifdef CONFIG_FIPS
  45. CONFIG_NO_RANDOM_POOL=
  46. CONFIG_OPENSSL_CMAC=y
  47. endif
  48. OBJS = config.o
  49. OBJS += notify.o
  50. OBJS += bss.o
  51. OBJS += eap_register.o
  52. OBJS += ../src/utils/common.o
  53. OBJS += ../src/utils/wpa_debug.o
  54. OBJS += ../src/utils/wpabuf.o
  55. OBJS_p = wpa_passphrase.o
  56. OBJS_p += ../src/utils/common.o
  57. OBJS_p += ../src/utils/wpa_debug.o
  58. OBJS_p += ../src/utils/wpabuf.o
  59. OBJS_c = wpa_cli.o ../src/common/wpa_ctrl.o
  60. OBJS_c += ../src/utils/wpa_debug.o
  61. OBJS_c += ../src/utils/common.o
  62. ifndef CONFIG_OS
  63. ifdef CONFIG_NATIVE_WINDOWS
  64. CONFIG_OS=win32
  65. else
  66. CONFIG_OS=unix
  67. endif
  68. endif
  69. ifeq ($(CONFIG_OS), internal)
  70. CFLAGS += -DOS_NO_C_LIB_DEFINES
  71. endif
  72. OBJS += ../src/utils/os_$(CONFIG_OS).o
  73. OBJS_p += ../src/utils/os_$(CONFIG_OS).o
  74. OBJS_c += ../src/utils/os_$(CONFIG_OS).o
  75. ifdef CONFIG_WPA_TRACE
  76. CFLAGS += -DWPA_TRACE
  77. OBJS += ../src/utils/trace.o
  78. OBJS_p += ../src/utils/trace.o
  79. OBJS_c += ../src/utils/trace.o
  80. OBJS_priv += ../src/utils/trace.o
  81. LDFLAGS += -rdynamic
  82. CFLAGS += -funwind-tables
  83. ifdef CONFIG_WPA_TRACE_BFD
  84. CFLAGS += -DWPA_TRACE_BFD
  85. LIBS += -lbfd
  86. LIBS_p += -lbfd
  87. LIBS_c += -lbfd
  88. endif
  89. endif
  90. ifndef CONFIG_ELOOP
  91. CONFIG_ELOOP=eloop
  92. endif
  93. OBJS += ../src/utils/$(CONFIG_ELOOP).o
  94. OBJS_c += ../src/utils/$(CONFIG_ELOOP).o
  95. ifeq ($(CONFIG_ELOOP), eloop)
  96. # Using glibc < 2.17 requires -lrt for clock_gettime()
  97. LIBS += -lrt
  98. LIBS_c += -lrt
  99. LIBS_p += -lrt
  100. endif
  101. ifdef CONFIG_ELOOP_POLL
  102. CFLAGS += -DCONFIG_ELOOP_POLL
  103. endif
  104. ifdef CONFIG_EAPOL_TEST
  105. CFLAGS += -Werror -DEAPOL_TEST
  106. endif
  107. ifdef CONFIG_HT_OVERRIDES
  108. CFLAGS += -DCONFIG_HT_OVERRIDES
  109. endif
  110. ifdef CONFIG_VHT_OVERRIDES
  111. CFLAGS += -DCONFIG_VHT_OVERRIDES
  112. endif
  113. ifndef CONFIG_BACKEND
  114. CONFIG_BACKEND=file
  115. endif
  116. ifeq ($(CONFIG_BACKEND), file)
  117. OBJS += config_file.o
  118. ifndef CONFIG_NO_CONFIG_BLOBS
  119. NEED_BASE64=y
  120. endif
  121. CFLAGS += -DCONFIG_BACKEND_FILE
  122. endif
  123. ifeq ($(CONFIG_BACKEND), winreg)
  124. OBJS += config_winreg.o
  125. endif
  126. ifeq ($(CONFIG_BACKEND), none)
  127. OBJS += config_none.o
  128. endif
  129. ifdef CONFIG_NO_CONFIG_WRITE
  130. CFLAGS += -DCONFIG_NO_CONFIG_WRITE
  131. endif
  132. ifdef CONFIG_NO_CONFIG_BLOBS
  133. CFLAGS += -DCONFIG_NO_CONFIG_BLOBS
  134. endif
  135. ifdef CONFIG_NO_SCAN_PROCESSING
  136. CFLAGS += -DCONFIG_NO_SCAN_PROCESSING
  137. endif
  138. ifdef CONFIG_IEEE80211W
  139. CFLAGS += -DCONFIG_IEEE80211W
  140. NEED_SHA256=y
  141. NEED_AES_OMAC1=y
  142. endif
  143. ifdef CONFIG_IEEE80211R
  144. CFLAGS += -DCONFIG_IEEE80211R
  145. OBJS += ../src/rsn_supp/wpa_ft.o
  146. NEED_80211_COMMON=y
  147. NEED_SHA256=y
  148. NEED_AES_OMAC1=y
  149. endif
  150. ifdef CONFIG_SAE
  151. CFLAGS += -DCONFIG_SAE
  152. OBJS += ../src/common/sae.o
  153. NEED_ECC=y
  154. NEED_DH_GROUPS=y
  155. endif
  156. ifdef CONFIG_WNM
  157. CFLAGS += -DCONFIG_WNM
  158. OBJS += wnm_sta.o
  159. endif
  160. ifdef CONFIG_TDLS
  161. CFLAGS += -DCONFIG_TDLS
  162. OBJS += ../src/rsn_supp/tdls.o
  163. NEED_SHA256=y
  164. NEED_AES_OMAC1=y
  165. endif
  166. ifdef CONFIG_TDLS_TESTING
  167. CFLAGS += -DCONFIG_TDLS_TESTING
  168. endif
  169. ifdef CONFIG_PEERKEY
  170. CFLAGS += -DCONFIG_PEERKEY
  171. endif
  172. ifndef CONFIG_NO_WPA
  173. OBJS += ../src/rsn_supp/wpa.o
  174. OBJS += ../src/rsn_supp/preauth.o
  175. OBJS += ../src/rsn_supp/pmksa_cache.o
  176. OBJS += ../src/rsn_supp/peerkey.o
  177. OBJS += ../src/rsn_supp/wpa_ie.o
  178. OBJS += ../src/common/wpa_common.o
  179. NEED_AES=y
  180. NEED_SHA1=y
  181. NEED_MD5=y
  182. NEED_RC4=y
  183. else
  184. CFLAGS += -DCONFIG_NO_WPA
  185. endif
  186. ifdef CONFIG_IBSS_RSN
  187. NEED_RSN_AUTHENTICATOR=y
  188. CFLAGS += -DCONFIG_IBSS_RSN
  189. OBJS += ibss_rsn.o
  190. endif
  191. ifdef CONFIG_P2P
  192. OBJS += p2p_supplicant.o
  193. OBJS += ../src/p2p/p2p.o
  194. OBJS += ../src/p2p/p2p_utils.o
  195. OBJS += ../src/p2p/p2p_parse.o
  196. OBJS += ../src/p2p/p2p_build.o
  197. OBJS += ../src/p2p/p2p_go_neg.o
  198. OBJS += ../src/p2p/p2p_sd.o
  199. OBJS += ../src/p2p/p2p_pd.o
  200. OBJS += ../src/p2p/p2p_invitation.o
  201. OBJS += ../src/p2p/p2p_dev_disc.o
  202. OBJS += ../src/p2p/p2p_group.o
  203. OBJS += ../src/ap/p2p_hostapd.o
  204. CFLAGS += -DCONFIG_P2P
  205. NEED_GAS=y
  206. NEED_OFFCHANNEL=y
  207. NEED_80211_COMMON=y
  208. CONFIG_WPS=y
  209. CONFIG_AP=y
  210. ifdef CONFIG_P2P_STRICT
  211. CFLAGS += -DCONFIG_P2P_STRICT
  212. endif
  213. endif
  214. ifdef CONFIG_WIFI_DISPLAY
  215. CFLAGS += -DCONFIG_WIFI_DISPLAY
  216. OBJS += wifi_display.o
  217. endif
  218. ifdef CONFIG_HS20
  219. OBJS += hs20_supplicant.o
  220. CFLAGS += -DCONFIG_HS20
  221. CONFIG_INTERWORKING=y
  222. endif
  223. ifdef CONFIG_INTERWORKING
  224. OBJS += interworking.o
  225. CFLAGS += -DCONFIG_INTERWORKING
  226. NEED_GAS=y
  227. endif
  228. include ../src/drivers/drivers.mak
  229. ifdef CONFIG_AP
  230. OBJS_d += $(DRV_BOTH_OBJS)
  231. CFLAGS += $(DRV_BOTH_CFLAGS)
  232. LDFLAGS += $(DRV_BOTH_LDFLAGS)
  233. LIBS += $(DRV_BOTH_LIBS)
  234. else
  235. NEED_AP_MLME=
  236. OBJS_d += $(DRV_WPA_OBJS)
  237. CFLAGS += $(DRV_WPA_CFLAGS)
  238. LDFLAGS += $(DRV_WPA_LDFLAGS)
  239. LIBS += $(DRV_WPA_LIBS)
  240. endif
  241. ifndef CONFIG_L2_PACKET
  242. CONFIG_L2_PACKET=linux
  243. endif
  244. OBJS_l2 += ../src/l2_packet/l2_packet_$(CONFIG_L2_PACKET).o
  245. ifeq ($(CONFIG_L2_PACKET), pcap)
  246. ifdef CONFIG_WINPCAP
  247. CFLAGS += -DCONFIG_WINPCAP
  248. LIBS += -lwpcap -lpacket
  249. LIBS_w += -lwpcap
  250. else
  251. LIBS += -ldnet -lpcap
  252. endif
  253. endif
  254. ifeq ($(CONFIG_L2_PACKET), winpcap)
  255. LIBS += -lwpcap -lpacket
  256. LIBS_w += -lwpcap
  257. endif
  258. ifeq ($(CONFIG_L2_PACKET), freebsd)
  259. LIBS += -lpcap
  260. endif
  261. ifdef CONFIG_EAP_TLS
  262. # EAP-TLS
  263. ifeq ($(CONFIG_EAP_TLS), dyn)
  264. CFLAGS += -DEAP_TLS_DYNAMIC
  265. EAPDYN += ../src/eap_peer/eap_tls.so
  266. else
  267. CFLAGS += -DEAP_TLS
  268. OBJS += ../src/eap_peer/eap_tls.o
  269. OBJS_h += ../src/eap_server/eap_server_tls.o
  270. endif
  271. TLS_FUNCS=y
  272. CONFIG_IEEE8021X_EAPOL=y
  273. endif
  274. ifdef CONFIG_EAP_UNAUTH_TLS
  275. # EAP-UNAUTH-TLS
  276. CFLAGS += -DEAP_UNAUTH_TLS
  277. ifndef CONFIG_EAP_UNAUTH_TLS
  278. OBJS += ../src/eap_peer/eap_tls.o
  279. OBJS_h += ../src/eap_server/eap_server_tls.o
  280. TLS_FUNCS=y
  281. endif
  282. CONFIG_IEEE8021X_EAPOL=y
  283. endif
  284. ifdef CONFIG_EAP_PEAP
  285. # EAP-PEAP
  286. ifeq ($(CONFIG_EAP_PEAP), dyn)
  287. CFLAGS += -DEAP_PEAP_DYNAMIC
  288. EAPDYN += ../src/eap_peer/eap_peap.so
  289. else
  290. CFLAGS += -DEAP_PEAP
  291. OBJS += ../src/eap_peer/eap_peap.o
  292. OBJS += ../src/eap_common/eap_peap_common.o
  293. OBJS_h += ../src/eap_server/eap_server_peap.o
  294. endif
  295. TLS_FUNCS=y
  296. CONFIG_IEEE8021X_EAPOL=y
  297. endif
  298. ifdef CONFIG_EAP_TTLS
  299. # EAP-TTLS
  300. ifeq ($(CONFIG_EAP_TTLS), dyn)
  301. CFLAGS += -DEAP_TTLS_DYNAMIC
  302. EAPDYN += ../src/eap_peer/eap_ttls.so
  303. else
  304. CFLAGS += -DEAP_TTLS
  305. OBJS += ../src/eap_peer/eap_ttls.o
  306. OBJS_h += ../src/eap_server/eap_server_ttls.o
  307. endif
  308. MS_FUNCS=y
  309. TLS_FUNCS=y
  310. CHAP=y
  311. CONFIG_IEEE8021X_EAPOL=y
  312. endif
  313. ifdef CONFIG_EAP_MD5
  314. # EAP-MD5
  315. ifeq ($(CONFIG_EAP_MD5), dyn)
  316. CFLAGS += -DEAP_MD5_DYNAMIC
  317. EAPDYN += ../src/eap_peer/eap_md5.so
  318. else
  319. CFLAGS += -DEAP_MD5
  320. OBJS += ../src/eap_peer/eap_md5.o
  321. OBJS_h += ../src/eap_server/eap_server_md5.o
  322. endif
  323. CHAP=y
  324. CONFIG_IEEE8021X_EAPOL=y
  325. endif
  326. # backwards compatibility for old spelling
  327. ifdef CONFIG_MSCHAPV2
  328. ifndef CONFIG_EAP_MSCHAPV2
  329. CONFIG_EAP_MSCHAPV2=y
  330. endif
  331. endif
  332. ifdef CONFIG_EAP_MSCHAPV2
  333. # EAP-MSCHAPv2
  334. ifeq ($(CONFIG_EAP_MSCHAPV2), dyn)
  335. CFLAGS += -DEAP_MSCHAPv2_DYNAMIC
  336. EAPDYN += ../src/eap_peer/eap_mschapv2.so
  337. EAPDYN += ../src/eap_peer/mschapv2.so
  338. else
  339. CFLAGS += -DEAP_MSCHAPv2
  340. OBJS += ../src/eap_peer/eap_mschapv2.o
  341. OBJS += ../src/eap_peer/mschapv2.o
  342. OBJS_h += ../src/eap_server/eap_server_mschapv2.o
  343. endif
  344. MS_FUNCS=y
  345. CONFIG_IEEE8021X_EAPOL=y
  346. endif
  347. ifdef CONFIG_EAP_GTC
  348. # EAP-GTC
  349. ifeq ($(CONFIG_EAP_GTC), dyn)
  350. CFLAGS += -DEAP_GTC_DYNAMIC
  351. EAPDYN += ../src/eap_peer/eap_gtc.so
  352. else
  353. CFLAGS += -DEAP_GTC
  354. OBJS += ../src/eap_peer/eap_gtc.o
  355. OBJS_h += ../src/eap_server/eap_server_gtc.o
  356. endif
  357. CONFIG_IEEE8021X_EAPOL=y
  358. endif
  359. ifdef CONFIG_EAP_OTP
  360. # EAP-OTP
  361. ifeq ($(CONFIG_EAP_OTP), dyn)
  362. CFLAGS += -DEAP_OTP_DYNAMIC
  363. EAPDYN += ../src/eap_peer/eap_otp.so
  364. else
  365. CFLAGS += -DEAP_OTP
  366. OBJS += ../src/eap_peer/eap_otp.o
  367. endif
  368. CONFIG_IEEE8021X_EAPOL=y
  369. endif
  370. ifdef CONFIG_EAP_SIM
  371. # EAP-SIM
  372. ifeq ($(CONFIG_EAP_SIM), dyn)
  373. CFLAGS += -DEAP_SIM_DYNAMIC
  374. EAPDYN += ../src/eap_peer/eap_sim.so
  375. else
  376. CFLAGS += -DEAP_SIM
  377. OBJS += ../src/eap_peer/eap_sim.o
  378. OBJS_h += ../src/eap_server/eap_server_sim.o
  379. endif
  380. CONFIG_IEEE8021X_EAPOL=y
  381. CONFIG_EAP_SIM_COMMON=y
  382. NEED_AES_CBC=y
  383. endif
  384. ifdef CONFIG_EAP_LEAP
  385. # EAP-LEAP
  386. ifeq ($(CONFIG_EAP_LEAP), dyn)
  387. CFLAGS += -DEAP_LEAP_DYNAMIC
  388. EAPDYN += ../src/eap_peer/eap_leap.so
  389. else
  390. CFLAGS += -DEAP_LEAP
  391. OBJS += ../src/eap_peer/eap_leap.o
  392. endif
  393. MS_FUNCS=y
  394. CONFIG_IEEE8021X_EAPOL=y
  395. endif
  396. ifdef CONFIG_EAP_PSK
  397. # EAP-PSK
  398. ifeq ($(CONFIG_EAP_PSK), dyn)
  399. CFLAGS += -DEAP_PSK_DYNAMIC
  400. EAPDYN += ../src/eap_peer/eap_psk.so
  401. else
  402. CFLAGS += -DEAP_PSK
  403. OBJS += ../src/eap_peer/eap_psk.o ../src/eap_common/eap_psk_common.o
  404. OBJS_h += ../src/eap_server/eap_server_psk.o
  405. endif
  406. CONFIG_IEEE8021X_EAPOL=y
  407. NEED_AES=y
  408. NEED_AES_OMAC1=y
  409. NEED_AES_ENCBLOCK=y
  410. NEED_AES_EAX=y
  411. endif
  412. ifdef CONFIG_EAP_AKA
  413. # EAP-AKA
  414. ifeq ($(CONFIG_EAP_AKA), dyn)
  415. CFLAGS += -DEAP_AKA_DYNAMIC
  416. EAPDYN += ../src/eap_peer/eap_aka.so
  417. else
  418. CFLAGS += -DEAP_AKA
  419. OBJS += ../src/eap_peer/eap_aka.o
  420. OBJS_h += ../src/eap_server/eap_server_aka.o
  421. endif
  422. CONFIG_IEEE8021X_EAPOL=y
  423. CONFIG_EAP_SIM_COMMON=y
  424. NEED_AES_CBC=y
  425. endif
  426. ifdef CONFIG_EAP_PROXY
  427. CFLAGS += -DCONFIG_EAP_PROXY
  428. OBJS += ../src/eap_peer/eap_proxy_$(CONFIG_EAP_PROXY).o
  429. include eap_proxy_$(CONFIG_EAP_PROXY).mk
  430. CONFIG_IEEE8021X_EAPOL=y
  431. endif
  432. ifdef CONFIG_EAP_AKA_PRIME
  433. # EAP-AKA'
  434. ifeq ($(CONFIG_EAP_AKA_PRIME), dyn)
  435. CFLAGS += -DEAP_AKA_PRIME_DYNAMIC
  436. else
  437. CFLAGS += -DEAP_AKA_PRIME
  438. endif
  439. NEED_SHA256=y
  440. endif
  441. ifdef CONFIG_EAP_SIM_COMMON
  442. OBJS += ../src/eap_common/eap_sim_common.o
  443. OBJS_h += ../src/eap_server/eap_sim_db.o
  444. NEED_AES=y
  445. NEED_FIPS186_2_PRF=y
  446. endif
  447. ifdef CONFIG_EAP_FAST
  448. # EAP-FAST
  449. ifeq ($(CONFIG_EAP_FAST), dyn)
  450. CFLAGS += -DEAP_FAST_DYNAMIC
  451. EAPDYN += ../src/eap_peer/eap_fast.so
  452. EAPDYN += ../src/eap_common/eap_fast_common.o
  453. else
  454. CFLAGS += -DEAP_FAST
  455. OBJS += ../src/eap_peer/eap_fast.o ../src/eap_peer/eap_fast_pac.o
  456. OBJS += ../src/eap_common/eap_fast_common.o
  457. OBJS_h += ../src/eap_server/eap_server_fast.o
  458. endif
  459. TLS_FUNCS=y
  460. CONFIG_IEEE8021X_EAPOL=y
  461. NEED_T_PRF=y
  462. endif
  463. ifdef CONFIG_EAP_PAX
  464. # EAP-PAX
  465. ifeq ($(CONFIG_EAP_PAX), dyn)
  466. CFLAGS += -DEAP_PAX_DYNAMIC
  467. EAPDYN += ../src/eap_peer/eap_pax.so
  468. else
  469. CFLAGS += -DEAP_PAX
  470. OBJS += ../src/eap_peer/eap_pax.o ../src/eap_common/eap_pax_common.o
  471. OBJS_h += ../src/eap_server/eap_server_pax.o
  472. endif
  473. CONFIG_IEEE8021X_EAPOL=y
  474. endif
  475. ifdef CONFIG_EAP_SAKE
  476. # EAP-SAKE
  477. ifeq ($(CONFIG_EAP_SAKE), dyn)
  478. CFLAGS += -DEAP_SAKE_DYNAMIC
  479. EAPDYN += ../src/eap_peer/eap_sake.so
  480. else
  481. CFLAGS += -DEAP_SAKE
  482. OBJS += ../src/eap_peer/eap_sake.o ../src/eap_common/eap_sake_common.o
  483. OBJS_h += ../src/eap_server/eap_server_sake.o
  484. endif
  485. CONFIG_IEEE8021X_EAPOL=y
  486. endif
  487. ifdef CONFIG_EAP_GPSK
  488. # EAP-GPSK
  489. ifeq ($(CONFIG_EAP_GPSK), dyn)
  490. CFLAGS += -DEAP_GPSK_DYNAMIC
  491. EAPDYN += ../src/eap_peer/eap_gpsk.so
  492. else
  493. CFLAGS += -DEAP_GPSK
  494. OBJS += ../src/eap_peer/eap_gpsk.o ../src/eap_common/eap_gpsk_common.o
  495. OBJS_h += ../src/eap_server/eap_server_gpsk.o
  496. endif
  497. CONFIG_IEEE8021X_EAPOL=y
  498. ifdef CONFIG_EAP_GPSK_SHA256
  499. CFLAGS += -DEAP_GPSK_SHA256
  500. endif
  501. NEED_SHA256=y
  502. NEED_AES_OMAC1=y
  503. endif
  504. ifdef CONFIG_EAP_PWD
  505. CFLAGS += -DEAP_PWD
  506. OBJS += ../src/eap_peer/eap_pwd.o ../src/eap_common/eap_pwd_common.o
  507. OBJS_h += ../src/eap_server/eap_server_pwd.o
  508. CONFIG_IEEE8021X_EAPOL=y
  509. NEED_SHA256=y
  510. endif
  511. ifdef CONFIG_EAP_EKE
  512. # EAP-EKE
  513. ifeq ($(CONFIG_EAP_EKE), dyn)
  514. CFLAGS += -DEAP_EKE_DYNAMIC
  515. EAPDYN += ../src/eap_peer/eap_eke.so
  516. else
  517. CFLAGS += -DEAP_EKE
  518. OBJS += ../src/eap_peer/eap_eke.o ../src/eap_common/eap_eke_common.o
  519. OBJS_h += ../src/eap_server/eap_server_eke.o
  520. endif
  521. CONFIG_IEEE8021X_EAPOL=y
  522. NEED_DH_GROUPS=y
  523. NEED_DH_GROUPS_ALL=y
  524. NEED_SHA256=y
  525. endif
  526. ifdef CONFIG_WPS
  527. ifdef CONFIG_WPS2
  528. CFLAGS += -DCONFIG_WPS2
  529. endif
  530. # EAP-WSC
  531. CFLAGS += -DCONFIG_WPS -DEAP_WSC
  532. OBJS += wps_supplicant.o
  533. OBJS += ../src/utils/uuid.o
  534. OBJS += ../src/eap_peer/eap_wsc.o ../src/eap_common/eap_wsc_common.o
  535. OBJS += ../src/wps/wps.o
  536. OBJS += ../src/wps/wps_common.o
  537. OBJS += ../src/wps/wps_attr_parse.o
  538. OBJS += ../src/wps/wps_attr_build.o
  539. OBJS += ../src/wps/wps_attr_process.o
  540. OBJS += ../src/wps/wps_dev_attr.o
  541. OBJS += ../src/wps/wps_enrollee.o
  542. OBJS += ../src/wps/wps_registrar.o
  543. OBJS_h += ../src/eap_server/eap_server_wsc.o
  544. CONFIG_IEEE8021X_EAPOL=y
  545. NEED_DH_GROUPS=y
  546. NEED_SHA256=y
  547. NEED_BASE64=y
  548. NEED_80211_COMMON=y
  549. NEED_AES_CBC=y
  550. NEED_MODEXP=y
  551. ifdef CONFIG_WPS_NFC
  552. CFLAGS += -DCONFIG_WPS_NFC
  553. OBJS += ../src/wps/ndef.o
  554. NEED_WPS_OOB=y
  555. endif
  556. ifdef NEED_WPS_OOB
  557. CFLAGS += -DCONFIG_WPS_OOB
  558. endif
  559. ifdef CONFIG_WPS_ER
  560. CONFIG_WPS_UPNP=y
  561. CFLAGS += -DCONFIG_WPS_ER
  562. OBJS += ../src/wps/wps_er.o
  563. OBJS += ../src/wps/wps_er_ssdp.o
  564. endif
  565. ifdef CONFIG_WPS_UPNP
  566. CFLAGS += -DCONFIG_WPS_UPNP
  567. OBJS += ../src/wps/wps_upnp.o
  568. OBJS += ../src/wps/wps_upnp_ssdp.o
  569. OBJS += ../src/wps/wps_upnp_web.o
  570. OBJS += ../src/wps/wps_upnp_event.o
  571. OBJS += ../src/wps/wps_upnp_ap.o
  572. OBJS += ../src/wps/upnp_xml.o
  573. OBJS += ../src/wps/httpread.o
  574. OBJS += ../src/wps/http_client.o
  575. OBJS += ../src/wps/http_server.o
  576. endif
  577. ifdef CONFIG_WPS_STRICT
  578. CFLAGS += -DCONFIG_WPS_STRICT
  579. OBJS += ../src/wps/wps_validate.o
  580. endif
  581. ifdef CONFIG_WPS_TESTING
  582. CFLAGS += -DCONFIG_WPS_TESTING
  583. endif
  584. ifdef CONFIG_WPS_REG_DISABLE_OPEN
  585. CFLAGS += -DCONFIG_WPS_REG_DISABLE_OPEN
  586. endif
  587. endif
  588. ifdef CONFIG_EAP_IKEV2
  589. # EAP-IKEv2
  590. ifeq ($(CONFIG_EAP_IKEV2), dyn)
  591. CFLAGS += -DEAP_IKEV2_DYNAMIC
  592. EAPDYN += ../src/eap_peer/eap_ikev2.so ../src/eap_peer/ikev2.o
  593. EAPDYN += ../src/eap_common/eap_ikev2_common.o ../src/eap_common/ikev2_common.o
  594. else
  595. CFLAGS += -DEAP_IKEV2
  596. OBJS += ../src/eap_peer/eap_ikev2.o ../src/eap_peer/ikev2.o
  597. OBJS += ../src/eap_common/eap_ikev2_common.o ../src/eap_common/ikev2_common.o
  598. OBJS_h += ../src/eap_server/eap_server_ikev2.o
  599. OBJS_h += ../src/eap_server/ikev2.o
  600. endif
  601. CONFIG_IEEE8021X_EAPOL=y
  602. NEED_DH_GROUPS=y
  603. NEED_DH_GROUPS_ALL=y
  604. NEED_MODEXP=y
  605. NEED_CIPHER=y
  606. endif
  607. ifdef CONFIG_EAP_VENDOR_TEST
  608. ifeq ($(CONFIG_EAP_VENDOR_TEST), dyn)
  609. CFLAGS += -DEAP_VENDOR_TEST_DYNAMIC
  610. EAPDYN += ../src/eap_peer/eap_vendor_test.so
  611. else
  612. CFLAGS += -DEAP_VENDOR_TEST
  613. OBJS += ../src/eap_peer/eap_vendor_test.o
  614. OBJS_h += ../src/eap_server/eap_server_vendor_test.o
  615. endif
  616. CONFIG_IEEE8021X_EAPOL=y
  617. endif
  618. ifdef CONFIG_EAP_TNC
  619. # EAP-TNC
  620. CFLAGS += -DEAP_TNC
  621. OBJS += ../src/eap_peer/eap_tnc.o
  622. OBJS += ../src/eap_peer/tncc.o
  623. OBJS_h += ../src/eap_server/eap_server_tnc.o
  624. OBJS_h += ../src/eap_server/tncs.o
  625. NEED_BASE64=y
  626. ifndef CONFIG_NATIVE_WINDOWS
  627. ifndef CONFIG_DRIVER_BSD
  628. LIBS += -ldl
  629. endif
  630. endif
  631. endif
  632. ifdef CONFIG_IEEE8021X_EAPOL
  633. # IEEE 802.1X/EAPOL state machines (e.g., for RADIUS authentication)
  634. CFLAGS += -DIEEE8021X_EAPOL
  635. OBJS += ../src/eapol_supp/eapol_supp_sm.o
  636. OBJS += ../src/eap_peer/eap.o ../src/eap_peer/eap_methods.o
  637. NEED_EAP_COMMON=y
  638. ifdef CONFIG_DYNAMIC_EAP_METHODS
  639. CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
  640. LIBS += -ldl -rdynamic
  641. endif
  642. endif
  643. ifdef CONFIG_AP
  644. NEED_80211_COMMON=y
  645. NEED_EAP_COMMON=y
  646. NEED_RSN_AUTHENTICATOR=y
  647. CFLAGS += -DCONFIG_AP
  648. OBJS += ap.o
  649. CFLAGS += -DCONFIG_NO_RADIUS
  650. CFLAGS += -DCONFIG_NO_ACCOUNTING
  651. CFLAGS += -DCONFIG_NO_VLAN
  652. OBJS += ../src/ap/hostapd.o
  653. OBJS += ../src/ap/wpa_auth_glue.o
  654. OBJS += ../src/ap/utils.o
  655. OBJS += ../src/ap/authsrv.o
  656. OBJS += ../src/ap/ap_config.o
  657. OBJS += ../src/utils/ip_addr.o
  658. OBJS += ../src/ap/sta_info.o
  659. OBJS += ../src/ap/tkip_countermeasures.o
  660. OBJS += ../src/ap/ap_mlme.o
  661. OBJS += ../src/ap/ieee802_1x.o
  662. OBJS += ../src/eapol_auth/eapol_auth_sm.o
  663. OBJS += ../src/ap/ieee802_11_auth.o
  664. OBJS += ../src/ap/ieee802_11_shared.o
  665. OBJS += ../src/ap/drv_callbacks.o
  666. OBJS += ../src/ap/ap_drv_ops.o
  667. OBJS += ../src/ap/beacon.o
  668. OBJS += ../src/ap/eap_user_db.o
  669. ifdef CONFIG_IEEE80211N
  670. OBJS += ../src/ap/ieee802_11_ht.o
  671. ifdef CONFIG_IEEE80211AC
  672. OBJS += ../src/ap/ieee802_11_vht.o
  673. endif
  674. endif
  675. ifdef CONFIG_WNM
  676. OBJS += ../src/ap/wnm_ap.o
  677. endif
  678. ifdef CONFIG_CTRL_IFACE
  679. OBJS += ../src/ap/ctrl_iface_ap.o
  680. endif
  681. CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
  682. OBJS += ../src/eap_server/eap_server.o
  683. OBJS += ../src/eap_server/eap_server_identity.o
  684. OBJS += ../src/eap_server/eap_server_methods.o
  685. ifdef CONFIG_IEEE80211N
  686. CFLAGS += -DCONFIG_IEEE80211N
  687. ifdef CONFIG_IEEE80211AC
  688. CFLAGS += -DCONFIG_IEEE80211AC
  689. endif
  690. endif
  691. ifdef NEED_AP_MLME
  692. OBJS += ../src/ap/wmm.o
  693. OBJS += ../src/ap/ap_list.o
  694. OBJS += ../src/ap/ieee802_11.o
  695. OBJS += ../src/ap/hw_features.o
  696. OBJS += ../src/ap/dfs.o
  697. CFLAGS += -DNEED_AP_MLME
  698. endif
  699. ifdef CONFIG_WPS
  700. CFLAGS += -DEAP_SERVER_WSC
  701. OBJS += ../src/ap/wps_hostapd.o
  702. OBJS += ../src/eap_server/eap_server_wsc.o
  703. endif
  704. ifdef CONFIG_INTERWORKING
  705. OBJS += ../src/ap/gas_serv.o
  706. endif
  707. ifdef CONFIG_HS20
  708. OBJS += ../src/ap/hs20.o
  709. endif
  710. endif
  711. ifdef NEED_RSN_AUTHENTICATOR
  712. CFLAGS += -DCONFIG_NO_RADIUS
  713. NEED_AES_WRAP=y
  714. OBJS += ../src/ap/wpa_auth.o
  715. OBJS += ../src/ap/wpa_auth_ie.o
  716. OBJS += ../src/ap/pmksa_cache_auth.o
  717. ifdef CONFIG_IEEE80211R
  718. OBJS += ../src/ap/wpa_auth_ft.o
  719. endif
  720. ifdef CONFIG_PEERKEY
  721. OBJS += ../src/ap/peerkey_auth.o
  722. endif
  723. endif
  724. ifdef CONFIG_EAP_SERVER
  725. CFLAGS += -DEAP_SERVER
  726. OBJS_h += ../src/eap_server/eap_server.o
  727. OBJS_h += ../src/eap_server/eap_server_identity.o
  728. OBJS_h += ../src/eap_server/eap_server_methods.o
  729. endif
  730. ifdef CONFIG_RADIUS_CLIENT
  731. OBJS_h += ../src/utils/ip_addr.o
  732. OBJS_h += ../src/radius/radius.o
  733. OBJS_h += ../src/radius/radius_client.o
  734. endif
  735. ifdef CONFIG_AUTHENTICATOR
  736. OBJS_h += ../src/eapol_auth/eapol_auth_sm.o
  737. OBJS_h += ../src/ap/ieee802_1x.o
  738. endif
  739. ifdef CONFIG_WPA_AUTHENTICATOR
  740. OBJS_h += ../src/ap/wpa_auth.o
  741. OBJS_h += ../src/ap/wpa_auth_ie.o
  742. OBJS_h += ../src/ap/pmksa_cache_auth.o
  743. ifdef CONFIG_IEEE80211R
  744. OBJS_h += ../src/ap/wpa_auth_ft.o
  745. endif
  746. ifdef CONFIG_PEERKEY
  747. OBJS_h += ../src/ap/peerkey_auth.o
  748. endif
  749. endif
  750. ifdef CONFIG_PCSC
  751. # PC/SC interface for smartcards (USIM, GSM SIM)
  752. CFLAGS += -DPCSC_FUNCS -I/usr/include/PCSC
  753. OBJS += ../src/utils/pcsc_funcs.o
  754. # -lpthread may not be needed depending on how pcsc-lite was configured
  755. ifdef CONFIG_NATIVE_WINDOWS
  756. #Once MinGW gets support for WinScard, -lwinscard could be used instead of the
  757. #dynamic symbol loading that is now used in pcsc_funcs.c
  758. #LIBS += -lwinscard
  759. else
  760. LIBS += -lpcsclite -lpthread
  761. endif
  762. endif
  763. ifdef CONFIG_SIM_SIMULATOR
  764. CFLAGS += -DCONFIG_SIM_SIMULATOR
  765. NEED_MILENAGE=y
  766. endif
  767. ifdef CONFIG_USIM_SIMULATOR
  768. CFLAGS += -DCONFIG_USIM_SIMULATOR
  769. NEED_MILENAGE=y
  770. endif
  771. ifdef NEED_MILENAGE
  772. OBJS += ../src/crypto/milenage.o
  773. NEED_AES_ENCBLOCK=y
  774. endif
  775. ifdef CONFIG_PKCS12
  776. CFLAGS += -DPKCS12_FUNCS
  777. endif
  778. ifdef CONFIG_SMARTCARD
  779. CFLAGS += -DCONFIG_SMARTCARD
  780. endif
  781. ifdef MS_FUNCS
  782. OBJS += ../src/crypto/ms_funcs.o
  783. NEED_DES=y
  784. NEED_MD4=y
  785. endif
  786. ifdef CHAP
  787. OBJS += ../src/eap_common/chap.o
  788. endif
  789. ifdef TLS_FUNCS
  790. NEED_DES=y
  791. # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, EAP_TTLS, and EAP_FAST)
  792. OBJS += ../src/eap_peer/eap_tls_common.o
  793. OBJS_h += ../src/eap_server/eap_server_tls_common.o
  794. ifndef CONFIG_FIPS
  795. NEED_TLS_PRF=y
  796. NEED_SHA1=y
  797. NEED_MD5=y
  798. endif
  799. endif
  800. ifndef CONFIG_TLS
  801. CONFIG_TLS=openssl
  802. endif
  803. ifdef CONFIG_TLSV11
  804. CFLAGS += -DCONFIG_TLSV11
  805. endif
  806. ifdef CONFIG_TLSV12
  807. CFLAGS += -DCONFIG_TLSV12
  808. NEED_SHA256=y
  809. endif
  810. ifeq ($(CONFIG_TLS), openssl)
  811. ifdef TLS_FUNCS
  812. CFLAGS += -DEAP_TLS_OPENSSL
  813. OBJS += ../src/crypto/tls_openssl.o
  814. LIBS += -lssl
  815. endif
  816. OBJS += ../src/crypto/crypto_openssl.o
  817. OBJS_p += ../src/crypto/crypto_openssl.o
  818. ifdef NEED_FIPS186_2_PRF
  819. OBJS += ../src/crypto/fips_prf_openssl.o
  820. endif
  821. LIBS += -lcrypto
  822. LIBS_p += -lcrypto
  823. ifdef CONFIG_TLS_ADD_DL
  824. LIBS += -ldl
  825. LIBS_p += -ldl
  826. endif
  827. endif
  828. ifeq ($(CONFIG_TLS), gnutls)
  829. ifdef TLS_FUNCS
  830. OBJS += ../src/crypto/tls_gnutls.o
  831. LIBS += -lgnutls -lgpg-error
  832. endif
  833. OBJS += ../src/crypto/crypto_gnutls.o
  834. OBJS_p += ../src/crypto/crypto_gnutls.o
  835. ifdef NEED_FIPS186_2_PRF
  836. OBJS += ../src/crypto/fips_prf_gnutls.o
  837. endif
  838. LIBS += -lgcrypt
  839. LIBS_p += -lgcrypt
  840. CONFIG_INTERNAL_SHA256=y
  841. CONFIG_INTERNAL_RC4=y
  842. CONFIG_INTERNAL_DH_GROUP5=y
  843. endif
  844. ifeq ($(CONFIG_TLS), schannel)
  845. ifdef TLS_FUNCS
  846. OBJS += ../src/crypto/tls_schannel.o
  847. endif
  848. OBJS += ../src/crypto/crypto_cryptoapi.o
  849. OBJS_p += ../src/crypto/crypto_cryptoapi.o
  850. ifdef NEED_FIPS186_2_PRF
  851. OBJS += ../src/crypto/fips_prf_cryptoapi.o
  852. endif
  853. CONFIG_INTERNAL_SHA256=y
  854. CONFIG_INTERNAL_RC4=y
  855. CONFIG_INTERNAL_DH_GROUP5=y
  856. endif
  857. ifeq ($(CONFIG_TLS), nss)
  858. ifdef TLS_FUNCS
  859. OBJS += ../src/crypto/tls_nss.o
  860. LIBS += -lssl3
  861. endif
  862. OBJS += ../src/crypto/crypto_nss.o
  863. OBJS_p += ../src/crypto/crypto_nss.o
  864. ifdef NEED_FIPS186_2_PRF
  865. OBJS += ../src/crypto/fips_prf_nss.o
  866. endif
  867. LIBS += -lnss3
  868. LIBS_p += -lnss3
  869. CONFIG_INTERNAL_MD4=y
  870. CONFIG_INTERNAL_DH_GROUP5=y
  871. endif
  872. ifeq ($(CONFIG_TLS), internal)
  873. ifndef CONFIG_CRYPTO
  874. CONFIG_CRYPTO=internal
  875. endif
  876. ifdef TLS_FUNCS
  877. OBJS += ../src/crypto/crypto_internal-rsa.o
  878. OBJS += ../src/crypto/tls_internal.o
  879. OBJS += ../src/tls/tlsv1_common.o
  880. OBJS += ../src/tls/tlsv1_record.o
  881. OBJS += ../src/tls/tlsv1_cred.o
  882. OBJS += ../src/tls/tlsv1_client.o
  883. OBJS += ../src/tls/tlsv1_client_write.o
  884. OBJS += ../src/tls/tlsv1_client_read.o
  885. OBJS += ../src/tls/asn1.o
  886. OBJS += ../src/tls/rsa.o
  887. OBJS += ../src/tls/x509v3.o
  888. OBJS += ../src/tls/pkcs1.o
  889. OBJS += ../src/tls/pkcs5.o
  890. OBJS += ../src/tls/pkcs8.o
  891. NEED_SHA256=y
  892. NEED_BASE64=y
  893. NEED_TLS_PRF=y
  894. ifdef CONFIG_TLSV12
  895. NEED_TLS_PRF_SHA256=y
  896. endif
  897. NEED_MODEXP=y
  898. NEED_CIPHER=y
  899. CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT
  900. endif
  901. ifdef NEED_CIPHER
  902. NEED_DES=y
  903. OBJS += ../src/crypto/crypto_internal-cipher.o
  904. endif
  905. ifdef NEED_MODEXP
  906. OBJS += ../src/crypto/crypto_internal-modexp.o
  907. OBJS += ../src/tls/bignum.o
  908. endif
  909. ifeq ($(CONFIG_CRYPTO), libtomcrypt)
  910. OBJS += ../src/crypto/crypto_libtomcrypt.o
  911. OBJS_p += ../src/crypto/crypto_libtomcrypt.o
  912. LIBS += -ltomcrypt -ltfm
  913. LIBS_p += -ltomcrypt -ltfm
  914. CONFIG_INTERNAL_SHA256=y
  915. CONFIG_INTERNAL_RC4=y
  916. CONFIG_INTERNAL_DH_GROUP5=y
  917. endif
  918. ifeq ($(CONFIG_CRYPTO), internal)
  919. OBJS += ../src/crypto/crypto_internal.o
  920. OBJS_p += ../src/crypto/crypto_internal.o
  921. NEED_AES_ENC=y
  922. CFLAGS += -DCONFIG_CRYPTO_INTERNAL
  923. ifdef CONFIG_INTERNAL_LIBTOMMATH
  924. CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH
  925. ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST
  926. CFLAGS += -DLTM_FAST
  927. endif
  928. else
  929. LIBS += -ltommath
  930. LIBS_p += -ltommath
  931. endif
  932. CONFIG_INTERNAL_AES=y
  933. CONFIG_INTERNAL_DES=y
  934. CONFIG_INTERNAL_SHA1=y
  935. CONFIG_INTERNAL_MD4=y
  936. CONFIG_INTERNAL_MD5=y
  937. CONFIG_INTERNAL_SHA256=y
  938. CONFIG_INTERNAL_RC4=y
  939. CONFIG_INTERNAL_DH_GROUP5=y
  940. endif
  941. ifeq ($(CONFIG_CRYPTO), cryptoapi)
  942. OBJS += ../src/crypto/crypto_cryptoapi.o
  943. OBJS_p += ../src/crypto/crypto_cryptoapi.o
  944. CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI
  945. CONFIG_INTERNAL_SHA256=y
  946. CONFIG_INTERNAL_RC4=y
  947. endif
  948. endif
  949. ifeq ($(CONFIG_TLS), none)
  950. ifdef TLS_FUNCS
  951. OBJS += ../src/crypto/tls_none.o
  952. CFLAGS += -DEAP_TLS_NONE
  953. CONFIG_INTERNAL_AES=y
  954. CONFIG_INTERNAL_SHA1=y
  955. CONFIG_INTERNAL_MD5=y
  956. endif
  957. OBJS += ../src/crypto/crypto_none.o
  958. OBJS_p += ../src/crypto/crypto_none.o
  959. CONFIG_INTERNAL_SHA256=y
  960. CONFIG_INTERNAL_RC4=y
  961. endif
  962. ifdef TLS_FUNCS
  963. ifdef CONFIG_SMARTCARD
  964. ifndef CONFIG_NATIVE_WINDOWS
  965. ifneq ($(CONFIG_L2_PACKET), freebsd)
  966. LIBS += -ldl
  967. endif
  968. endif
  969. endif
  970. endif
  971. ifndef TLS_FUNCS
  972. OBJS += ../src/crypto/tls_none.o
  973. ifeq ($(CONFIG_TLS), internal)
  974. CONFIG_INTERNAL_AES=y
  975. CONFIG_INTERNAL_SHA1=y
  976. CONFIG_INTERNAL_MD5=y
  977. CONFIG_INTERNAL_RC4=y
  978. endif
  979. endif
  980. AESOBJS = # none so far (see below)
  981. ifdef CONFIG_INTERNAL_AES
  982. AESOBJS += ../src/crypto/aes-internal.o ../src/crypto/aes-internal-dec.o
  983. endif
  984. AESOBJS += ../src/crypto/aes-unwrap.o
  985. ifdef NEED_AES_EAX
  986. AESOBJS += ../src/crypto/aes-eax.o
  987. NEED_AES_CTR=y
  988. endif
  989. ifdef NEED_AES_CTR
  990. AESOBJS += ../src/crypto/aes-ctr.o
  991. endif
  992. ifdef NEED_AES_ENCBLOCK
  993. AESOBJS += ../src/crypto/aes-encblock.o
  994. endif
  995. ifdef NEED_AES_OMAC1
  996. NEED_AES_ENC=y
  997. ifdef CONFIG_OPENSSL_CMAC
  998. CFLAGS += -DCONFIG_OPENSSL_CMAC
  999. else
  1000. AESOBJS += ../src/crypto/aes-omac1.o
  1001. endif
  1002. endif
  1003. ifdef NEED_AES_WRAP
  1004. NEED_AES_ENC=y
  1005. AESOBJS += ../src/crypto/aes-wrap.o
  1006. endif
  1007. ifdef NEED_AES_CBC
  1008. NEED_AES_ENC=y
  1009. AESOBJS += ../src/crypto/aes-cbc.o
  1010. endif
  1011. ifdef NEED_AES_ENC
  1012. ifdef CONFIG_INTERNAL_AES
  1013. AESOBJS += ../src/crypto/aes-internal-enc.o
  1014. endif
  1015. endif
  1016. ifdef NEED_AES
  1017. OBJS += $(AESOBJS)
  1018. endif
  1019. ifdef NEED_SHA1
  1020. ifneq ($(CONFIG_TLS), openssl)
  1021. SHA1OBJS += ../src/crypto/sha1.o
  1022. endif
  1023. SHA1OBJS += ../src/crypto/sha1-prf.o
  1024. ifdef CONFIG_INTERNAL_SHA1
  1025. SHA1OBJS += ../src/crypto/sha1-internal.o
  1026. ifdef NEED_FIPS186_2_PRF
  1027. SHA1OBJS += ../src/crypto/fips_prf_internal.o
  1028. endif
  1029. endif
  1030. ifdef CONFIG_NO_WPA_PASSPHRASE
  1031. CFLAGS += -DCONFIG_NO_PBKDF2
  1032. else
  1033. ifneq ($(CONFIG_TLS), openssl)
  1034. SHA1OBJS += ../src/crypto/sha1-pbkdf2.o
  1035. endif
  1036. endif
  1037. ifdef NEED_T_PRF
  1038. SHA1OBJS += ../src/crypto/sha1-tprf.o
  1039. endif
  1040. ifdef NEED_TLS_PRF
  1041. SHA1OBJS += ../src/crypto/sha1-tlsprf.o
  1042. endif
  1043. endif
  1044. ifndef CONFIG_FIPS
  1045. MD5OBJS += ../src/crypto/md5.o
  1046. endif
  1047. ifdef NEED_MD5
  1048. ifdef CONFIG_INTERNAL_MD5
  1049. MD5OBJS += ../src/crypto/md5-internal.o
  1050. endif
  1051. OBJS += $(MD5OBJS)
  1052. OBJS_p += $(MD5OBJS)
  1053. endif
  1054. ifdef NEED_MD4
  1055. ifdef CONFIG_INTERNAL_MD4
  1056. OBJS += ../src/crypto/md4-internal.o
  1057. endif
  1058. endif
  1059. DESOBJS = # none needed when not internal
  1060. ifdef NEED_DES
  1061. ifdef CONFIG_INTERNAL_DES
  1062. DESOBJS += ../src/crypto/des-internal.o
  1063. endif
  1064. endif
  1065. ifdef NEED_RC4
  1066. ifdef CONFIG_INTERNAL_RC4
  1067. OBJS += ../src/crypto/rc4.o
  1068. endif
  1069. endif
  1070. SHA256OBJS = # none by default
  1071. ifdef NEED_SHA256
  1072. CFLAGS += -DCONFIG_SHA256
  1073. ifneq ($(CONFIG_TLS), openssl)
  1074. SHA256OBJS += ../src/crypto/sha256.o
  1075. endif
  1076. SHA256OBJS += ../src/crypto/sha256-prf.o
  1077. ifdef CONFIG_INTERNAL_SHA256
  1078. SHA256OBJS += ../src/crypto/sha256-internal.o
  1079. endif
  1080. ifdef NEED_TLS_PRF_SHA256
  1081. SHA256OBJS += ../src/crypto/sha256-tlsprf.o
  1082. endif
  1083. OBJS += $(SHA256OBJS)
  1084. endif
  1085. ifdef NEED_DH_GROUPS
  1086. OBJS += ../src/crypto/dh_groups.o
  1087. endif
  1088. ifdef NEED_DH_GROUPS_ALL
  1089. CFLAGS += -DALL_DH_GROUPS
  1090. endif
  1091. ifdef CONFIG_INTERNAL_DH_GROUP5
  1092. ifdef NEED_DH_GROUPS
  1093. OBJS += ../src/crypto/dh_group5.o
  1094. endif
  1095. endif
  1096. ifdef NEED_ECC
  1097. CFLAGS += -DCONFIG_ECC
  1098. endif
  1099. ifdef CONFIG_NO_RANDOM_POOL
  1100. CFLAGS += -DCONFIG_NO_RANDOM_POOL
  1101. else
  1102. OBJS += ../src/crypto/random.o
  1103. endif
  1104. ifdef CONFIG_CTRL_IFACE
  1105. ifeq ($(CONFIG_CTRL_IFACE), y)
  1106. ifdef CONFIG_NATIVE_WINDOWS
  1107. CONFIG_CTRL_IFACE=named_pipe
  1108. else
  1109. CONFIG_CTRL_IFACE=unix
  1110. endif
  1111. endif
  1112. CFLAGS += -DCONFIG_CTRL_IFACE
  1113. ifeq ($(CONFIG_CTRL_IFACE), unix)
  1114. CFLAGS += -DCONFIG_CTRL_IFACE_UNIX
  1115. endif
  1116. ifeq ($(CONFIG_CTRL_IFACE), udp)
  1117. CFLAGS += -DCONFIG_CTRL_IFACE_UDP
  1118. endif
  1119. ifeq ($(CONFIG_CTRL_IFACE), named_pipe)
  1120. CFLAGS += -DCONFIG_CTRL_IFACE_NAMED_PIPE
  1121. endif
  1122. ifeq ($(CONFIG_CTRL_IFACE), udp-remote)
  1123. CONFIG_CTRL_IFACE=udp
  1124. CFLAGS += -DCONFIG_CTRL_IFACE_UDP
  1125. CFLAGS += -DCONFIG_CTRL_IFACE_UDP_REMOTE
  1126. endif
  1127. OBJS += ctrl_iface.o ctrl_iface_$(CONFIG_CTRL_IFACE).o
  1128. endif
  1129. ifdef CONFIG_CTRL_IFACE_DBUS
  1130. DBUS=y
  1131. DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS -DDBUS_API_SUBJECT_TO_CHANGE
  1132. DBUS_OBJS += dbus/dbus_old.o dbus/dbus_old_handlers.o
  1133. ifdef CONFIG_WPS
  1134. DBUS_OBJS += dbus/dbus_old_handlers_wps.o
  1135. endif
  1136. DBUS_OBJS += dbus/dbus_dict_helpers.o
  1137. ifndef DBUS_LIBS
  1138. DBUS_LIBS := $(shell $(PKG_CONFIG) --libs dbus-1)
  1139. endif
  1140. ifndef DBUS_INCLUDE
  1141. DBUS_INCLUDE := $(shell $(PKG_CONFIG) --cflags dbus-1)
  1142. endif
  1143. DBUS_CFLAGS += $(DBUS_INCLUDE)
  1144. endif
  1145. ifdef CONFIG_CTRL_IFACE_DBUS_NEW
  1146. DBUS=y
  1147. DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_NEW
  1148. DBUS_OBJS ?= dbus/dbus_dict_helpers.o
  1149. DBUS_OBJS += dbus/dbus_new_helpers.o
  1150. DBUS_OBJS += dbus/dbus_new.o dbus/dbus_new_handlers.o
  1151. ifdef CONFIG_WPS
  1152. DBUS_OBJS += dbus/dbus_new_handlers_wps.o
  1153. endif
  1154. ifdef CONFIG_P2P
  1155. DBUS_OBJS += dbus/dbus_new_handlers_p2p.o
  1156. endif
  1157. ifndef DBUS_LIBS
  1158. DBUS_LIBS := $(shell $(PKG_CONFIG) --libs dbus-1)
  1159. endif
  1160. ifndef DBUS_INCLUDE
  1161. DBUS_INCLUDE := $(shell $(PKG_CONFIG) --cflags dbus-1)
  1162. endif
  1163. ifdef CONFIG_CTRL_IFACE_DBUS_INTRO
  1164. DBUS_OBJS += dbus/dbus_new_introspect.o
  1165. DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO
  1166. endif
  1167. DBUS_CFLAGS += $(DBUS_INCLUDE)
  1168. endif
  1169. ifdef DBUS
  1170. DBUS_CFLAGS += -DCONFIG_DBUS
  1171. DBUS_OBJS += dbus/dbus_common.o
  1172. endif
  1173. OBJS += $(DBUS_OBJS)
  1174. CFLAGS += $(DBUS_CFLAGS)
  1175. LIBS += $(DBUS_LIBS)
  1176. ifdef CONFIG_READLINE
  1177. OBJS_c += ../src/utils/edit_readline.o
  1178. LIBS_c += -lncurses -lreadline
  1179. else
  1180. ifdef CONFIG_WPA_CLI_EDIT
  1181. OBJS_c += ../src/utils/edit.o
  1182. else
  1183. OBJS_c += ../src/utils/edit_simple.o
  1184. endif
  1185. endif
  1186. ifdef CONFIG_NATIVE_WINDOWS
  1187. CFLAGS += -DCONFIG_NATIVE_WINDOWS
  1188. LIBS += -lws2_32 -lgdi32 -lcrypt32
  1189. LIBS_c += -lws2_32
  1190. LIBS_p += -lws2_32 -lgdi32
  1191. ifeq ($(CONFIG_CRYPTO), cryptoapi)
  1192. LIBS_p += -lcrypt32
  1193. endif
  1194. endif
  1195. ifdef CONFIG_NO_STDOUT_DEBUG
  1196. CFLAGS += -DCONFIG_NO_STDOUT_DEBUG
  1197. ifndef CONFIG_CTRL_IFACE
  1198. CFLAGS += -DCONFIG_NO_WPA_MSG
  1199. endif
  1200. endif
  1201. ifdef CONFIG_IPV6
  1202. # for eapol_test only
  1203. CFLAGS += -DCONFIG_IPV6
  1204. endif
  1205. ifdef NEED_BASE64
  1206. OBJS += ../src/utils/base64.o
  1207. endif
  1208. ifdef NEED_SME
  1209. NEED_80211_COMMON=y
  1210. OBJS += sme.o
  1211. CFLAGS += -DCONFIG_SME
  1212. endif
  1213. ifdef NEED_80211_COMMON
  1214. OBJS += ../src/common/ieee802_11_common.o
  1215. endif
  1216. ifdef NEED_EAP_COMMON
  1217. OBJS += ../src/eap_common/eap_common.o
  1218. endif
  1219. ifndef CONFIG_MAIN
  1220. CONFIG_MAIN=main
  1221. endif
  1222. ifdef CONFIG_DEBUG_SYSLOG
  1223. CFLAGS += -DCONFIG_DEBUG_SYSLOG
  1224. ifdef CONFIG_DEBUG_SYSLOG_FACILITY
  1225. CFLAGS += -DLOG_HOSTAPD="$(CONFIG_DEBUG_SYSLOG_FACILITY)"
  1226. endif
  1227. endif
  1228. ifdef CONFIG_DEBUG_LINUX_TRACING
  1229. CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING
  1230. endif
  1231. ifdef CONFIG_DEBUG_FILE
  1232. CFLAGS += -DCONFIG_DEBUG_FILE
  1233. endif
  1234. ifdef CONFIG_DELAYED_MIC_ERROR_REPORT
  1235. CFLAGS += -DCONFIG_DELAYED_MIC_ERROR_REPORT
  1236. endif
  1237. ifdef CONFIG_FIPS
  1238. CFLAGS += -DCONFIG_FIPS
  1239. ifneq ($(CONFIG_TLS), openssl)
  1240. $(error CONFIG_FIPS=y requires CONFIG_TLS=openssl)
  1241. endif
  1242. endif
  1243. OBJS += $(SHA1OBJS) $(DESOBJS)
  1244. OBJS_p += $(SHA1OBJS)
  1245. OBJS_p += $(SHA256OBJS)
  1246. ifdef CONFIG_BGSCAN_SIMPLE
  1247. CFLAGS += -DCONFIG_BGSCAN_SIMPLE
  1248. OBJS += bgscan_simple.o
  1249. NEED_BGSCAN=y
  1250. endif
  1251. ifdef CONFIG_BGSCAN_LEARN
  1252. CFLAGS += -DCONFIG_BGSCAN_LEARN
  1253. OBJS += bgscan_learn.o
  1254. NEED_BGSCAN=y
  1255. endif
  1256. ifdef NEED_BGSCAN
  1257. CFLAGS += -DCONFIG_BGSCAN
  1258. OBJS += bgscan.o
  1259. endif
  1260. ifdef CONFIG_AUTOSCAN_EXPONENTIAL
  1261. CFLAGS += -DCONFIG_AUTOSCAN_EXPONENTIAL
  1262. OBJS += autoscan_exponential.o
  1263. NEED_AUTOSCAN=y
  1264. endif
  1265. ifdef CONFIG_AUTOSCAN_PERIODIC
  1266. CFLAGS += -DCONFIG_AUTOSCAN_PERIODIC
  1267. OBJS += autoscan_periodic.o
  1268. NEED_AUTOSCAN=y
  1269. endif
  1270. ifdef NEED_AUTOSCAN
  1271. CFLAGS += -DCONFIG_AUTOSCAN
  1272. OBJS += autoscan.o
  1273. endif
  1274. ifdef CONFIG_EXT_PASSWORD_TEST
  1275. OBJS += ../src/utils/ext_password_test.o
  1276. CFLAGS += -DCONFIG_EXT_PASSWORD_TEST
  1277. NEED_EXT_PASSWORD=y
  1278. endif
  1279. ifdef NEED_EXT_PASSWORD
  1280. OBJS += ../src/utils/ext_password.o
  1281. CFLAGS += -DCONFIG_EXT_PASSWORD
  1282. endif
  1283. ifdef NEED_GAS
  1284. OBJS += ../src/common/gas.o
  1285. OBJS += gas_query.o
  1286. CFLAGS += -DCONFIG_GAS
  1287. NEED_OFFCHANNEL=y
  1288. endif
  1289. ifdef NEED_OFFCHANNEL
  1290. OBJS += offchannel.o
  1291. CFLAGS += -DCONFIG_OFFCHANNEL
  1292. endif
  1293. OBJS += ../src/drivers/driver_common.o
  1294. OBJS_priv += ../src/drivers/driver_common.o
  1295. OBJS_wpa_rm := ctrl_iface.o ctrl_iface_unix.o
  1296. OBJS_wpa := $(filter-out $(OBJS_wpa_rm),$(OBJS)) $(OBJS_h) tests/test_wpa.o
  1297. ifdef CONFIG_AUTHENTICATOR
  1298. OBJS_wpa += tests/link_test.o
  1299. endif
  1300. OBJS_wpa += $(OBJS_l2)
  1301. OBJS += wpa_supplicant.o events.o blacklist.o wpas_glue.o scan.o
  1302. OBJS_t := $(OBJS) $(OBJS_l2) eapol_test.o
  1303. OBJS_t += ../src/radius/radius_client.o
  1304. OBJS_t += ../src/radius/radius.o
  1305. ifndef CONFIG_AP
  1306. OBJS_t += ../src/utils/ip_addr.o
  1307. endif
  1308. OBJS_t2 := $(OBJS) $(OBJS_l2) preauth_test.o
  1309. OBJS_nfc := $(OBJS) $(OBJS_l2) nfc_pw_token.o
  1310. OBJS_nfc += $(OBJS_d) ../src/drivers/drivers.o
  1311. OBJS += $(CONFIG_MAIN).o
  1312. ifdef CONFIG_PRIVSEP
  1313. OBJS_priv += $(OBJS_d) ../src/drivers/drivers.o
  1314. OBJS_priv += $(OBJS_l2)
  1315. OBJS_priv += ../src/utils/os_$(CONFIG_OS).o
  1316. OBJS_priv += ../src/utils/$(CONFIG_ELOOP).o
  1317. OBJS_priv += ../src/utils/common.o
  1318. OBJS_priv += ../src/utils/wpa_debug.o
  1319. OBJS_priv += ../src/utils/wpabuf.o
  1320. OBJS_priv += wpa_priv.o
  1321. ifdef CONFIG_DRIVER_NL80211
  1322. OBJS_priv += ../src/common/ieee802_11_common.o
  1323. endif
  1324. ifdef CONFIG_DRIVER_TEST
  1325. OBJS_priv += $(SHA1OBJS)
  1326. OBJS_priv += $(MD5OBJS)
  1327. ifeq ($(CONFIG_TLS), openssl)
  1328. OBJS_priv += ../src/crypto/crypto_openssl.o
  1329. endif
  1330. ifeq ($(CONFIG_TLS), gnutls)
  1331. OBJS_priv += ../src/crypto/crypto_gnutls.o
  1332. endif
  1333. ifeq ($(CONFIG_TLS), nss)
  1334. OBJS_priv += ../src/crypto/crypto_nss.o
  1335. endif
  1336. ifeq ($(CONFIG_TLS), internal)
  1337. ifeq ($(CONFIG_CRYPTO), libtomcrypt)
  1338. OBJS_priv += ../src/crypto/crypto_libtomcrypt.o
  1339. else
  1340. OBJS_priv += ../src/crypto/crypto_internal.o
  1341. endif
  1342. endif
  1343. endif # CONFIG_DRIVER_TEST
  1344. OBJS += ../src/l2_packet/l2_packet_privsep.o
  1345. OBJS += ../src/drivers/driver_privsep.o
  1346. EXTRA_progs += wpa_priv
  1347. else
  1348. OBJS += $(OBJS_d) ../src/drivers/drivers.o
  1349. OBJS += $(OBJS_l2)
  1350. endif
  1351. ifdef CONFIG_NDIS_EVENTS_INTEGRATED
  1352. CFLAGS += -DCONFIG_NDIS_EVENTS_INTEGRATED
  1353. OBJS += ../src/drivers/ndis_events.o
  1354. EXTRALIBS += -loleaut32 -lole32 -luuid
  1355. ifdef PLATFORMSDKLIB
  1356. EXTRALIBS += $(PLATFORMSDKLIB)/WbemUuid.Lib
  1357. else
  1358. EXTRALIBS += WbemUuid.Lib
  1359. endif
  1360. endif
  1361. ifndef LDO
  1362. LDO=$(CC)
  1363. endif
  1364. Q=@
  1365. E=echo
  1366. ifeq ($(V), 1)
  1367. Q=
  1368. E=true
  1369. endif
  1370. dynamic_eap_methods: $(EAPDYN)
  1371. ../src/drivers/build.wpa_supplicant:
  1372. @if [ -f ../src/drivers/build.hostapd ]; then \
  1373. $(MAKE) -C ../src/drivers clean; \
  1374. fi
  1375. @touch ../src/drivers/build.wpa_supplicant
  1376. BCHECK=../src/drivers/build.wpa_supplicant
  1377. wpa_priv: $(BCHECK) $(OBJS_priv)
  1378. $(Q)$(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS)
  1379. @$(E) " LD " $@
  1380. $(OBJS_c) $(OBJS_t) $(OBJS_t2) $(OBJS) $(BCHECK) $(EXTRA_progs): .config
  1381. wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
  1382. $(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
  1383. @$(E) " LD " $@
  1384. eapol_test: $(OBJS_t)
  1385. $(Q)$(LDO) $(LDFLAGS) -o eapol_test $(OBJS_t) $(LIBS)
  1386. @$(E) " LD " $@
  1387. preauth_test: $(OBJS_t2)
  1388. $(Q)$(LDO) $(LDFLAGS) -o preauth_test $(OBJS_t2) $(LIBS)
  1389. @$(E) " LD " $@
  1390. wpa_passphrase: $(OBJS_p)
  1391. $(Q)$(LDO) $(LDFLAGS) -o wpa_passphrase $(OBJS_p) $(LIBS_p)
  1392. @$(E) " LD " $@
  1393. wpa_cli: $(OBJS_c)
  1394. $(Q)$(LDO) $(LDFLAGS) -o wpa_cli $(OBJS_c) $(LIBS_c)
  1395. @$(E) " LD " $@
  1396. link_test: $(OBJS) $(OBJS_h) tests/link_test.o
  1397. $(Q)$(LDO) $(LDFLAGS) -o link_test $(OBJS) $(OBJS_h) tests/link_test.o $(LIBS)
  1398. @$(E) " LD " $@
  1399. test_wpa: $(OBJS_wpa) $(OBJS_h)
  1400. $(Q)$(LDO) $(LDFLAGS) -o test_wpa $(OBJS_wpa) $(LIBS)
  1401. @$(E) " LD " $@
  1402. nfc_pw_token: $(OBJS_nfc)
  1403. $(Q)$(LDO) $(LDFLAGS) -o nfc_pw_token $(OBJS_nfc) $(LIBS)
  1404. @$(E) " LD " $@
  1405. win_if_list: win_if_list.c
  1406. $(Q)$(LDO) $(LDFLAGS) -o $@ win_if_list.c $(CFLAGS) $(LIBS_w)
  1407. @$(E) " LD " $@
  1408. eap_psk.so: ../src/eap_peer/eap_psk.c ../src/eap_common/eap_psk_common.c
  1409. $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
  1410. -Deap_peer_psk_register=eap_peer_method_dynamic_init
  1411. eap_pax.so: ../src/eap_peer/eap_pax.c ../src/eap_common/eap_pax_common.c
  1412. $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
  1413. -Deap_peer_pax_register=eap_peer_method_dynamic_init
  1414. eap_sake.so: ../src/eap_peer/eap_sake.c ../src/eap_common/eap_sake_common.c
  1415. $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
  1416. -Deap_peer_sake_register=eap_peer_method_dynamic_init
  1417. eap_wsc.so: ../src/eap_peer/eap_wsc.c ../src/eap_common/eap_wsc_common.c ../src/wps/wps.c
  1418. $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
  1419. -Deap_peer_wsc_register=eap_peer_method_dynamic_init
  1420. eap_ikev2.so: ../src/eap_peer/eap_ikev2.c ../src/eap_peer/ikev2.c ../src/eap_common/eap_ikev2_common.o ../src/eap_common/ikev2_common.c
  1421. $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
  1422. -Deap_peer_ikev2_register=eap_peer_method_dynamic_init
  1423. eap_eke.so: ../src/eap_peer/eap_eke.c ../src/eap_common/eap_eke_common.c
  1424. $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
  1425. -Deap_peer_eke_register=eap_peer_method_dynamic_init
  1426. %.so: %.c
  1427. $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $< \
  1428. -D$(*F:eap_%=eap_peer_%)_register=eap_peer_method_dynamic_init
  1429. %.o: %.c
  1430. $(Q)$(CC) -c -o $@ $(CFLAGS) $<
  1431. @$(E) " CC " $<
  1432. %.service: %.service.in
  1433. sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
  1434. %@.service: %.service.arg.in
  1435. sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
  1436. wpa_supplicant.exe: wpa_supplicant
  1437. mv -f $< $@
  1438. wpa_cli.exe: wpa_cli
  1439. mv -f $< $@
  1440. wpa_passphrase.exe: wpa_passphrase
  1441. mv -f $< $@
  1442. win_if_list.exe: win_if_list
  1443. mv -f $< $@
  1444. eapol_test.exe: eapol_test
  1445. mv -f $< $@
  1446. WINALL=wpa_supplicant.exe wpa_cli.exe wpa_passphrase.exe win_if_list.exe
  1447. windows-bin: $(WINALL)
  1448. $(STRIP) $(WINALL)
  1449. wpa_gui:
  1450. @echo "wpa_gui has been removed - see wpa_gui-qt4 for replacement"
  1451. wpa_gui-qt4/Makefile:
  1452. qmake -o wpa_gui-qt4/Makefile wpa_gui-qt4/wpa_gui.pro
  1453. wpa_gui-qt4/lang/wpa_gui_de.qm: wpa_gui-qt4/lang/wpa_gui_de.ts
  1454. lrelease wpa_gui-qt4/wpa_gui.pro
  1455. wpa_gui-qt4: wpa_gui-qt4/Makefile wpa_gui-qt4/lang/wpa_gui_de.qm
  1456. $(MAKE) -C wpa_gui-qt4
  1457. TEST_EAP_SIM_COMMON_OBJS = $(SHA1OBJS) $(MD5OBJS) \
  1458. ../src/utils/common.o ../src/utils/os_unix.o \
  1459. ../src/utils/wpa_debug.o $(AESOBJS) \
  1460. tests/test_eap_sim_common.o
  1461. test-eap_sim_common: $(TEST_EAP_SIM_COMMON_OBJS)
  1462. $(LDO) $(LDFLAGS) -o $@ $(TEST_EAP_SIM_COMMON_OBJS) $(LIBS)
  1463. ./test-eap_sim_common
  1464. rm test-eap_sim_common
  1465. tests: test-eap_sim_common
  1466. FIPSDIR=/usr/local/ssl/fips-2.0
  1467. FIPSLD=$(FIPSDIR)/bin/fipsld
  1468. fips:
  1469. $(MAKE) CC=$(FIPSLD) FIPSLD_CC="$(CC)"
  1470. clean:
  1471. $(MAKE) -C ../src clean
  1472. $(MAKE) -C dbus clean
  1473. rm -f core *~ *.o *.d eap_*.so $(ALL) $(WINALL) eapol_test preauth_test
  1474. rm -f wpa_priv
  1475. rm -f nfc_pw_token
  1476. -include $(OBJS:%.o=%.d)