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