Makefile 35 KB

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