Makefile 37 KB

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