Makefile 37 KB

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