Makefile 35 KB

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