Makefile 38 KB

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