Makefile 35 KB

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