Makefile 36 KB

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