Makefile 38 KB

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