Android.mk revision 1.1.1.7.8.1 1 1.1.1.2 christos # Copyright (C) 2008 The Android Open Source Project
2 1.1.1.2 christos #
3 1.1.1.2 christos # This software may be distributed under the terms of the BSD license.
4 1.1.1.2 christos # See README for more details.
5 1.1.1.2 christos #
6 1.1.1.2 christos
7 1.1 christos LOCAL_PATH := $(call my-dir)
8 1.1 christos
9 1.1 christos WPA_BUILD_HOSTAPD := false
10 1.1.1.2 christos ifneq ($(BOARD_HOSTAPD_DRIVER),)
11 1.1.1.2 christos WPA_BUILD_HOSTAPD := true
12 1.1.1.2 christos CONFIG_DRIVER_$(BOARD_HOSTAPD_DRIVER) := y
13 1.1 christos endif
14 1.1 christos
15 1.1.1.2 christos ifeq ($(WPA_BUILD_HOSTAPD),true)
16 1.1.1.2 christos
17 1.1.1.2 christos include $(LOCAL_PATH)/android.config
18 1.1 christos
19 1.1 christos # To ignore possible wrong network configurations
20 1.1 christos L_CFLAGS = -DWPA_IGNORE_CONFIG_ERRORS
21 1.1 christos
22 1.1.1.2 christos L_CFLAGS += -DVERSION_STR_POSTFIX=\"-$(PLATFORM_VERSION)\"
23 1.1.1.2 christos
24 1.1 christos # Set Android log name
25 1.1 christos L_CFLAGS += -DANDROID_LOG_NAME=\"hostapd\"
26 1.1 christos
27 1.1.1.3 christos # Disable unused parameter warnings
28 1.1.1.3 christos L_CFLAGS += -Wno-unused-parameter
29 1.1.1.3 christos
30 1.1.1.3 christos # Set Android extended P2P functionality
31 1.1.1.3 christos L_CFLAGS += -DANDROID_P2P
32 1.1.1.5 christos
33 1.1.1.3 christos ifeq ($(BOARD_HOSTAPD_PRIVATE_LIB),)
34 1.1.1.5 christos L_CFLAGS += -DANDROID_LIB_STUB
35 1.1.1.3 christos endif
36 1.1.1.3 christos
37 1.1.1.7.8.1 perseant ifneq ($(BOARD_HOSTAPD_PRIVATE_LIB_EVENT),)
38 1.1.1.7.8.1 perseant L_CFLAGS += -DANDROID_LIB_EVENT
39 1.1.1.7.8.1 perseant endif
40 1.1.1.7.8.1 perseant
41 1.1.1.3 christos # Use Android specific directory for control interface sockets
42 1.1.1.3 christos L_CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/misc/wifi/sockets\"
43 1.1.1.3 christos L_CFLAGS += -DCONFIG_CTRL_IFACE_DIR=\"/data/system/hostapd\"
44 1.1.1.3 christos
45 1.1.1.6 christos # Use Android specific directory for hostapd_cli command completion history
46 1.1.1.6 christos L_CFLAGS += -DCONFIG_HOSTAPD_CLI_HISTORY_DIR=\"/data/misc/wifi\"
47 1.1.1.6 christos
48 1.1 christos # To force sizeof(enum) = 4
49 1.1 christos ifeq ($(TARGET_ARCH),arm)
50 1.1 christos L_CFLAGS += -mabi=aapcs-linux
51 1.1 christos endif
52 1.1 christos
53 1.1 christos INCLUDES = $(LOCAL_PATH)
54 1.1 christos INCLUDES += $(LOCAL_PATH)/src
55 1.1 christos INCLUDES += $(LOCAL_PATH)/src/utils
56 1.1.1.3 christos INCLUDES += system/security/keystore/include
57 1.1 christos ifdef CONFIG_DRIVER_NL80211
58 1.1.1.3 christos ifneq ($(wildcard external/libnl),)
59 1.1.1.3 christos INCLUDES += external/libnl/include
60 1.1.1.3 christos else
61 1.1 christos INCLUDES += external/libnl-headers
62 1.1 christos endif
63 1.1.1.3 christos endif
64 1.1 christos
65 1.1 christos
66 1.1 christos ifndef CONFIG_OS
67 1.1 christos ifdef CONFIG_NATIVE_WINDOWS
68 1.1 christos CONFIG_OS=win32
69 1.1 christos else
70 1.1 christos CONFIG_OS=unix
71 1.1 christos endif
72 1.1 christos endif
73 1.1 christos
74 1.1 christos ifeq ($(CONFIG_OS), internal)
75 1.1 christos L_CFLAGS += -DOS_NO_C_LIB_DEFINES
76 1.1 christos endif
77 1.1 christos
78 1.1 christos ifdef CONFIG_NATIVE_WINDOWS
79 1.1 christos L_CFLAGS += -DCONFIG_NATIVE_WINDOWS
80 1.1 christos LIBS += -lws2_32
81 1.1 christos endif
82 1.1 christos
83 1.1 christos OBJS = main.c
84 1.1 christos OBJS += config_file.c
85 1.1 christos
86 1.1 christos OBJS += src/ap/hostapd.c
87 1.1 christos OBJS += src/ap/wpa_auth_glue.c
88 1.1 christos OBJS += src/ap/drv_callbacks.c
89 1.1 christos OBJS += src/ap/ap_drv_ops.c
90 1.1 christos OBJS += src/ap/utils.c
91 1.1 christos OBJS += src/ap/authsrv.c
92 1.1 christos OBJS += src/ap/ieee802_1x.c
93 1.1 christos OBJS += src/ap/ap_config.c
94 1.1.1.2 christos OBJS += src/ap/eap_user_db.c
95 1.1 christos OBJS += src/ap/ieee802_11_auth.c
96 1.1 christos OBJS += src/ap/sta_info.c
97 1.1 christos OBJS += src/ap/wpa_auth.c
98 1.1 christos OBJS += src/ap/tkip_countermeasures.c
99 1.1 christos OBJS += src/ap/ap_mlme.c
100 1.1 christos OBJS += src/ap/wpa_auth_ie.c
101 1.1 christos OBJS += src/ap/preauth_auth.c
102 1.1 christos OBJS += src/ap/pmksa_cache_auth.c
103 1.1 christos OBJS += src/ap/ieee802_11_shared.c
104 1.1 christos OBJS += src/ap/beacon.c
105 1.1.1.4 christos OBJS += src/ap/bss_load.c
106 1.1.1.5 christos OBJS += src/ap/neighbor_db.c
107 1.1.1.5 christos OBJS += src/ap/rrm.c
108 1.1 christos OBJS_d =
109 1.1 christos OBJS_p =
110 1.1 christos LIBS =
111 1.1 christos LIBS_c =
112 1.1 christos HOBJS =
113 1.1 christos LIBS_h =
114 1.1 christos
115 1.1 christos NEED_RC4=y
116 1.1 christos NEED_AES=y
117 1.1 christos NEED_MD5=y
118 1.1 christos NEED_SHA1=y
119 1.1 christos
120 1.1 christos OBJS += src/drivers/drivers.c
121 1.1 christos L_CFLAGS += -DHOSTAPD
122 1.1 christos
123 1.1 christos ifdef CONFIG_WPA_TRACE
124 1.1 christos L_CFLAGS += -DWPA_TRACE
125 1.1 christos OBJS += src/utils/trace.c
126 1.1 christos HOBJS += src/utils/trace.c
127 1.1 christos LDFLAGS += -rdynamic
128 1.1 christos L_CFLAGS += -funwind-tables
129 1.1 christos ifdef CONFIG_WPA_TRACE_BFD
130 1.1 christos L_CFLAGS += -DWPA_TRACE_BFD
131 1.1 christos LIBS += -lbfd
132 1.1 christos LIBS_c += -lbfd
133 1.1 christos LIBS_h += -lbfd
134 1.1 christos endif
135 1.1 christos endif
136 1.1 christos
137 1.1 christos OBJS += src/utils/eloop.c
138 1.1.1.5 christos
139 1.1.1.5 christos ifdef CONFIG_ELOOP_POLL
140 1.1.1.5 christos L_CFLAGS += -DCONFIG_ELOOP_POLL
141 1.1.1.5 christos endif
142 1.1.1.5 christos
143 1.1.1.5 christos ifdef CONFIG_ELOOP_EPOLL
144 1.1.1.5 christos L_CFLAGS += -DCONFIG_ELOOP_EPOLL
145 1.1.1.5 christos endif
146 1.1.1.5 christos
147 1.1 christos OBJS += src/utils/common.c
148 1.1 christos OBJS += src/utils/wpa_debug.c
149 1.1 christos OBJS += src/utils/wpabuf.c
150 1.1 christos OBJS += src/utils/os_$(CONFIG_OS).c
151 1.1 christos OBJS += src/utils/ip_addr.c
152 1.1.1.7.8.1 perseant OBJS += src/utils/crc32.c
153 1.1 christos
154 1.1 christos OBJS += src/common/ieee802_11_common.c
155 1.1 christos OBJS += src/common/wpa_common.c
156 1.1.1.4 christos OBJS += src/common/hw_features_common.c
157 1.1.1.7.8.1 perseant OBJS += src/common/ptksa_cache.c
158 1.1 christos
159 1.1 christos OBJS += src/eapol_auth/eapol_auth_sm.c
160 1.1 christos
161 1.1 christos
162 1.1 christos ifndef CONFIG_NO_DUMP_STATE
163 1.1.1.3 christos # define HOSTAPD_DUMP_STATE to include support for dumping internal state
164 1.1.1.3 christos # through control interface commands (undefine it, if you want to save in
165 1.1.1.3 christos # binary size)
166 1.1 christos L_CFLAGS += -DHOSTAPD_DUMP_STATE
167 1.1 christos OBJS += src/eapol_auth/eapol_auth_dump.c
168 1.1 christos endif
169 1.1 christos
170 1.1 christos ifdef CONFIG_NO_RADIUS
171 1.1 christos L_CFLAGS += -DCONFIG_NO_RADIUS
172 1.1 christos CONFIG_NO_ACCOUNTING=y
173 1.1 christos else
174 1.1 christos OBJS += src/radius/radius.c
175 1.1 christos OBJS += src/radius/radius_client.c
176 1.1.1.3 christos OBJS += src/radius/radius_das.c
177 1.1 christos endif
178 1.1 christos
179 1.1 christos ifdef CONFIG_NO_ACCOUNTING
180 1.1 christos L_CFLAGS += -DCONFIG_NO_ACCOUNTING
181 1.1 christos else
182 1.1 christos OBJS += src/ap/accounting.c
183 1.1 christos endif
184 1.1 christos
185 1.1 christos ifdef CONFIG_NO_VLAN
186 1.1 christos L_CFLAGS += -DCONFIG_NO_VLAN
187 1.1 christos else
188 1.1 christos OBJS += src/ap/vlan_init.c
189 1.1.1.5 christos OBJS += src/ap/vlan_ifconfig.c
190 1.1.1.5 christos OBJS += src/ap/vlan.c
191 1.1.1.2 christos ifdef CONFIG_FULL_DYNAMIC_VLAN
192 1.1.1.5 christos # Define CONFIG_FULL_DYNAMIC_VLAN to have hostapd manipulate bridges
193 1.1.1.5 christos # and VLAN interfaces for the VLAN feature.
194 1.1.1.5 christos L_CFLAGS += -DCONFIG_FULL_DYNAMIC_VLAN
195 1.1.1.5 christos OBJS += src/ap/vlan_full.c
196 1.1.1.5 christos ifdef CONFIG_VLAN_NETLINK
197 1.1.1.2 christos OBJS += src/ap/vlan_util.c
198 1.1.1.5 christos else
199 1.1.1.5 christos OBJS += src/ap/vlan_ioctl.c
200 1.1.1.2 christos endif
201 1.1.1.2 christos endif
202 1.1 christos endif
203 1.1 christos
204 1.1 christos ifdef CONFIG_NO_CTRL_IFACE
205 1.1 christos L_CFLAGS += -DCONFIG_NO_CTRL_IFACE
206 1.1 christos else
207 1.1.1.5 christos OBJS += src/common/ctrl_iface_common.c
208 1.1 christos OBJS += ctrl_iface.c
209 1.1 christos OBJS += src/ap/ctrl_iface_ap.c
210 1.1 christos endif
211 1.1 christos
212 1.1 christos L_CFLAGS += -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX
213 1.1 christos
214 1.1 christos ifdef CONFIG_RSN_PREAUTH
215 1.1 christos L_CFLAGS += -DCONFIG_RSN_PREAUTH
216 1.1 christos CONFIG_L2_PACKET=y
217 1.1 christos endif
218 1.1 christos
219 1.1.1.3 christos ifdef CONFIG_HS20
220 1.1.1.4 christos CONFIG_PROXYARP=y
221 1.1.1.4 christos endif
222 1.1.1.4 christos
223 1.1.1.4 christos ifdef CONFIG_PROXYARP
224 1.1.1.4 christos CONFIG_L2_PACKET=y
225 1.1.1.4 christos endif
226 1.1.1.4 christos
227 1.1.1.4 christos ifdef CONFIG_SUITEB
228 1.1.1.4 christos L_CFLAGS += -DCONFIG_SUITEB
229 1.1.1.4 christos endif
230 1.1.1.4 christos
231 1.1.1.4 christos ifdef CONFIG_SUITEB192
232 1.1.1.4 christos L_CFLAGS += -DCONFIG_SUITEB192
233 1.1.1.4 christos NEED_SHA384=y
234 1.1.1.3 christos endif
235 1.1.1.3 christos
236 1.1.1.7 christos ifdef CONFIG_OCV
237 1.1.1.7 christos L_CFLAGS += -DCONFIG_OCV
238 1.1.1.7 christos OBJS += src/common/ocv.c
239 1.1.1.7 christos endif
240 1.1.1.7 christos
241 1.1.1.7.8.1 perseant NEED_AES_UNWRAP=y
242 1.1 christos
243 1.1 christos ifdef CONFIG_IEEE80211R
244 1.1.1.6 christos L_CFLAGS += -DCONFIG_IEEE80211R -DCONFIG_IEEE80211R_AP
245 1.1 christos OBJS += src/ap/wpa_auth_ft.c
246 1.1 christos NEED_AES_UNWRAP=y
247 1.1.1.6 christos NEED_AES_SIV=y
248 1.1.1.6 christos NEED_ETH_P_OUI=y
249 1.1.1.6 christos NEED_HMAC_SHA256_KDF=y
250 1.1.1.6 christos endif
251 1.1.1.6 christos
252 1.1.1.6 christos ifdef NEED_ETH_P_OUI
253 1.1.1.6 christos L_CFLAGS += -DCONFIG_ETH_P_OUI
254 1.1.1.6 christos OBJS += src/ap/eth_p_oui.c
255 1.1 christos endif
256 1.1 christos
257 1.1.1.2 christos ifdef CONFIG_SAE
258 1.1.1.2 christos L_CFLAGS += -DCONFIG_SAE
259 1.1.1.3 christos OBJS += src/common/sae.c
260 1.1.1.7.8.1 perseant ifdef CONFIG_SAE_PK
261 1.1.1.7.8.1 perseant L_CFLAGS += -DCONFIG_SAE_PK
262 1.1.1.7.8.1 perseant NEED_AES_SIV=y
263 1.1.1.7.8.1 perseant OBJS += src/common/sae_pk.c
264 1.1.1.7.8.1 perseant endif
265 1.1.1.3 christos NEED_ECC=y
266 1.1.1.3 christos NEED_DH_GROUPS=y
267 1.1.1.7.8.1 perseant NEED_HMAC_SHA256_KDF=y
268 1.1.1.7 christos NEED_DRAGONFLY=y
269 1.1.1.3 christos endif
270 1.1.1.3 christos
271 1.1.1.6 christos ifdef CONFIG_OWE
272 1.1.1.6 christos L_CFLAGS += -DCONFIG_OWE
273 1.1.1.6 christos NEED_ECC=y
274 1.1.1.6 christos NEED_HMAC_SHA256_KDF=y
275 1.1.1.6 christos NEED_HMAC_SHA384_KDF=y
276 1.1.1.6 christos NEED_HMAC_SHA512_KDF=y
277 1.1.1.6 christos NEED_SHA384=y
278 1.1.1.6 christos NEED_SHA512=y
279 1.1.1.6 christos endif
280 1.1.1.6 christos
281 1.1.1.6 christos ifdef CONFIG_FILS
282 1.1.1.6 christos L_CFLAGS += -DCONFIG_FILS
283 1.1.1.6 christos OBJS += src/ap/fils_hlp.c
284 1.1.1.6 christos NEED_SHA384=y
285 1.1.1.6 christos NEED_AES_SIV=y
286 1.1.1.6 christos ifdef CONFIG_FILS_SK_PFS
287 1.1.1.6 christos L_CFLAGS += -DCONFIG_FILS_SK_PFS
288 1.1.1.6 christos NEED_ECC=y
289 1.1.1.6 christos endif
290 1.1.1.6 christos endif
291 1.1.1.6 christos
292 1.1.1.3 christos ifdef CONFIG_WNM
293 1.1.1.6 christos L_CFLAGS += -DCONFIG_WNM -DCONFIG_WNM_AP
294 1.1.1.3 christos OBJS += src/ap/wnm_ap.c
295 1.1.1.2 christos endif
296 1.1.1.2 christos
297 1.1.1.3 christos ifdef CONFIG_IEEE80211AC
298 1.1.1.3 christos L_CFLAGS += -DCONFIG_IEEE80211AC
299 1.1.1.3 christos endif
300 1.1.1.3 christos
301 1.1.1.7.8.1 perseant ifdef CONFIG_IEEE80211BE
302 1.1.1.7.8.1 perseant CONFIG_IEEE80211AX=y
303 1.1.1.7.8.1 perseant L_CFLAGS += -DCONFIG_IEEE80211BE
304 1.1.1.7.8.1 perseant OBJS += src/ap/ieee802_11_eht.c
305 1.1.1.7.8.1 perseant endif
306 1.1.1.7.8.1 perseant
307 1.1.1.6 christos ifdef CONFIG_IEEE80211AX
308 1.1.1.6 christos L_CFLAGS += -DCONFIG_IEEE80211AX
309 1.1.1.6 christos endif
310 1.1.1.6 christos
311 1.1.1.5 christos ifdef CONFIG_MBO
312 1.1.1.5 christos L_CFLAGS += -DCONFIG_MBO
313 1.1.1.5 christos OBJS += src/ap/mbo_ap.c
314 1.1.1.5 christos endif
315 1.1.1.5 christos
316 1.1.1.5 christos ifdef CONFIG_FST
317 1.1.1.5 christos L_CFLAGS += -DCONFIG_FST
318 1.1.1.5 christos OBJS += src/fst/fst.c
319 1.1.1.5 christos OBJS += src/fst/fst_group.c
320 1.1.1.5 christos OBJS += src/fst/fst_iface.c
321 1.1.1.5 christos OBJS += src/fst/fst_session.c
322 1.1.1.5 christos OBJS += src/fst/fst_ctrl_aux.c
323 1.1.1.5 christos ifdef CONFIG_FST_TEST
324 1.1.1.5 christos L_CFLAGS += -DCONFIG_FST_TEST
325 1.1.1.5 christos endif
326 1.1.1.5 christos ifndef CONFIG_NO_CTRL_IFACE
327 1.1.1.5 christos OBJS += src/fst/fst_ctrl_iface.c
328 1.1.1.5 christos endif
329 1.1.1.5 christos endif
330 1.1.1.5 christos
331 1.1.1.7.8.1 perseant ifdef CONFIG_WEP
332 1.1.1.7.8.1 perseant L_CFLAGS += -DCONFIG_WEP
333 1.1.1.7.8.1 perseant endif
334 1.1.1.7.8.1 perseant
335 1.1.1.7.8.1 perseant ifdef CONFIG_NO_TKIP
336 1.1.1.7.8.1 perseant L_CFLAGS += -DCONFIG_NO_TKIP
337 1.1.1.7.8.1 perseant endif
338 1.1.1.7.8.1 perseant
339 1.1.1.5 christos
340 1.1 christos include $(LOCAL_PATH)/src/drivers/drivers.mk
341 1.1 christos
342 1.1 christos OBJS += $(DRV_AP_OBJS)
343 1.1 christos L_CFLAGS += $(DRV_AP_CFLAGS)
344 1.1 christos LDFLAGS += $(DRV_AP_LDFLAGS)
345 1.1 christos LIBS += $(DRV_AP_LIBS)
346 1.1 christos
347 1.1 christos ifdef CONFIG_L2_PACKET
348 1.1 christos ifdef CONFIG_DNET_PCAP
349 1.1 christos ifdef CONFIG_L2_FREEBSD
350 1.1 christos LIBS += -lpcap
351 1.1 christos OBJS += src/l2_packet/l2_packet_freebsd.c
352 1.1 christos else
353 1.1 christos LIBS += -ldnet -lpcap
354 1.1 christos OBJS += src/l2_packet/l2_packet_pcap.c
355 1.1 christos endif
356 1.1 christos else
357 1.1 christos OBJS += src/l2_packet/l2_packet_linux.c
358 1.1 christos endif
359 1.1 christos else
360 1.1 christos OBJS += src/l2_packet/l2_packet_none.c
361 1.1 christos endif
362 1.1 christos
363 1.1 christos
364 1.1 christos ifdef CONFIG_EAP_MD5
365 1.1 christos L_CFLAGS += -DEAP_SERVER_MD5
366 1.1 christos OBJS += src/eap_server/eap_server_md5.c
367 1.1 christos CHAP=y
368 1.1 christos endif
369 1.1 christos
370 1.1 christos ifdef CONFIG_EAP_TLS
371 1.1 christos L_CFLAGS += -DEAP_SERVER_TLS
372 1.1 christos OBJS += src/eap_server/eap_server_tls.c
373 1.1 christos TLS_FUNCS=y
374 1.1 christos endif
375 1.1 christos
376 1.1.1.3 christos ifdef CONFIG_EAP_UNAUTH_TLS
377 1.1.1.3 christos L_CFLAGS += -DEAP_SERVER_UNAUTH_TLS
378 1.1.1.3 christos ifndef CONFIG_EAP_TLS
379 1.1.1.3 christos OBJS += src/eap_server/eap_server_tls.c
380 1.1.1.3 christos TLS_FUNCS=y
381 1.1.1.3 christos endif
382 1.1.1.3 christos endif
383 1.1.1.3 christos
384 1.1 christos ifdef CONFIG_EAP_PEAP
385 1.1 christos L_CFLAGS += -DEAP_SERVER_PEAP
386 1.1 christos OBJS += src/eap_server/eap_server_peap.c
387 1.1 christos OBJS += src/eap_common/eap_peap_common.c
388 1.1 christos TLS_FUNCS=y
389 1.1 christos CONFIG_EAP_MSCHAPV2=y
390 1.1 christos endif
391 1.1 christos
392 1.1 christos ifdef CONFIG_EAP_TTLS
393 1.1 christos L_CFLAGS += -DEAP_SERVER_TTLS
394 1.1 christos OBJS += src/eap_server/eap_server_ttls.c
395 1.1 christos TLS_FUNCS=y
396 1.1 christos CHAP=y
397 1.1 christos endif
398 1.1 christos
399 1.1 christos ifdef CONFIG_EAP_MSCHAPV2
400 1.1 christos L_CFLAGS += -DEAP_SERVER_MSCHAPV2
401 1.1 christos OBJS += src/eap_server/eap_server_mschapv2.c
402 1.1 christos MS_FUNCS=y
403 1.1 christos endif
404 1.1 christos
405 1.1 christos ifdef CONFIG_EAP_GTC
406 1.1 christos L_CFLAGS += -DEAP_SERVER_GTC
407 1.1 christos OBJS += src/eap_server/eap_server_gtc.c
408 1.1 christos endif
409 1.1 christos
410 1.1 christos ifdef CONFIG_EAP_SIM
411 1.1 christos L_CFLAGS += -DEAP_SERVER_SIM
412 1.1 christos OBJS += src/eap_server/eap_server_sim.c
413 1.1 christos CONFIG_EAP_SIM_COMMON=y
414 1.1 christos NEED_AES_CBC=y
415 1.1 christos endif
416 1.1 christos
417 1.1 christos ifdef CONFIG_EAP_AKA
418 1.1 christos L_CFLAGS += -DEAP_SERVER_AKA
419 1.1 christos OBJS += src/eap_server/eap_server_aka.c
420 1.1 christos CONFIG_EAP_SIM_COMMON=y
421 1.1 christos NEED_AES_CBC=y
422 1.1 christos endif
423 1.1 christos
424 1.1 christos ifdef CONFIG_EAP_AKA_PRIME
425 1.1 christos L_CFLAGS += -DEAP_SERVER_AKA_PRIME
426 1.1 christos endif
427 1.1 christos
428 1.1 christos ifdef CONFIG_EAP_SIM_COMMON
429 1.1 christos OBJS += src/eap_common/eap_sim_common.c
430 1.1 christos # Example EAP-SIM/AKA interface for GSM/UMTS authentication. This can be
431 1.1.1.7.8.1 perseant # replaced with another file implementing the interface specified in
432 1.1 christos # eap_sim_db.h.
433 1.1 christos OBJS += src/eap_server/eap_sim_db.c
434 1.1 christos NEED_FIPS186_2_PRF=y
435 1.1 christos endif
436 1.1 christos
437 1.1 christos ifdef CONFIG_EAP_PAX
438 1.1 christos L_CFLAGS += -DEAP_SERVER_PAX
439 1.1 christos OBJS += src/eap_server/eap_server_pax.c src/eap_common/eap_pax_common.c
440 1.1 christos endif
441 1.1 christos
442 1.1 christos ifdef CONFIG_EAP_PSK
443 1.1 christos L_CFLAGS += -DEAP_SERVER_PSK
444 1.1 christos OBJS += src/eap_server/eap_server_psk.c src/eap_common/eap_psk_common.c
445 1.1 christos NEED_AES_ENCBLOCK=y
446 1.1 christos NEED_AES_EAX=y
447 1.1 christos endif
448 1.1 christos
449 1.1 christos ifdef CONFIG_EAP_SAKE
450 1.1 christos L_CFLAGS += -DEAP_SERVER_SAKE
451 1.1 christos OBJS += src/eap_server/eap_server_sake.c src/eap_common/eap_sake_common.c
452 1.1 christos endif
453 1.1 christos
454 1.1 christos ifdef CONFIG_EAP_GPSK
455 1.1 christos L_CFLAGS += -DEAP_SERVER_GPSK
456 1.1 christos OBJS += src/eap_server/eap_server_gpsk.c src/eap_common/eap_gpsk_common.c
457 1.1 christos ifdef CONFIG_EAP_GPSK_SHA256
458 1.1.1.3 christos L_CFLAGS += -DEAP_GPSK_SHA256
459 1.1 christos endif
460 1.1 christos endif
461 1.1 christos
462 1.1 christos ifdef CONFIG_EAP_PWD
463 1.1 christos L_CFLAGS += -DEAP_SERVER_PWD
464 1.1 christos OBJS += src/eap_server/eap_server_pwd.c src/eap_common/eap_pwd_common.c
465 1.1.1.6 christos NEED_ECC=y
466 1.1.1.7 christos NEED_DRAGONFLY=y
467 1.1 christos endif
468 1.1 christos
469 1.1.1.3 christos ifdef CONFIG_EAP_EKE
470 1.1.1.3 christos L_CFLAGS += -DEAP_SERVER_EKE
471 1.1.1.3 christos OBJS += src/eap_server/eap_server_eke.c src/eap_common/eap_eke_common.c
472 1.1.1.3 christos NEED_DH_GROUPS=y
473 1.1.1.3 christos NEED_DH_GROUPS_ALL=y
474 1.1.1.3 christos endif
475 1.1.1.3 christos
476 1.1 christos ifdef CONFIG_EAP_VENDOR_TEST
477 1.1 christos L_CFLAGS += -DEAP_SERVER_VENDOR_TEST
478 1.1 christos OBJS += src/eap_server/eap_server_vendor_test.c
479 1.1 christos endif
480 1.1 christos
481 1.1 christos ifdef CONFIG_EAP_FAST
482 1.1 christos L_CFLAGS += -DEAP_SERVER_FAST
483 1.1 christos OBJS += src/eap_server/eap_server_fast.c
484 1.1 christos OBJS += src/eap_common/eap_fast_common.c
485 1.1 christos TLS_FUNCS=y
486 1.1 christos NEED_T_PRF=y
487 1.1 christos NEED_AES_UNWRAP=y
488 1.1 christos endif
489 1.1 christos
490 1.1.1.7 christos ifdef CONFIG_EAP_TEAP
491 1.1.1.7 christos L_CFLAGS += -DEAP_SERVER_TEAP
492 1.1.1.7 christos OBJS += src/eap_server/eap_server_teap.c
493 1.1.1.7 christos OBJS += src/eap_common/eap_teap_common.c
494 1.1.1.7 christos TLS_FUNCS=y
495 1.1.1.7 christos NEED_T_PRF=y
496 1.1.1.7 christos NEED_SHA384=y
497 1.1.1.7.8.1 perseant NEED_TLS_PRF_SHA256=y
498 1.1.1.7.8.1 perseant NEED_TLS_PRF_SHA384=y
499 1.1.1.7 christos NEED_AES_UNWRAP=y
500 1.1.1.7 christos endif
501 1.1.1.7 christos
502 1.1 christos ifdef CONFIG_WPS
503 1.1 christos L_CFLAGS += -DCONFIG_WPS -DEAP_SERVER_WSC
504 1.1 christos OBJS += src/utils/uuid.c
505 1.1 christos OBJS += src/ap/wps_hostapd.c
506 1.1 christos OBJS += src/eap_server/eap_server_wsc.c src/eap_common/eap_wsc_common.c
507 1.1 christos OBJS += src/wps/wps.c
508 1.1 christos OBJS += src/wps/wps_common.c
509 1.1 christos OBJS += src/wps/wps_attr_parse.c
510 1.1 christos OBJS += src/wps/wps_attr_build.c
511 1.1 christos OBJS += src/wps/wps_attr_process.c
512 1.1 christos OBJS += src/wps/wps_dev_attr.c
513 1.1 christos OBJS += src/wps/wps_enrollee.c
514 1.1 christos OBJS += src/wps/wps_registrar.c
515 1.1 christos NEED_DH_GROUPS=y
516 1.1 christos NEED_BASE64=y
517 1.1 christos NEED_AES_CBC=y
518 1.1 christos NEED_MODEXP=y
519 1.1 christos CONFIG_EAP=y
520 1.1 christos
521 1.1 christos ifdef CONFIG_WPS_NFC
522 1.1 christos L_CFLAGS += -DCONFIG_WPS_NFC
523 1.1 christos OBJS += src/wps/ndef.c
524 1.1 christos NEED_WPS_OOB=y
525 1.1 christos endif
526 1.1 christos
527 1.1 christos ifdef NEED_WPS_OOB
528 1.1 christos L_CFLAGS += -DCONFIG_WPS_OOB
529 1.1 christos endif
530 1.1 christos
531 1.1 christos ifdef CONFIG_WPS_UPNP
532 1.1 christos L_CFLAGS += -DCONFIG_WPS_UPNP
533 1.1 christos OBJS += src/wps/wps_upnp.c
534 1.1 christos OBJS += src/wps/wps_upnp_ssdp.c
535 1.1 christos OBJS += src/wps/wps_upnp_web.c
536 1.1 christos OBJS += src/wps/wps_upnp_event.c
537 1.1 christos OBJS += src/wps/wps_upnp_ap.c
538 1.1 christos OBJS += src/wps/upnp_xml.c
539 1.1 christos OBJS += src/wps/httpread.c
540 1.1 christos OBJS += src/wps/http_client.c
541 1.1 christos OBJS += src/wps/http_server.c
542 1.1 christos endif
543 1.1 christos
544 1.1 christos ifdef CONFIG_WPS_STRICT
545 1.1 christos L_CFLAGS += -DCONFIG_WPS_STRICT
546 1.1 christos OBJS += src/wps/wps_validate.c
547 1.1 christos endif
548 1.1 christos
549 1.1 christos ifdef CONFIG_WPS_TESTING
550 1.1 christos L_CFLAGS += -DCONFIG_WPS_TESTING
551 1.1 christos endif
552 1.1 christos
553 1.1 christos endif
554 1.1 christos
555 1.1.1.6 christos ifdef CONFIG_DPP
556 1.1.1.6 christos L_CFLAGS += -DCONFIG_DPP
557 1.1.1.6 christos OBJS += src/common/dpp.c
558 1.1.1.7.8.1 perseant OBJS += src/common/dpp_auth.c
559 1.1.1.7.8.1 perseant OBJS += src/common/dpp_backup.c
560 1.1.1.7.8.1 perseant OBJS += src/common/dpp_crypto.c
561 1.1.1.7.8.1 perseant OBJS += src/common/dpp_pkex.c
562 1.1.1.7.8.1 perseant OBJS += src/common/dpp_reconfig.c
563 1.1.1.7.8.1 perseant OBJS += src/common/dpp_tcp.c
564 1.1.1.6 christos OBJS += src/ap/dpp_hostapd.c
565 1.1.1.6 christos OBJS += src/ap/gas_query_ap.c
566 1.1.1.6 christos NEED_AES_SIV=y
567 1.1.1.6 christos NEED_HMAC_SHA256_KDF=y
568 1.1.1.6 christos NEED_HMAC_SHA384_KDF=y
569 1.1.1.6 christos NEED_HMAC_SHA512_KDF=y
570 1.1.1.6 christos NEED_SHA384=y
571 1.1.1.6 christos NEED_SHA512=y
572 1.1.1.7.8.1 perseant NEED_ECC=y
573 1.1.1.6 christos NEED_JSON=y
574 1.1.1.6 christos NEED_GAS=y
575 1.1.1.6 christos NEED_BASE64=y
576 1.1.1.7.8.1 perseant NEED_ASN1=y
577 1.1.1.7 christos ifdef CONFIG_DPP2
578 1.1.1.7 christos L_CFLAGS += -DCONFIG_DPP2
579 1.1.1.7 christos endif
580 1.1.1.7.8.1 perseant ifdef CONFIG_DPP3
581 1.1.1.7.8.1 perseant L_CFLAGS += -DCONFIG_DPP3
582 1.1.1.7.8.1 perseant endif
583 1.1.1.7.8.1 perseant endif
584 1.1.1.7.8.1 perseant
585 1.1.1.7.8.1 perseant ifdef CONFIG_NAN_USD
586 1.1.1.7.8.1 perseant OBJS += src/common/nan_de.c
587 1.1.1.7.8.1 perseant OBJS += src/ap/nan_usd_ap.c
588 1.1.1.7.8.1 perseant L_CFLAGS += -DCONFIG_NAN_USD
589 1.1.1.7.8.1 perseant endif
590 1.1.1.7.8.1 perseant
591 1.1.1.7.8.1 perseant ifdef CONFIG_PASN
592 1.1.1.7.8.1 perseant L_CFLAGS += -DCONFIG_PASN
593 1.1.1.7.8.1 perseant L_CFLAGS += -DCONFIG_PTKSA_CACHE
594 1.1.1.7.8.1 perseant NEED_HMAC_SHA256_KDF=y
595 1.1.1.7.8.1 perseant NEED_HMAC_SHA384_KDF=y
596 1.1.1.7.8.1 perseant NEED_SHA256=y
597 1.1.1.7.8.1 perseant NEED_SHA384=y
598 1.1.1.6 christos endif
599 1.1.1.6 christos
600 1.1 christos ifdef CONFIG_EAP_IKEV2
601 1.1 christos L_CFLAGS += -DEAP_SERVER_IKEV2
602 1.1 christos OBJS += src/eap_server/eap_server_ikev2.c src/eap_server/ikev2.c
603 1.1 christos OBJS += src/eap_common/eap_ikev2_common.c src/eap_common/ikev2_common.c
604 1.1 christos NEED_DH_GROUPS=y
605 1.1 christos NEED_DH_GROUPS_ALL=y
606 1.1 christos NEED_MODEXP=y
607 1.1 christos NEED_CIPHER=y
608 1.1 christos endif
609 1.1 christos
610 1.1 christos ifdef CONFIG_EAP_TNC
611 1.1 christos L_CFLAGS += -DEAP_SERVER_TNC
612 1.1 christos OBJS += src/eap_server/eap_server_tnc.c
613 1.1 christos OBJS += src/eap_server/tncs.c
614 1.1 christos NEED_BASE64=y
615 1.1 christos ifndef CONFIG_DRIVER_BSD
616 1.1 christos LIBS += -ldl
617 1.1 christos endif
618 1.1 christos endif
619 1.1 christos
620 1.1 christos # Basic EAP functionality is needed for EAPOL
621 1.1 christos OBJS += eap_register.c
622 1.1 christos OBJS += src/eap_server/eap_server.c
623 1.1 christos OBJS += src/eap_common/eap_common.c
624 1.1 christos OBJS += src/eap_server/eap_server_methods.c
625 1.1 christos OBJS += src/eap_server/eap_server_identity.c
626 1.1 christos L_CFLAGS += -DEAP_SERVER_IDENTITY
627 1.1 christos
628 1.1 christos ifdef CONFIG_EAP
629 1.1 christos L_CFLAGS += -DEAP_SERVER
630 1.1 christos endif
631 1.1 christos
632 1.1 christos ifdef CONFIG_PKCS12
633 1.1 christos L_CFLAGS += -DPKCS12_FUNCS
634 1.1 christos endif
635 1.1 christos
636 1.1.1.7 christos ifdef NEED_DRAGONFLY
637 1.1.1.7 christos OBJS += src/common/dragonfly.c
638 1.1.1.7 christos endif
639 1.1.1.7 christos
640 1.1 christos ifdef MS_FUNCS
641 1.1 christos OBJS += src/crypto/ms_funcs.c
642 1.1 christos NEED_DES=y
643 1.1 christos NEED_MD4=y
644 1.1 christos endif
645 1.1 christos
646 1.1 christos ifdef CHAP
647 1.1 christos OBJS += src/eap_common/chap.c
648 1.1 christos endif
649 1.1 christos
650 1.1.1.7.8.1 perseant ifdef CONFIG_RADIUS_TLS
651 1.1.1.7.8.1 perseant TLS_FUNCS=y
652 1.1.1.7.8.1 perseant L_CFLAGS += -DCONFIG_RADIUS_TLS
653 1.1.1.7.8.1 perseant endif
654 1.1.1.7.8.1 perseant
655 1.1 christos ifdef TLS_FUNCS
656 1.1 christos NEED_DES=y
657 1.1 christos # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, and EAP_TTLS)
658 1.1 christos L_CFLAGS += -DEAP_TLS_FUNCS
659 1.1 christos OBJS += src/eap_server/eap_server_tls_common.c
660 1.1 christos NEED_TLS_PRF=y
661 1.1 christos endif
662 1.1 christos
663 1.1 christos ifndef CONFIG_TLS
664 1.1 christos CONFIG_TLS=openssl
665 1.1 christos endif
666 1.1 christos
667 1.1.1.3 christos ifdef CONFIG_TLSV11
668 1.1.1.3 christos L_CFLAGS += -DCONFIG_TLSV11
669 1.1.1.3 christos endif
670 1.1.1.3 christos
671 1.1.1.3 christos ifdef CONFIG_TLSV12
672 1.1.1.3 christos L_CFLAGS += -DCONFIG_TLSV12
673 1.1.1.3 christos endif
674 1.1.1.3 christos
675 1.1 christos ifeq ($(CONFIG_TLS), openssl)
676 1.1.1.7.8.1 perseant L_CFLAGS += -DCRYPTO_RSA_OAEP_SHA256
677 1.1 christos ifdef TLS_FUNCS
678 1.1 christos OBJS += src/crypto/tls_openssl.c
679 1.1.1.5 christos OBJS += src/crypto/tls_openssl_ocsp.c
680 1.1 christos LIBS += -lssl
681 1.1 christos endif
682 1.1 christos OBJS += src/crypto/crypto_openssl.c
683 1.1 christos HOBJS += src/crypto/crypto_openssl.c
684 1.1 christos ifdef NEED_FIPS186_2_PRF
685 1.1 christos OBJS += src/crypto/fips_prf_openssl.c
686 1.1 christos endif
687 1.1.1.5 christos NEED_TLS_PRF_SHA256=y
688 1.1 christos LIBS += -lcrypto
689 1.1 christos LIBS_h += -lcrypto
690 1.1.1.6 christos ifndef CONFIG_TLS_DEFAULT_CIPHERS
691 1.1.1.6 christos CONFIG_TLS_DEFAULT_CIPHERS = "DEFAULT:!EXP:!LOW"
692 1.1.1.6 christos endif
693 1.1.1.6 christos L_CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\"
694 1.1 christos endif
695 1.1 christos
696 1.1 christos ifeq ($(CONFIG_TLS), gnutls)
697 1.1.1.6 christos ifndef CONFIG_CRYPTO
698 1.1.1.6 christos # default to libgcrypt
699 1.1.1.6 christos CONFIG_CRYPTO=gnutls
700 1.1.1.6 christos endif
701 1.1 christos ifdef TLS_FUNCS
702 1.1 christos OBJS += src/crypto/tls_gnutls.c
703 1.1 christos LIBS += -lgnutls -lgpg-error
704 1.1 christos endif
705 1.1.1.6 christos OBJS += src/crypto/crypto_$(CONFIG_CRYPTO).c
706 1.1.1.6 christos HOBJS += src/crypto/crypto_$(CONFIG_CRYPTO).c
707 1.1 christos ifdef NEED_FIPS186_2_PRF
708 1.1.1.3 christos OBJS += src/crypto/fips_prf_internal.c
709 1.1.1.3 christos OBJS += src/crypto/sha1-internal.c
710 1.1 christos endif
711 1.1.1.6 christos ifeq ($(CONFIG_CRYPTO), gnutls)
712 1.1 christos LIBS += -lgcrypt
713 1.1 christos LIBS_h += -lgcrypt
714 1.1 christos CONFIG_INTERNAL_RC4=y
715 1.1 christos CONFIG_INTERNAL_DH_GROUP5=y
716 1.1 christos endif
717 1.1.1.6 christos ifeq ($(CONFIG_CRYPTO), nettle)
718 1.1.1.6 christos LIBS += -lnettle -lgmp
719 1.1.1.6 christos LIBS_p += -lnettle -lgmp
720 1.1.1.6 christos CONFIG_INTERNAL_RC4=y
721 1.1.1.6 christos CONFIG_INTERNAL_DH_GROUP5=y
722 1.1.1.6 christos endif
723 1.1.1.6 christos endif
724 1.1 christos
725 1.1 christos ifeq ($(CONFIG_TLS), internal)
726 1.1 christos ifndef CONFIG_CRYPTO
727 1.1 christos CONFIG_CRYPTO=internal
728 1.1 christos endif
729 1.1 christos ifdef TLS_FUNCS
730 1.1 christos OBJS += src/crypto/crypto_internal-rsa.c
731 1.1 christos OBJS += src/crypto/tls_internal.c
732 1.1 christos OBJS += src/tls/tlsv1_common.c
733 1.1 christos OBJS += src/tls/tlsv1_record.c
734 1.1 christos OBJS += src/tls/tlsv1_cred.c
735 1.1 christos OBJS += src/tls/tlsv1_server.c
736 1.1 christos OBJS += src/tls/tlsv1_server_write.c
737 1.1 christos OBJS += src/tls/tlsv1_server_read.c
738 1.1 christos OBJS += src/tls/rsa.c
739 1.1 christos OBJS += src/tls/x509v3.c
740 1.1 christos OBJS += src/tls/pkcs1.c
741 1.1 christos OBJS += src/tls/pkcs5.c
742 1.1 christos OBJS += src/tls/pkcs8.c
743 1.1.1.7.8.1 perseant NEED_ASN1=y
744 1.1 christos NEED_BASE64=y
745 1.1 christos NEED_TLS_PRF=y
746 1.1.1.3 christos ifdef CONFIG_TLSV12
747 1.1.1.3 christos NEED_TLS_PRF_SHA256=y
748 1.1.1.3 christos endif
749 1.1 christos NEED_MODEXP=y
750 1.1 christos NEED_CIPHER=y
751 1.1 christos L_CFLAGS += -DCONFIG_TLS_INTERNAL
752 1.1 christos L_CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER
753 1.1 christos endif
754 1.1 christos ifdef NEED_CIPHER
755 1.1 christos NEED_DES=y
756 1.1 christos OBJS += src/crypto/crypto_internal-cipher.c
757 1.1 christos endif
758 1.1 christos ifdef NEED_MODEXP
759 1.1 christos OBJS += src/crypto/crypto_internal-modexp.c
760 1.1 christos OBJS += src/tls/bignum.c
761 1.1 christos endif
762 1.1 christos ifeq ($(CONFIG_CRYPTO), libtomcrypt)
763 1.1 christos OBJS += src/crypto/crypto_libtomcrypt.c
764 1.1 christos LIBS += -ltomcrypt -ltfm
765 1.1 christos LIBS_h += -ltomcrypt -ltfm
766 1.1 christos CONFIG_INTERNAL_SHA256=y
767 1.1 christos CONFIG_INTERNAL_RC4=y
768 1.1 christos CONFIG_INTERNAL_DH_GROUP5=y
769 1.1 christos endif
770 1.1 christos ifeq ($(CONFIG_CRYPTO), internal)
771 1.1 christos OBJS += src/crypto/crypto_internal.c
772 1.1 christos NEED_AES_DEC=y
773 1.1 christos L_CFLAGS += -DCONFIG_CRYPTO_INTERNAL
774 1.1 christos ifdef CONFIG_INTERNAL_LIBTOMMATH
775 1.1 christos L_CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH
776 1.1 christos ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST
777 1.1 christos L_CFLAGS += -DLTM_FAST
778 1.1 christos endif
779 1.1 christos else
780 1.1 christos LIBS += -ltommath
781 1.1 christos LIBS_h += -ltommath
782 1.1 christos endif
783 1.1 christos CONFIG_INTERNAL_AES=y
784 1.1 christos CONFIG_INTERNAL_DES=y
785 1.1 christos CONFIG_INTERNAL_SHA1=y
786 1.1 christos CONFIG_INTERNAL_MD4=y
787 1.1 christos CONFIG_INTERNAL_MD5=y
788 1.1 christos CONFIG_INTERNAL_SHA256=y
789 1.1.1.5 christos CONFIG_INTERNAL_SHA384=y
790 1.1.1.5 christos CONFIG_INTERNAL_SHA512=y
791 1.1 christos CONFIG_INTERNAL_RC4=y
792 1.1 christos CONFIG_INTERNAL_DH_GROUP5=y
793 1.1 christos endif
794 1.1 christos ifeq ($(CONFIG_CRYPTO), cryptoapi)
795 1.1 christos OBJS += src/crypto/crypto_cryptoapi.c
796 1.1 christos OBJS_p += src/crypto/crypto_cryptoapi.c
797 1.1 christos L_CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI
798 1.1 christos CONFIG_INTERNAL_SHA256=y
799 1.1 christos CONFIG_INTERNAL_RC4=y
800 1.1 christos endif
801 1.1 christos endif
802 1.1 christos
803 1.1 christos ifeq ($(CONFIG_TLS), none)
804 1.1 christos ifdef TLS_FUNCS
805 1.1 christos OBJS += src/crypto/tls_none.c
806 1.1 christos L_CFLAGS += -DEAP_TLS_NONE
807 1.1 christos CONFIG_INTERNAL_AES=y
808 1.1 christos CONFIG_INTERNAL_SHA1=y
809 1.1 christos CONFIG_INTERNAL_MD5=y
810 1.1 christos endif
811 1.1 christos OBJS += src/crypto/crypto_none.c
812 1.1 christos OBJS_p += src/crypto/crypto_none.c
813 1.1 christos CONFIG_INTERNAL_SHA256=y
814 1.1 christos CONFIG_INTERNAL_RC4=y
815 1.1 christos endif
816 1.1 christos
817 1.1 christos ifndef TLS_FUNCS
818 1.1 christos OBJS += src/crypto/tls_none.c
819 1.1 christos ifeq ($(CONFIG_TLS), internal)
820 1.1 christos CONFIG_INTERNAL_AES=y
821 1.1 christos CONFIG_INTERNAL_SHA1=y
822 1.1 christos CONFIG_INTERNAL_MD5=y
823 1.1 christos CONFIG_INTERNAL_RC4=y
824 1.1 christos endif
825 1.1 christos endif
826 1.1 christos
827 1.1 christos AESOBJS = # none so far
828 1.1 christos ifdef CONFIG_INTERNAL_AES
829 1.1 christos AESOBJS += src/crypto/aes-internal.c src/crypto/aes-internal-enc.c
830 1.1 christos endif
831 1.1 christos
832 1.1.1.4 christos ifneq ($(CONFIG_TLS), openssl)
833 1.1 christos AESOBJS += src/crypto/aes-wrap.c
834 1.1.1.4 christos endif
835 1.1 christos ifdef NEED_AES_EAX
836 1.1 christos AESOBJS += src/crypto/aes-eax.c
837 1.1 christos NEED_AES_CTR=y
838 1.1.1.6 christos endif
839 1.1.1.6 christos ifdef NEED_AES_SIV
840 1.1.1.6 christos AESOBJS += src/crypto/aes-siv.c
841 1.1.1.6 christos NEED_AES_CTR=y
842 1.1 christos endif
843 1.1 christos ifdef NEED_AES_CTR
844 1.1 christos AESOBJS += src/crypto/aes-ctr.c
845 1.1 christos endif
846 1.1 christos ifdef NEED_AES_ENCBLOCK
847 1.1 christos AESOBJS += src/crypto/aes-encblock.c
848 1.1 christos endif
849 1.1.1.7.8.1 perseant ifneq ($(CONFIG_TLS), openssl)
850 1.1 christos AESOBJS += src/crypto/aes-omac1.c
851 1.1 christos endif
852 1.1 christos ifdef NEED_AES_UNWRAP
853 1.1.1.4 christos ifneq ($(CONFIG_TLS), openssl)
854 1.1 christos NEED_AES_DEC=y
855 1.1 christos AESOBJS += src/crypto/aes-unwrap.c
856 1.1 christos endif
857 1.1.1.4 christos endif
858 1.1 christos ifdef NEED_AES_CBC
859 1.1 christos NEED_AES_DEC=y
860 1.1.1.5 christos ifneq ($(CONFIG_TLS), openssl)
861 1.1 christos AESOBJS += src/crypto/aes-cbc.c
862 1.1 christos endif
863 1.1.1.5 christos endif
864 1.1 christos ifdef NEED_AES_DEC
865 1.1 christos ifdef CONFIG_INTERNAL_AES
866 1.1 christos AESOBJS += src/crypto/aes-internal-dec.c
867 1.1 christos endif
868 1.1 christos endif
869 1.1 christos ifdef NEED_AES
870 1.1 christos OBJS += $(AESOBJS)
871 1.1 christos endif
872 1.1 christos
873 1.1 christos SHA1OBJS =
874 1.1 christos ifdef NEED_SHA1
875 1.1.1.2 christos ifneq ($(CONFIG_TLS), openssl)
876 1.1.1.6 christos ifneq ($(CONFIG_TLS), gnutls)
877 1.1 christos SHA1OBJS += src/crypto/sha1.c
878 1.1.1.2 christos endif
879 1.1.1.6 christos endif
880 1.1.1.2 christos SHA1OBJS += src/crypto/sha1-prf.c
881 1.1 christos ifdef CONFIG_INTERNAL_SHA1
882 1.1 christos SHA1OBJS += src/crypto/sha1-internal.c
883 1.1 christos ifdef NEED_FIPS186_2_PRF
884 1.1 christos SHA1OBJS += src/crypto/fips_prf_internal.c
885 1.1 christos endif
886 1.1 christos endif
887 1.1.1.2 christos ifneq ($(CONFIG_TLS), openssl)
888 1.1 christos SHA1OBJS += src/crypto/sha1-pbkdf2.c
889 1.1.1.2 christos endif
890 1.1 christos ifdef NEED_T_PRF
891 1.1 christos SHA1OBJS += src/crypto/sha1-tprf.c
892 1.1 christos endif
893 1.1 christos ifdef NEED_TLS_PRF
894 1.1 christos SHA1OBJS += src/crypto/sha1-tlsprf.c
895 1.1 christos endif
896 1.1 christos endif
897 1.1 christos
898 1.1 christos ifdef NEED_SHA1
899 1.1 christos OBJS += $(SHA1OBJS)
900 1.1 christos endif
901 1.1 christos
902 1.1.1.4 christos ifneq ($(CONFIG_TLS), openssl)
903 1.1.1.6 christos ifneq ($(CONFIG_TLS), gnutls)
904 1.1.1.4 christos OBJS += src/crypto/md5.c
905 1.1.1.4 christos endif
906 1.1.1.6 christos endif
907 1.1.1.4 christos
908 1.1 christos ifdef NEED_MD5
909 1.1 christos ifdef CONFIG_INTERNAL_MD5
910 1.1 christos OBJS += src/crypto/md5-internal.c
911 1.1 christos HOBJS += src/crypto/md5-internal.c
912 1.1 christos endif
913 1.1 christos endif
914 1.1 christos
915 1.1 christos ifdef NEED_MD4
916 1.1 christos ifdef CONFIG_INTERNAL_MD4
917 1.1 christos OBJS += src/crypto/md4-internal.c
918 1.1 christos endif
919 1.1 christos endif
920 1.1 christos
921 1.1 christos ifdef NEED_DES
922 1.1 christos ifdef CONFIG_INTERNAL_DES
923 1.1 christos OBJS += src/crypto/des-internal.c
924 1.1 christos endif
925 1.1 christos endif
926 1.1 christos
927 1.1.1.5 christos ifdef CONFIG_NO_RC4
928 1.1.1.5 christos L_CFLAGS += -DCONFIG_NO_RC4
929 1.1.1.5 christos endif
930 1.1.1.5 christos
931 1.1 christos ifdef NEED_RC4
932 1.1 christos ifdef CONFIG_INTERNAL_RC4
933 1.1.1.5 christos ifndef CONFIG_NO_RC4
934 1.1 christos OBJS += src/crypto/rc4.c
935 1.1 christos endif
936 1.1 christos endif
937 1.1.1.5 christos endif
938 1.1 christos
939 1.1.1.2 christos L_CFLAGS += -DCONFIG_SHA256
940 1.1.1.2 christos ifneq ($(CONFIG_TLS), openssl)
941 1.1.1.6 christos ifneq ($(CONFIG_TLS), gnutls)
942 1.1 christos OBJS += src/crypto/sha256.c
943 1.1.1.2 christos endif
944 1.1.1.6 christos endif
945 1.1.1.2 christos OBJS += src/crypto/sha256-prf.c
946 1.1 christos ifdef CONFIG_INTERNAL_SHA256
947 1.1 christos OBJS += src/crypto/sha256-internal.c
948 1.1 christos endif
949 1.1.1.2 christos ifdef NEED_TLS_PRF_SHA256
950 1.1.1.3 christos OBJS += src/crypto/sha256-tlsprf.c
951 1.1.1.2 christos endif
952 1.1.1.7.8.1 perseant ifdef NEED_TLS_PRF_SHA384
953 1.1.1.7.8.1 perseant OBJS += src/crypto/sha384-tlsprf.c
954 1.1.1.7.8.1 perseant endif
955 1.1.1.6 christos ifdef NEED_HMAC_SHA256_KDF
956 1.1.1.6 christos OBJS += src/crypto/sha256-kdf.c
957 1.1.1.6 christos endif
958 1.1.1.6 christos ifdef NEED_HMAC_SHA384_KDF
959 1.1.1.6 christos OBJS += src/crypto/sha384-kdf.c
960 1.1.1.6 christos endif
961 1.1.1.6 christos ifdef NEED_HMAC_SHA512_KDF
962 1.1.1.6 christos OBJS += src/crypto/sha512-kdf.c
963 1.1.1.6 christos endif
964 1.1.1.4 christos ifdef NEED_SHA384
965 1.1.1.4 christos L_CFLAGS += -DCONFIG_SHA384
966 1.1.1.6 christos ifneq ($(CONFIG_TLS), openssl)
967 1.1.1.6 christos ifneq ($(CONFIG_TLS), gnutls)
968 1.1.1.6 christos OBJS += src/crypto/sha384.c
969 1.1.1.6 christos endif
970 1.1.1.6 christos endif
971 1.1.1.5 christos OBJS += src/crypto/sha384-prf.c
972 1.1.1.5 christos endif
973 1.1.1.6 christos ifdef NEED_SHA512
974 1.1.1.6 christos L_CFLAGS += -DCONFIG_SHA512
975 1.1.1.6 christos ifneq ($(CONFIG_TLS), openssl)
976 1.1.1.6 christos ifneq ($(CONFIG_TLS), linux)
977 1.1.1.6 christos ifneq ($(CONFIG_TLS), gnutls)
978 1.1.1.6 christos OBJS += src/crypto/sha512.c
979 1.1.1.6 christos endif
980 1.1.1.6 christos endif
981 1.1.1.6 christos endif
982 1.1.1.6 christos OBJS += src/crypto/sha512-prf.c
983 1.1.1.6 christos endif
984 1.1.1.5 christos
985 1.1.1.5 christos ifdef CONFIG_INTERNAL_SHA384
986 1.1.1.5 christos L_CFLAGS += -DCONFIG_INTERNAL_SHA384
987 1.1.1.5 christos OBJS += src/crypto/sha384-internal.c
988 1.1.1.5 christos endif
989 1.1.1.5 christos
990 1.1.1.5 christos ifdef CONFIG_INTERNAL_SHA512
991 1.1.1.5 christos L_CFLAGS += -DCONFIG_INTERNAL_SHA512
992 1.1.1.5 christos OBJS += src/crypto/sha512-internal.c
993 1.1.1.4 christos endif
994 1.1 christos
995 1.1.1.7.8.1 perseant ifdef NEED_ASN1
996 1.1.1.7.8.1 perseant OBJS += src/tls/asn1.c
997 1.1.1.7.8.1 perseant endif
998 1.1.1.7.8.1 perseant
999 1.1 christos ifdef NEED_DH_GROUPS
1000 1.1 christos OBJS += src/crypto/dh_groups.c
1001 1.1 christos endif
1002 1.1 christos ifdef NEED_DH_GROUPS_ALL
1003 1.1 christos L_CFLAGS += -DALL_DH_GROUPS
1004 1.1 christos endif
1005 1.1 christos ifdef CONFIG_INTERNAL_DH_GROUP5
1006 1.1 christos ifdef NEED_DH_GROUPS
1007 1.1 christos OBJS += src/crypto/dh_group5.c
1008 1.1 christos endif
1009 1.1 christos endif
1010 1.1 christos
1011 1.1.1.3 christos ifdef NEED_ECC
1012 1.1.1.3 christos L_CFLAGS += -DCONFIG_ECC
1013 1.1.1.3 christos endif
1014 1.1.1.3 christos
1015 1.1 christos ifdef CONFIG_NO_RANDOM_POOL
1016 1.1 christos L_CFLAGS += -DCONFIG_NO_RANDOM_POOL
1017 1.1 christos else
1018 1.1 christos OBJS += src/crypto/random.c
1019 1.1 christos HOBJS += src/crypto/random.c
1020 1.1.1.3 christos HOBJS += src/utils/eloop.c
1021 1.1 christos HOBJS += $(SHA1OBJS)
1022 1.1.1.5 christos ifneq ($(CONFIG_TLS), openssl)
1023 1.1 christos HOBJS += src/crypto/md5.c
1024 1.1 christos endif
1025 1.1.1.5 christos endif
1026 1.1 christos
1027 1.1 christos ifdef CONFIG_RADIUS_SERVER
1028 1.1 christos L_CFLAGS += -DRADIUS_SERVER
1029 1.1 christos OBJS += src/radius/radius_server.c
1030 1.1 christos endif
1031 1.1 christos
1032 1.1 christos ifdef CONFIG_IPV6
1033 1.1 christos L_CFLAGS += -DCONFIG_IPV6
1034 1.1 christos endif
1035 1.1 christos
1036 1.1 christos ifdef CONFIG_DRIVER_RADIUS_ACL
1037 1.1 christos L_CFLAGS += -DCONFIG_DRIVER_RADIUS_ACL
1038 1.1 christos endif
1039 1.1 christos
1040 1.1 christos ifdef NEED_BASE64
1041 1.1 christos OBJS += src/utils/base64.c
1042 1.1 christos endif
1043 1.1 christos
1044 1.1.1.6 christos ifdef NEED_JSON
1045 1.1.1.6 christos OBJS += src/utils/json.c
1046 1.1.1.6 christos L_CFLAGS += -DCONFIG_JSON
1047 1.1.1.6 christos endif
1048 1.1.1.6 christos
1049 1.1 christos ifdef NEED_AP_MLME
1050 1.1 christos OBJS += src/ap/wmm.c
1051 1.1 christos OBJS += src/ap/ap_list.c
1052 1.1.1.7.8.1 perseant OBJS += src/ap/comeback_token.c
1053 1.1.1.7.8.1 perseant OBJS += src/pasn/pasn_responder.c
1054 1.1.1.7.8.1 perseant OBJS += src/pasn/pasn_common.c
1055 1.1 christos OBJS += src/ap/ieee802_11.c
1056 1.1 christos OBJS += src/ap/hw_features.c
1057 1.1.1.3 christos OBJS += src/ap/dfs.c
1058 1.1 christos L_CFLAGS += -DNEED_AP_MLME
1059 1.1 christos endif
1060 1.1 christos OBJS += src/ap/ieee802_11_ht.c
1061 1.1 christos
1062 1.1.1.3 christos ifdef CONFIG_IEEE80211AC
1063 1.1.1.3 christos OBJS += src/ap/ieee802_11_vht.c
1064 1.1.1.3 christos endif
1065 1.1.1.3 christos
1066 1.1.1.6 christos ifdef CONFIG_IEEE80211AX
1067 1.1.1.6 christos OBJS += src/ap/ieee802_11_he.c
1068 1.1.1.6 christos endif
1069 1.1.1.6 christos
1070 1.1 christos ifdef CONFIG_P2P_MANAGER
1071 1.1 christos L_CFLAGS += -DCONFIG_P2P_MANAGER
1072 1.1 christos OBJS += src/ap/p2p_hostapd.c
1073 1.1 christos endif
1074 1.1 christos
1075 1.1.1.3 christos ifdef CONFIG_HS20
1076 1.1.1.3 christos L_CFLAGS += -DCONFIG_HS20
1077 1.1.1.3 christos OBJS += src/ap/hs20.c
1078 1.1.1.3 christos CONFIG_INTERWORKING=y
1079 1.1.1.3 christos endif
1080 1.1.1.3 christos
1081 1.1.1.3 christos ifdef CONFIG_INTERWORKING
1082 1.1.1.3 christos L_CFLAGS += -DCONFIG_INTERWORKING
1083 1.1.1.6 christos NEED_GAS=y
1084 1.1.1.6 christos endif
1085 1.1.1.6 christos
1086 1.1.1.6 christos ifdef NEED_GAS
1087 1.1.1.3 christos OBJS += src/common/gas.c
1088 1.1.1.3 christos OBJS += src/ap/gas_serv.c
1089 1.1.1.3 christos endif
1090 1.1.1.3 christos
1091 1.1.1.4 christos ifdef CONFIG_PROXYARP
1092 1.1.1.4 christos L_CFLAGS += -DCONFIG_PROXYARP
1093 1.1.1.4 christos OBJS += src/ap/x_snoop.c
1094 1.1.1.4 christos OBJS += src/ap/dhcp_snoop.c
1095 1.1.1.4 christos ifdef CONFIG_IPV6
1096 1.1.1.4 christos OBJS += src/ap/ndisc_snoop.c
1097 1.1.1.4 christos endif
1098 1.1.1.4 christos endif
1099 1.1.1.4 christos
1100 1.1 christos OBJS += src/drivers/driver_common.c
1101 1.1 christos
1102 1.1.1.3 christos ifdef CONFIG_ACS
1103 1.1.1.3 christos L_CFLAGS += -DCONFIG_ACS
1104 1.1.1.3 christos OBJS += src/ap/acs.c
1105 1.1.1.3 christos LIBS += -lm
1106 1.1.1.3 christos endif
1107 1.1.1.3 christos
1108 1.1 christos ifdef CONFIG_NO_STDOUT_DEBUG
1109 1.1 christos L_CFLAGS += -DCONFIG_NO_STDOUT_DEBUG
1110 1.1 christos endif
1111 1.1 christos
1112 1.1.1.6 christos ifdef CONFIG_DEBUG_SYSLOG
1113 1.1.1.6 christos L_CFLAGS += -DCONFIG_DEBUG_SYSLOG
1114 1.1.1.6 christos endif
1115 1.1.1.6 christos
1116 1.1.1.3 christos ifdef CONFIG_DEBUG_LINUX_TRACING
1117 1.1.1.3 christos L_CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING
1118 1.1.1.3 christos endif
1119 1.1.1.3 christos
1120 1.1 christos ifdef CONFIG_DEBUG_FILE
1121 1.1 christos L_CFLAGS += -DCONFIG_DEBUG_FILE
1122 1.1 christos endif
1123 1.1 christos
1124 1.1 christos ifdef CONFIG_ANDROID_LOG
1125 1.1 christos L_CFLAGS += -DCONFIG_ANDROID_LOG
1126 1.1 christos endif
1127 1.1 christos
1128 1.1.1.5 christos OBJS_c = hostapd_cli.c
1129 1.1.1.5 christos OBJS_c += src/common/wpa_ctrl.c
1130 1.1.1.5 christos OBJS_c += src/utils/os_$(CONFIG_OS).c
1131 1.1.1.5 christos OBJS_c += src/common/cli.c
1132 1.1 christos OBJS_c += src/utils/eloop.c
1133 1.1.1.5 christos OBJS_c += src/utils/common.c
1134 1.1 christos ifdef CONFIG_WPA_TRACE
1135 1.1 christos OBJS_c += src/utils/trace.c
1136 1.1 christos endif
1137 1.1 christos OBJS_c += src/utils/wpa_debug.c
1138 1.1 christos ifdef CONFIG_WPA_CLI_EDIT
1139 1.1 christos OBJS_c += src/utils/edit.c
1140 1.1 christos else
1141 1.1 christos OBJS_c += src/utils/edit_simple.c
1142 1.1 christos endif
1143 1.1 christos
1144 1.1 christos ########################
1145 1.1 christos
1146 1.1 christos include $(CLEAR_VARS)
1147 1.1 christos LOCAL_MODULE := hostapd_cli
1148 1.1 christos LOCAL_MODULE_TAGS := debug
1149 1.1.1.6 christos LOCAL_PROPRIETARY_MODULE := true
1150 1.1.1.3 christos LOCAL_SHARED_LIBRARIES := libc libcutils liblog
1151 1.1 christos LOCAL_CFLAGS := $(L_CFLAGS)
1152 1.1 christos LOCAL_SRC_FILES := $(OBJS_c)
1153 1.1 christos LOCAL_C_INCLUDES := $(INCLUDES)
1154 1.1 christos include $(BUILD_EXECUTABLE)
1155 1.1 christos
1156 1.1 christos ########################
1157 1.1 christos include $(CLEAR_VARS)
1158 1.1 christos LOCAL_MODULE := hostapd
1159 1.1 christos LOCAL_MODULE_TAGS := optional
1160 1.1.1.6 christos LOCAL_PROPRIETARY_MODULE := true
1161 1.1 christos ifdef CONFIG_DRIVER_CUSTOM
1162 1.1 christos LOCAL_STATIC_LIBRARIES := libCustomWifi
1163 1.1 christos endif
1164 1.1 christos ifneq ($(BOARD_HOSTAPD_PRIVATE_LIB),)
1165 1.1 christos LOCAL_STATIC_LIBRARIES += $(BOARD_HOSTAPD_PRIVATE_LIB)
1166 1.1 christos endif
1167 1.1.1.3 christos LOCAL_SHARED_LIBRARIES := libc libcutils liblog libcrypto libssl
1168 1.1 christos ifdef CONFIG_DRIVER_NL80211
1169 1.1.1.3 christos ifneq ($(wildcard external/libnl),)
1170 1.1.1.3 christos LOCAL_SHARED_LIBRARIES += libnl
1171 1.1.1.3 christos else
1172 1.1 christos LOCAL_STATIC_LIBRARIES += libnl_2
1173 1.1 christos endif
1174 1.1.1.3 christos endif
1175 1.1 christos LOCAL_CFLAGS := $(L_CFLAGS)
1176 1.1 christos LOCAL_SRC_FILES := $(OBJS)
1177 1.1 christos LOCAL_C_INCLUDES := $(INCLUDES)
1178 1.1.1.5 christos LOCAL_INIT_RC := hostapd.android.rc
1179 1.1 christos include $(BUILD_EXECUTABLE)
1180 1.1 christos
1181 1.1 christos endif # ifeq ($(WPA_BUILD_HOSTAPD),true)
1182