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 |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame^] | 159 | OBJS += src/utils/crc32.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 160 | |
| 161 | OBJS += src/common/ieee802_11_common.c |
| 162 | OBJS += src/common/wpa_common.c |
Dmitry Shmidt | 746bde5 | 2015-01-12 13:01:47 -0800 | [diff] [blame] | 163 | OBJS += src/common/hw_features_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 164 | |
| 165 | OBJS += src/eapol_auth/eapol_auth_sm.c |
| 166 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 167 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 168 | ifndef CONFIG_NO_DUMP_STATE |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 169 | # define HOSTAPD_DUMP_STATE to include support for dumping internal state |
| 170 | # through control interface commands (undefine it, if you want to save in |
| 171 | # binary size) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 172 | L_CFLAGS += -DHOSTAPD_DUMP_STATE |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 173 | OBJS += src/eapol_auth/eapol_auth_dump.c |
| 174 | endif |
| 175 | |
| 176 | ifdef CONFIG_NO_RADIUS |
| 177 | L_CFLAGS += -DCONFIG_NO_RADIUS |
| 178 | CONFIG_NO_ACCOUNTING=y |
| 179 | else |
| 180 | OBJS += src/radius/radius.c |
| 181 | OBJS += src/radius/radius_client.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 182 | OBJS += src/radius/radius_das.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 183 | endif |
| 184 | |
| 185 | ifdef CONFIG_NO_ACCOUNTING |
| 186 | L_CFLAGS += -DCONFIG_NO_ACCOUNTING |
| 187 | else |
| 188 | OBJS += src/ap/accounting.c |
| 189 | endif |
| 190 | |
| 191 | ifdef CONFIG_NO_VLAN |
| 192 | L_CFLAGS += -DCONFIG_NO_VLAN |
| 193 | else |
| 194 | OBJS += src/ap/vlan_init.c |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 195 | OBJS += src/ap/vlan_ifconfig.c |
Dmitry Shmidt | 57c2d39 | 2016-02-23 13:40:19 -0800 | [diff] [blame] | 196 | OBJS += src/ap/vlan.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 197 | ifdef CONFIG_FULL_DYNAMIC_VLAN |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 198 | # Define CONFIG_FULL_DYNAMIC_VLAN to have hostapd manipulate bridges |
| 199 | # and VLAN interfaces for the VLAN feature. |
| 200 | L_CFLAGS += -DCONFIG_FULL_DYNAMIC_VLAN |
| 201 | OBJS += src/ap/vlan_full.c |
| 202 | ifdef CONFIG_VLAN_NETLINK |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 203 | OBJS += src/ap/vlan_util.c |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 204 | else |
| 205 | OBJS += src/ap/vlan_ioctl.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 206 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 207 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 208 | endif |
| 209 | |
| 210 | ifdef CONFIG_NO_CTRL_IFACE |
| 211 | L_CFLAGS += -DCONFIG_NO_CTRL_IFACE |
| 212 | else |
Dmitry Shmidt | 31a29cc | 2016-03-09 15:58:17 -0800 | [diff] [blame] | 213 | OBJS += src/common/ctrl_iface_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 214 | OBJS += ctrl_iface.c |
| 215 | OBJS += src/ap/ctrl_iface_ap.c |
| 216 | endif |
| 217 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 218 | L_CFLAGS += -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX |
| 219 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 220 | ifdef CONFIG_RSN_PREAUTH |
| 221 | L_CFLAGS += -DCONFIG_RSN_PREAUTH |
| 222 | CONFIG_L2_PACKET=y |
| 223 | endif |
| 224 | |
Dmitry Shmidt | f21452a | 2014-02-26 10:55:25 -0800 | [diff] [blame] | 225 | ifdef CONFIG_HS20 |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 226 | CONFIG_PROXYARP=y |
| 227 | endif |
| 228 | |
| 229 | ifdef CONFIG_PROXYARP |
| 230 | CONFIG_L2_PACKET=y |
| 231 | endif |
| 232 | |
| 233 | ifdef CONFIG_SUITEB |
| 234 | L_CFLAGS += -DCONFIG_SUITEB |
Dmitry Shmidt | f21452a | 2014-02-26 10:55:25 -0800 | [diff] [blame] | 235 | endif |
| 236 | |
Dmitry Shmidt | 40b0720 | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 237 | ifdef CONFIG_SUITEB192 |
| 238 | L_CFLAGS += -DCONFIG_SUITEB192 |
| 239 | NEED_SHA384=y |
| 240 | endif |
| 241 | |
Hai Shalom | 74f70d4 | 2019-02-11 14:42:39 -0800 | [diff] [blame] | 242 | ifdef CONFIG_OCV |
| 243 | L_CFLAGS += -DCONFIG_OCV |
| 244 | OBJS += src/common/ocv.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 245 | endif |
| 246 | |
| 247 | ifdef CONFIG_IEEE80211R |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 248 | L_CFLAGS += -DCONFIG_IEEE80211R -DCONFIG_IEEE80211R_AP |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 249 | OBJS += src/ap/wpa_auth_ft.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 250 | NEED_AES_UNWRAP=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 251 | NEED_AES_SIV=y |
| 252 | NEED_ETH_P_OUI=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 253 | NEED_HMAC_SHA256_KDF=y |
| 254 | endif |
| 255 | |
| 256 | ifdef NEED_ETH_P_OUI |
| 257 | L_CFLAGS += -DCONFIG_ETH_P_OUI |
| 258 | OBJS += src/ap/eth_p_oui.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 259 | endif |
| 260 | |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 261 | ifdef CONFIG_SAE |
| 262 | L_CFLAGS += -DCONFIG_SAE |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 263 | OBJS += src/common/sae.c |
| 264 | NEED_ECC=y |
| 265 | NEED_DH_GROUPS=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 266 | NEED_DRAGONFLY=y |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 267 | endif |
| 268 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 269 | ifdef CONFIG_OWE |
| 270 | L_CFLAGS += -DCONFIG_OWE |
| 271 | NEED_ECC=y |
| 272 | NEED_HMAC_SHA256_KDF=y |
| 273 | NEED_HMAC_SHA384_KDF=y |
| 274 | NEED_HMAC_SHA512_KDF=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 275 | NEED_SHA384=y |
| 276 | NEED_SHA512=y |
| 277 | endif |
| 278 | |
Jimmy Chen | caaac07 | 2019-09-16 16:36:06 +0800 | [diff] [blame] | 279 | ifdef CONFIG_WAPI_INTERFACE |
| 280 | L_CFLAGS += -DCONFIG_WAPI_INTERFACE |
| 281 | endif |
| 282 | |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 283 | ifdef CONFIG_FILS |
| 284 | L_CFLAGS += -DCONFIG_FILS |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 285 | OBJS += src/ap/fils_hlp.c |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 286 | NEED_SHA384=y |
| 287 | NEED_AES_SIV=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 288 | ifdef CONFIG_FILS_SK_PFS |
| 289 | L_CFLAGS += -DCONFIG_FILS_SK_PFS |
| 290 | NEED_ECC=y |
| 291 | endif |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 292 | endif |
| 293 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 294 | ifdef CONFIG_WNM |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 295 | L_CFLAGS += -DCONFIG_WNM -DCONFIG_WNM_AP |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 296 | OBJS += src/ap/wnm_ap.c |
| 297 | endif |
| 298 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 299 | ifdef CONFIG_IEEE80211AC |
| 300 | L_CFLAGS += -DCONFIG_IEEE80211AC |
| 301 | endif |
| 302 | |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 303 | ifdef CONFIG_IEEE80211AX |
| 304 | L_CFLAGS += -DCONFIG_IEEE80211AX |
| 305 | endif |
| 306 | |
Dmitry Shmidt | 57c2d39 | 2016-02-23 13:40:19 -0800 | [diff] [blame] | 307 | ifdef CONFIG_MBO |
| 308 | L_CFLAGS += -DCONFIG_MBO |
| 309 | OBJS += src/ap/mbo_ap.c |
| 310 | endif |
| 311 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 312 | ifdef CONFIG_FST |
| 313 | L_CFLAGS += -DCONFIG_FST |
| 314 | OBJS += src/fst/fst.c |
| 315 | OBJS += src/fst/fst_group.c |
| 316 | OBJS += src/fst/fst_iface.c |
| 317 | OBJS += src/fst/fst_session.c |
| 318 | OBJS += src/fst/fst_ctrl_aux.c |
| 319 | ifdef CONFIG_FST_TEST |
| 320 | L_CFLAGS += -DCONFIG_FST_TEST |
| 321 | endif |
| 322 | ifndef CONFIG_NO_CTRL_IFACE |
| 323 | OBJS += src/fst/fst_ctrl_iface.c |
| 324 | endif |
| 325 | endif |
| 326 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame^] | 327 | ifdef CONFIG_WEP |
| 328 | L_CFLAGS += -DCONFIG_WEP |
| 329 | endif |
| 330 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 331 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 332 | include $(LOCAL_PATH)/src/drivers/drivers.mk |
| 333 | |
| 334 | OBJS += $(DRV_AP_OBJS) |
| 335 | L_CFLAGS += $(DRV_AP_CFLAGS) |
| 336 | LDFLAGS += $(DRV_AP_LDFLAGS) |
| 337 | LIBS += $(DRV_AP_LIBS) |
| 338 | |
| 339 | ifdef CONFIG_L2_PACKET |
| 340 | ifdef CONFIG_DNET_PCAP |
| 341 | ifdef CONFIG_L2_FREEBSD |
| 342 | LIBS += -lpcap |
| 343 | OBJS += src/l2_packet/l2_packet_freebsd.c |
| 344 | else |
| 345 | LIBS += -ldnet -lpcap |
| 346 | OBJS += src/l2_packet/l2_packet_pcap.c |
| 347 | endif |
| 348 | else |
| 349 | OBJS += src/l2_packet/l2_packet_linux.c |
| 350 | endif |
| 351 | else |
| 352 | OBJS += src/l2_packet/l2_packet_none.c |
| 353 | endif |
| 354 | |
| 355 | |
| 356 | ifdef CONFIG_EAP_MD5 |
| 357 | L_CFLAGS += -DEAP_SERVER_MD5 |
| 358 | OBJS += src/eap_server/eap_server_md5.c |
| 359 | CHAP=y |
| 360 | endif |
| 361 | |
| 362 | ifdef CONFIG_EAP_TLS |
| 363 | L_CFLAGS += -DEAP_SERVER_TLS |
| 364 | OBJS += src/eap_server/eap_server_tls.c |
| 365 | TLS_FUNCS=y |
| 366 | endif |
| 367 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 368 | ifdef CONFIG_EAP_UNAUTH_TLS |
| 369 | L_CFLAGS += -DEAP_SERVER_UNAUTH_TLS |
| 370 | ifndef CONFIG_EAP_TLS |
| 371 | OBJS += src/eap_server/eap_server_tls.c |
| 372 | TLS_FUNCS=y |
| 373 | endif |
| 374 | endif |
| 375 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 376 | ifdef CONFIG_EAP_PEAP |
| 377 | L_CFLAGS += -DEAP_SERVER_PEAP |
| 378 | OBJS += src/eap_server/eap_server_peap.c |
| 379 | OBJS += src/eap_common/eap_peap_common.c |
| 380 | TLS_FUNCS=y |
| 381 | CONFIG_EAP_MSCHAPV2=y |
| 382 | endif |
| 383 | |
| 384 | ifdef CONFIG_EAP_TTLS |
| 385 | L_CFLAGS += -DEAP_SERVER_TTLS |
| 386 | OBJS += src/eap_server/eap_server_ttls.c |
| 387 | TLS_FUNCS=y |
| 388 | CHAP=y |
| 389 | endif |
| 390 | |
| 391 | ifdef CONFIG_EAP_MSCHAPV2 |
| 392 | L_CFLAGS += -DEAP_SERVER_MSCHAPV2 |
| 393 | OBJS += src/eap_server/eap_server_mschapv2.c |
| 394 | MS_FUNCS=y |
| 395 | endif |
| 396 | |
| 397 | ifdef CONFIG_EAP_GTC |
| 398 | L_CFLAGS += -DEAP_SERVER_GTC |
| 399 | OBJS += src/eap_server/eap_server_gtc.c |
| 400 | endif |
| 401 | |
| 402 | ifdef CONFIG_EAP_SIM |
| 403 | L_CFLAGS += -DEAP_SERVER_SIM |
| 404 | OBJS += src/eap_server/eap_server_sim.c |
| 405 | CONFIG_EAP_SIM_COMMON=y |
| 406 | NEED_AES_CBC=y |
| 407 | endif |
| 408 | |
| 409 | ifdef CONFIG_EAP_AKA |
| 410 | L_CFLAGS += -DEAP_SERVER_AKA |
| 411 | OBJS += src/eap_server/eap_server_aka.c |
| 412 | CONFIG_EAP_SIM_COMMON=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 413 | NEED_AES_CBC=y |
| 414 | endif |
| 415 | |
| 416 | ifdef CONFIG_EAP_AKA_PRIME |
| 417 | L_CFLAGS += -DEAP_SERVER_AKA_PRIME |
| 418 | endif |
| 419 | |
| 420 | ifdef CONFIG_EAP_SIM_COMMON |
| 421 | OBJS += src/eap_common/eap_sim_common.c |
| 422 | # Example EAP-SIM/AKA interface for GSM/UMTS authentication. This can be |
| 423 | # replaced with another file implementating the interface specified in |
| 424 | # eap_sim_db.h. |
| 425 | OBJS += src/eap_server/eap_sim_db.c |
| 426 | NEED_FIPS186_2_PRF=y |
| 427 | endif |
| 428 | |
| 429 | ifdef CONFIG_EAP_PAX |
| 430 | L_CFLAGS += -DEAP_SERVER_PAX |
| 431 | OBJS += src/eap_server/eap_server_pax.c src/eap_common/eap_pax_common.c |
| 432 | endif |
| 433 | |
| 434 | ifdef CONFIG_EAP_PSK |
| 435 | L_CFLAGS += -DEAP_SERVER_PSK |
| 436 | OBJS += src/eap_server/eap_server_psk.c src/eap_common/eap_psk_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 437 | NEED_AES_ENCBLOCK=y |
| 438 | NEED_AES_EAX=y |
| 439 | endif |
| 440 | |
| 441 | ifdef CONFIG_EAP_SAKE |
| 442 | L_CFLAGS += -DEAP_SERVER_SAKE |
| 443 | OBJS += src/eap_server/eap_server_sake.c src/eap_common/eap_sake_common.c |
| 444 | endif |
| 445 | |
| 446 | ifdef CONFIG_EAP_GPSK |
| 447 | L_CFLAGS += -DEAP_SERVER_GPSK |
| 448 | OBJS += src/eap_server/eap_server_gpsk.c src/eap_common/eap_gpsk_common.c |
| 449 | ifdef CONFIG_EAP_GPSK_SHA256 |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 450 | L_CFLAGS += -DEAP_GPSK_SHA256 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 451 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 452 | endif |
| 453 | |
| 454 | ifdef CONFIG_EAP_PWD |
| 455 | L_CFLAGS += -DEAP_SERVER_PWD |
| 456 | OBJS += src/eap_server/eap_server_pwd.c src/eap_common/eap_pwd_common.c |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 457 | NEED_ECC=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 458 | NEED_DRAGONFLY=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 459 | endif |
| 460 | |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 461 | ifdef CONFIG_EAP_EKE |
| 462 | L_CFLAGS += -DEAP_SERVER_EKE |
| 463 | OBJS += src/eap_server/eap_server_eke.c src/eap_common/eap_eke_common.c |
| 464 | NEED_DH_GROUPS=y |
| 465 | NEED_DH_GROUPS_ALL=y |
| 466 | endif |
| 467 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 468 | ifdef CONFIG_EAP_VENDOR_TEST |
| 469 | L_CFLAGS += -DEAP_SERVER_VENDOR_TEST |
| 470 | OBJS += src/eap_server/eap_server_vendor_test.c |
| 471 | endif |
| 472 | |
| 473 | ifdef CONFIG_EAP_FAST |
| 474 | L_CFLAGS += -DEAP_SERVER_FAST |
| 475 | OBJS += src/eap_server/eap_server_fast.c |
| 476 | OBJS += src/eap_common/eap_fast_common.c |
| 477 | TLS_FUNCS=y |
| 478 | NEED_T_PRF=y |
| 479 | NEED_AES_UNWRAP=y |
| 480 | endif |
| 481 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 482 | ifdef CONFIG_EAP_TEAP |
| 483 | L_CFLAGS += -DEAP_SERVER_TEAP |
| 484 | OBJS += src/eap_server/eap_server_teap.c |
| 485 | OBJS += src/eap_common/eap_teap_common.c |
| 486 | TLS_FUNCS=y |
| 487 | NEED_T_PRF=y |
| 488 | NEED_SHA384=y |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 489 | NEED_TLS_PRF_SHA256=y |
| 490 | NEED_TLS_PRF_SHA384=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 491 | NEED_AES_UNWRAP=y |
| 492 | endif |
| 493 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 494 | ifdef CONFIG_WPS |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 495 | L_CFLAGS += -DCONFIG_WPS -DEAP_SERVER_WSC |
| 496 | OBJS += src/utils/uuid.c |
| 497 | OBJS += src/ap/wps_hostapd.c |
| 498 | OBJS += src/eap_server/eap_server_wsc.c src/eap_common/eap_wsc_common.c |
| 499 | OBJS += src/wps/wps.c |
| 500 | OBJS += src/wps/wps_common.c |
| 501 | OBJS += src/wps/wps_attr_parse.c |
| 502 | OBJS += src/wps/wps_attr_build.c |
| 503 | OBJS += src/wps/wps_attr_process.c |
| 504 | OBJS += src/wps/wps_dev_attr.c |
| 505 | OBJS += src/wps/wps_enrollee.c |
| 506 | OBJS += src/wps/wps_registrar.c |
| 507 | NEED_DH_GROUPS=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 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 |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 556 | NEED_SHA384=y |
| 557 | NEED_SHA512=y |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 558 | NEED_ECC=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 559 | NEED_JSON=y |
| 560 | NEED_GAS=y |
| 561 | NEED_BASE64=y |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame^] | 562 | NEED_ASN1=y |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 563 | ifdef CONFIG_DPP2 |
| 564 | L_CFLAGS += -DCONFIG_DPP2 |
| 565 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 566 | endif |
| 567 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 568 | ifdef CONFIG_EAP_IKEV2 |
| 569 | L_CFLAGS += -DEAP_SERVER_IKEV2 |
| 570 | OBJS += src/eap_server/eap_server_ikev2.c src/eap_server/ikev2.c |
| 571 | OBJS += src/eap_common/eap_ikev2_common.c src/eap_common/ikev2_common.c |
| 572 | NEED_DH_GROUPS=y |
| 573 | NEED_DH_GROUPS_ALL=y |
| 574 | NEED_MODEXP=y |
| 575 | NEED_CIPHER=y |
| 576 | endif |
| 577 | |
| 578 | ifdef CONFIG_EAP_TNC |
| 579 | L_CFLAGS += -DEAP_SERVER_TNC |
| 580 | OBJS += src/eap_server/eap_server_tnc.c |
| 581 | OBJS += src/eap_server/tncs.c |
| 582 | NEED_BASE64=y |
| 583 | ifndef CONFIG_DRIVER_BSD |
| 584 | LIBS += -ldl |
| 585 | endif |
| 586 | endif |
| 587 | |
| 588 | # Basic EAP functionality is needed for EAPOL |
| 589 | OBJS += eap_register.c |
| 590 | OBJS += src/eap_server/eap_server.c |
| 591 | OBJS += src/eap_common/eap_common.c |
| 592 | OBJS += src/eap_server/eap_server_methods.c |
| 593 | OBJS += src/eap_server/eap_server_identity.c |
| 594 | L_CFLAGS += -DEAP_SERVER_IDENTITY |
| 595 | |
| 596 | ifdef CONFIG_EAP |
| 597 | L_CFLAGS += -DEAP_SERVER |
| 598 | endif |
| 599 | |
| 600 | ifdef CONFIG_PKCS12 |
| 601 | L_CFLAGS += -DPKCS12_FUNCS |
| 602 | endif |
| 603 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 604 | ifdef NEED_DRAGONFLY |
| 605 | OBJS += src/common/dragonfly.c |
| 606 | endif |
| 607 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 608 | ifdef MS_FUNCS |
| 609 | OBJS += src/crypto/ms_funcs.c |
| 610 | NEED_DES=y |
| 611 | NEED_MD4=y |
| 612 | endif |
| 613 | |
| 614 | ifdef CHAP |
| 615 | OBJS += src/eap_common/chap.c |
| 616 | endif |
| 617 | |
| 618 | ifdef TLS_FUNCS |
| 619 | NEED_DES=y |
| 620 | # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, and EAP_TTLS) |
| 621 | L_CFLAGS += -DEAP_TLS_FUNCS |
| 622 | OBJS += src/eap_server/eap_server_tls_common.c |
| 623 | NEED_TLS_PRF=y |
| 624 | endif |
| 625 | |
| 626 | ifndef CONFIG_TLS |
| 627 | CONFIG_TLS=openssl |
| 628 | endif |
| 629 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 630 | ifdef CONFIG_TLSV11 |
| 631 | L_CFLAGS += -DCONFIG_TLSV11 |
| 632 | endif |
| 633 | |
| 634 | ifdef CONFIG_TLSV12 |
| 635 | L_CFLAGS += -DCONFIG_TLSV12 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 636 | endif |
| 637 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 638 | ifeq ($(CONFIG_TLS), openssl) |
| 639 | ifdef TLS_FUNCS |
| 640 | OBJS += src/crypto/tls_openssl.c |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 641 | OBJS += src/crypto/tls_openssl_ocsp.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 642 | LIBS += -lssl |
| 643 | endif |
| 644 | OBJS += src/crypto/crypto_openssl.c |
| 645 | HOBJS += src/crypto/crypto_openssl.c |
| 646 | ifdef NEED_FIPS186_2_PRF |
| 647 | OBJS += src/crypto/fips_prf_openssl.c |
| 648 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 649 | NEED_TLS_PRF_SHA256=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 650 | LIBS += -lcrypto |
| 651 | LIBS_h += -lcrypto |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 652 | ifndef CONFIG_TLS_DEFAULT_CIPHERS |
| 653 | CONFIG_TLS_DEFAULT_CIPHERS = "DEFAULT:!EXP:!LOW" |
| 654 | endif |
| 655 | L_CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\" |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 656 | endif |
| 657 | |
| 658 | ifeq ($(CONFIG_TLS), gnutls) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 659 | ifndef CONFIG_CRYPTO |
| 660 | # default to libgcrypt |
| 661 | CONFIG_CRYPTO=gnutls |
| 662 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 663 | ifdef TLS_FUNCS |
| 664 | OBJS += src/crypto/tls_gnutls.c |
| 665 | LIBS += -lgnutls -lgpg-error |
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 | OBJS += src/crypto/crypto_$(CONFIG_CRYPTO).c |
| 668 | HOBJS += src/crypto/crypto_$(CONFIG_CRYPTO).c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 669 | ifdef NEED_FIPS186_2_PRF |
Dmitry Shmidt | 9866086 | 2014-03-11 17:26:21 -0700 | [diff] [blame] | 670 | OBJS += src/crypto/fips_prf_internal.c |
| 671 | OBJS += src/crypto/sha1-internal.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 672 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 673 | ifeq ($(CONFIG_CRYPTO), gnutls) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 674 | LIBS += -lgcrypt |
| 675 | LIBS_h += -lgcrypt |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 676 | CONFIG_INTERNAL_RC4=y |
| 677 | CONFIG_INTERNAL_DH_GROUP5=y |
| 678 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 679 | ifeq ($(CONFIG_CRYPTO), nettle) |
| 680 | LIBS += -lnettle -lgmp |
| 681 | LIBS_p += -lnettle -lgmp |
| 682 | CONFIG_INTERNAL_RC4=y |
| 683 | CONFIG_INTERNAL_DH_GROUP5=y |
| 684 | endif |
| 685 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 686 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 687 | ifeq ($(CONFIG_TLS), internal) |
| 688 | ifndef CONFIG_CRYPTO |
| 689 | CONFIG_CRYPTO=internal |
| 690 | endif |
| 691 | ifdef TLS_FUNCS |
| 692 | OBJS += src/crypto/crypto_internal-rsa.c |
| 693 | OBJS += src/crypto/tls_internal.c |
| 694 | OBJS += src/tls/tlsv1_common.c |
| 695 | OBJS += src/tls/tlsv1_record.c |
| 696 | OBJS += src/tls/tlsv1_cred.c |
| 697 | OBJS += src/tls/tlsv1_server.c |
| 698 | OBJS += src/tls/tlsv1_server_write.c |
| 699 | OBJS += src/tls/tlsv1_server_read.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 700 | OBJS += src/tls/rsa.c |
| 701 | OBJS += src/tls/x509v3.c |
| 702 | OBJS += src/tls/pkcs1.c |
| 703 | OBJS += src/tls/pkcs5.c |
| 704 | OBJS += src/tls/pkcs8.c |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame^] | 705 | NEED_ASN1=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 706 | NEED_BASE64=y |
| 707 | NEED_TLS_PRF=y |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 708 | ifdef CONFIG_TLSV12 |
| 709 | NEED_TLS_PRF_SHA256=y |
| 710 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 711 | NEED_MODEXP=y |
| 712 | NEED_CIPHER=y |
| 713 | L_CFLAGS += -DCONFIG_TLS_INTERNAL |
| 714 | L_CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER |
| 715 | endif |
| 716 | ifdef NEED_CIPHER |
| 717 | NEED_DES=y |
| 718 | OBJS += src/crypto/crypto_internal-cipher.c |
| 719 | endif |
| 720 | ifdef NEED_MODEXP |
| 721 | OBJS += src/crypto/crypto_internal-modexp.c |
| 722 | OBJS += src/tls/bignum.c |
| 723 | endif |
| 724 | ifeq ($(CONFIG_CRYPTO), libtomcrypt) |
| 725 | OBJS += src/crypto/crypto_libtomcrypt.c |
| 726 | LIBS += -ltomcrypt -ltfm |
| 727 | LIBS_h += -ltomcrypt -ltfm |
| 728 | CONFIG_INTERNAL_SHA256=y |
| 729 | CONFIG_INTERNAL_RC4=y |
| 730 | CONFIG_INTERNAL_DH_GROUP5=y |
| 731 | endif |
| 732 | ifeq ($(CONFIG_CRYPTO), internal) |
| 733 | OBJS += src/crypto/crypto_internal.c |
| 734 | NEED_AES_DEC=y |
| 735 | L_CFLAGS += -DCONFIG_CRYPTO_INTERNAL |
| 736 | ifdef CONFIG_INTERNAL_LIBTOMMATH |
| 737 | L_CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH |
| 738 | ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST |
| 739 | L_CFLAGS += -DLTM_FAST |
| 740 | endif |
| 741 | else |
| 742 | LIBS += -ltommath |
| 743 | LIBS_h += -ltommath |
| 744 | endif |
| 745 | CONFIG_INTERNAL_AES=y |
| 746 | CONFIG_INTERNAL_DES=y |
| 747 | CONFIG_INTERNAL_SHA1=y |
| 748 | CONFIG_INTERNAL_MD4=y |
| 749 | CONFIG_INTERNAL_MD5=y |
| 750 | CONFIG_INTERNAL_SHA256=y |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 751 | CONFIG_INTERNAL_SHA384=y |
| 752 | CONFIG_INTERNAL_SHA512=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 753 | CONFIG_INTERNAL_RC4=y |
| 754 | CONFIG_INTERNAL_DH_GROUP5=y |
| 755 | endif |
| 756 | ifeq ($(CONFIG_CRYPTO), cryptoapi) |
| 757 | OBJS += src/crypto/crypto_cryptoapi.c |
| 758 | OBJS_p += src/crypto/crypto_cryptoapi.c |
| 759 | L_CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI |
| 760 | CONFIG_INTERNAL_SHA256=y |
| 761 | CONFIG_INTERNAL_RC4=y |
| 762 | endif |
| 763 | endif |
| 764 | |
| 765 | ifeq ($(CONFIG_TLS), none) |
| 766 | ifdef TLS_FUNCS |
| 767 | OBJS += src/crypto/tls_none.c |
| 768 | L_CFLAGS += -DEAP_TLS_NONE |
| 769 | CONFIG_INTERNAL_AES=y |
| 770 | CONFIG_INTERNAL_SHA1=y |
| 771 | CONFIG_INTERNAL_MD5=y |
| 772 | endif |
| 773 | OBJS += src/crypto/crypto_none.c |
| 774 | OBJS_p += src/crypto/crypto_none.c |
| 775 | CONFIG_INTERNAL_SHA256=y |
| 776 | CONFIG_INTERNAL_RC4=y |
| 777 | endif |
| 778 | |
| 779 | ifndef TLS_FUNCS |
| 780 | OBJS += src/crypto/tls_none.c |
| 781 | ifeq ($(CONFIG_TLS), internal) |
| 782 | CONFIG_INTERNAL_AES=y |
| 783 | CONFIG_INTERNAL_SHA1=y |
| 784 | CONFIG_INTERNAL_MD5=y |
| 785 | CONFIG_INTERNAL_RC4=y |
| 786 | endif |
| 787 | endif |
| 788 | |
| 789 | AESOBJS = # none so far |
| 790 | ifdef CONFIG_INTERNAL_AES |
| 791 | AESOBJS += src/crypto/aes-internal.c src/crypto/aes-internal-enc.c |
| 792 | endif |
| 793 | |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 794 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 795 | AESOBJS += src/crypto/aes-wrap.c |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 796 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 797 | ifdef NEED_AES_EAX |
| 798 | AESOBJS += src/crypto/aes-eax.c |
| 799 | NEED_AES_CTR=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 800 | endif |
| 801 | ifdef NEED_AES_SIV |
| 802 | AESOBJS += src/crypto/aes-siv.c |
| 803 | NEED_AES_CTR=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 804 | endif |
| 805 | ifdef NEED_AES_CTR |
| 806 | AESOBJS += src/crypto/aes-ctr.c |
| 807 | endif |
| 808 | ifdef NEED_AES_ENCBLOCK |
| 809 | AESOBJS += src/crypto/aes-encblock.c |
| 810 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 811 | AESOBJS += src/crypto/aes-omac1.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 812 | ifdef NEED_AES_UNWRAP |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 813 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 814 | NEED_AES_DEC=y |
| 815 | AESOBJS += src/crypto/aes-unwrap.c |
| 816 | endif |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 817 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 818 | ifdef NEED_AES_CBC |
| 819 | NEED_AES_DEC=y |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 820 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 821 | AESOBJS += src/crypto/aes-cbc.c |
| 822 | endif |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 823 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 824 | ifdef NEED_AES_DEC |
| 825 | ifdef CONFIG_INTERNAL_AES |
| 826 | AESOBJS += src/crypto/aes-internal-dec.c |
| 827 | endif |
| 828 | endif |
| 829 | ifdef NEED_AES |
| 830 | OBJS += $(AESOBJS) |
| 831 | endif |
| 832 | |
| 833 | SHA1OBJS = |
| 834 | ifdef NEED_SHA1 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 835 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 836 | ifneq ($(CONFIG_TLS), gnutls) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 837 | SHA1OBJS += src/crypto/sha1.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 838 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 839 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 840 | SHA1OBJS += src/crypto/sha1-prf.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 841 | ifdef CONFIG_INTERNAL_SHA1 |
| 842 | SHA1OBJS += src/crypto/sha1-internal.c |
| 843 | ifdef NEED_FIPS186_2_PRF |
| 844 | SHA1OBJS += src/crypto/fips_prf_internal.c |
| 845 | endif |
| 846 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 847 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 848 | SHA1OBJS += src/crypto/sha1-pbkdf2.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 849 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 850 | ifdef NEED_T_PRF |
| 851 | SHA1OBJS += src/crypto/sha1-tprf.c |
| 852 | endif |
| 853 | ifdef NEED_TLS_PRF |
| 854 | SHA1OBJS += src/crypto/sha1-tlsprf.c |
| 855 | endif |
| 856 | endif |
| 857 | |
| 858 | ifdef NEED_SHA1 |
| 859 | OBJS += $(SHA1OBJS) |
| 860 | endif |
| 861 | |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 862 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 863 | ifneq ($(CONFIG_TLS), gnutls) |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 864 | OBJS += src/crypto/md5.c |
| 865 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 866 | endif |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 867 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 868 | ifdef NEED_MD5 |
| 869 | ifdef CONFIG_INTERNAL_MD5 |
| 870 | OBJS += src/crypto/md5-internal.c |
| 871 | HOBJS += src/crypto/md5-internal.c |
| 872 | endif |
| 873 | endif |
| 874 | |
| 875 | ifdef NEED_MD4 |
| 876 | ifdef CONFIG_INTERNAL_MD4 |
| 877 | OBJS += src/crypto/md4-internal.c |
| 878 | endif |
| 879 | endif |
| 880 | |
| 881 | ifdef NEED_DES |
| 882 | ifdef CONFIG_INTERNAL_DES |
| 883 | OBJS += src/crypto/des-internal.c |
| 884 | endif |
| 885 | endif |
| 886 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 887 | ifdef CONFIG_NO_RC4 |
| 888 | L_CFLAGS += -DCONFIG_NO_RC4 |
| 889 | endif |
| 890 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 891 | ifdef NEED_RC4 |
| 892 | ifdef CONFIG_INTERNAL_RC4 |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 893 | ifndef CONFIG_NO_RC4 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 894 | OBJS += src/crypto/rc4.c |
| 895 | endif |
| 896 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 897 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 898 | |
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 |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 912 | ifdef NEED_TLS_PRF_SHA384 |
| 913 | OBJS += src/crypto/sha384-tlsprf.c |
| 914 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 915 | ifdef NEED_HMAC_SHA256_KDF |
| 916 | OBJS += src/crypto/sha256-kdf.c |
| 917 | endif |
| 918 | ifdef NEED_HMAC_SHA384_KDF |
| 919 | OBJS += src/crypto/sha384-kdf.c |
| 920 | endif |
| 921 | ifdef NEED_HMAC_SHA512_KDF |
| 922 | OBJS += src/crypto/sha512-kdf.c |
| 923 | endif |
Dmitry Shmidt | 40b0720 | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 924 | ifdef NEED_SHA384 |
| 925 | L_CFLAGS += -DCONFIG_SHA384 |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 926 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 927 | ifneq ($(CONFIG_TLS), gnutls) |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 928 | OBJS += src/crypto/sha384.c |
| 929 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 930 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 931 | OBJS += src/crypto/sha384-prf.c |
Dmitry Shmidt | 40b0720 | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 932 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 933 | ifdef NEED_SHA512 |
| 934 | L_CFLAGS += -DCONFIG_SHA512 |
| 935 | ifneq ($(CONFIG_TLS), openssl) |
| 936 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 937 | ifneq ($(CONFIG_TLS), gnutls) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 938 | OBJS += src/crypto/sha512.c |
| 939 | endif |
| 940 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 941 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 942 | OBJS += src/crypto/sha512-prf.c |
| 943 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 944 | |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 945 | ifdef CONFIG_INTERNAL_SHA384 |
| 946 | L_CFLAGS += -DCONFIG_INTERNAL_SHA384 |
| 947 | OBJS += src/crypto/sha384-internal.c |
| 948 | endif |
| 949 | |
| 950 | ifdef CONFIG_INTERNAL_SHA512 |
| 951 | L_CFLAGS += -DCONFIG_INTERNAL_SHA512 |
| 952 | OBJS += src/crypto/sha512-internal.c |
| 953 | endif |
| 954 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame^] | 955 | ifdef NEED_ASN1 |
| 956 | OBJS += src/tls/asn1.c |
| 957 | endif |
| 958 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 959 | ifdef NEED_DH_GROUPS |
| 960 | OBJS += src/crypto/dh_groups.c |
| 961 | endif |
| 962 | ifdef NEED_DH_GROUPS_ALL |
| 963 | L_CFLAGS += -DALL_DH_GROUPS |
| 964 | endif |
| 965 | ifdef CONFIG_INTERNAL_DH_GROUP5 |
| 966 | ifdef NEED_DH_GROUPS |
| 967 | OBJS += src/crypto/dh_group5.c |
| 968 | endif |
| 969 | endif |
| 970 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 971 | ifdef NEED_ECC |
| 972 | L_CFLAGS += -DCONFIG_ECC |
| 973 | endif |
| 974 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 975 | ifdef CONFIG_NO_RANDOM_POOL |
| 976 | L_CFLAGS += -DCONFIG_NO_RANDOM_POOL |
| 977 | else |
| 978 | OBJS += src/crypto/random.c |
| 979 | HOBJS += src/crypto/random.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 980 | HOBJS += src/utils/eloop.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 981 | HOBJS += $(SHA1OBJS) |
Dmitry Shmidt | dda10c2 | 2015-03-24 16:05:01 -0700 | [diff] [blame] | 982 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 983 | HOBJS += src/crypto/md5.c |
| 984 | endif |
Dmitry Shmidt | dda10c2 | 2015-03-24 16:05:01 -0700 | [diff] [blame] | 985 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 986 | |
| 987 | ifdef CONFIG_RADIUS_SERVER |
| 988 | L_CFLAGS += -DRADIUS_SERVER |
| 989 | OBJS += src/radius/radius_server.c |
| 990 | endif |
| 991 | |
| 992 | ifdef CONFIG_IPV6 |
| 993 | L_CFLAGS += -DCONFIG_IPV6 |
| 994 | endif |
| 995 | |
| 996 | ifdef CONFIG_DRIVER_RADIUS_ACL |
| 997 | L_CFLAGS += -DCONFIG_DRIVER_RADIUS_ACL |
| 998 | endif |
| 999 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1000 | ifdef NEED_BASE64 |
| 1001 | OBJS += src/utils/base64.c |
| 1002 | endif |
| 1003 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1004 | ifdef NEED_JSON |
| 1005 | OBJS += src/utils/json.c |
| 1006 | L_CFLAGS += -DCONFIG_JSON |
| 1007 | endif |
| 1008 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1009 | ifdef NEED_AP_MLME |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1010 | OBJS += src/ap/wmm.c |
| 1011 | OBJS += src/ap/ap_list.c |
| 1012 | OBJS += src/ap/ieee802_11.c |
| 1013 | OBJS += src/ap/hw_features.c |
Dmitry Shmidt | 051af73 | 2013-10-22 13:52:46 -0700 | [diff] [blame] | 1014 | OBJS += src/ap/dfs.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1015 | L_CFLAGS += -DNEED_AP_MLME |
| 1016 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1017 | OBJS += src/ap/ieee802_11_ht.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1018 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1019 | ifdef CONFIG_IEEE80211AC |
| 1020 | OBJS += src/ap/ieee802_11_vht.c |
| 1021 | endif |
| 1022 | |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1023 | ifdef CONFIG_IEEE80211AX |
| 1024 | OBJS += src/ap/ieee802_11_he.c |
| 1025 | endif |
| 1026 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1027 | ifdef CONFIG_P2P_MANAGER |
| 1028 | L_CFLAGS += -DCONFIG_P2P_MANAGER |
| 1029 | OBJS += src/ap/p2p_hostapd.c |
| 1030 | endif |
| 1031 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1032 | ifdef CONFIG_HS20 |
| 1033 | L_CFLAGS += -DCONFIG_HS20 |
| 1034 | OBJS += src/ap/hs20.c |
| 1035 | CONFIG_INTERWORKING=y |
| 1036 | endif |
| 1037 | |
| 1038 | ifdef CONFIG_INTERWORKING |
| 1039 | L_CFLAGS += -DCONFIG_INTERWORKING |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1040 | NEED_GAS=y |
| 1041 | endif |
| 1042 | |
| 1043 | ifdef NEED_GAS |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1044 | OBJS += src/common/gas.c |
| 1045 | OBJS += src/ap/gas_serv.c |
| 1046 | endif |
| 1047 | |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1048 | ifdef CONFIG_PROXYARP |
| 1049 | L_CFLAGS += -DCONFIG_PROXYARP |
| 1050 | OBJS += src/ap/x_snoop.c |
| 1051 | OBJS += src/ap/dhcp_snoop.c |
| 1052 | ifdef CONFIG_IPV6 |
| 1053 | OBJS += src/ap/ndisc_snoop.c |
| 1054 | endif |
| 1055 | endif |
| 1056 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1057 | OBJS += src/drivers/driver_common.c |
| 1058 | |
Dmitry Shmidt | 5460547 | 2013-11-08 11:10:19 -0800 | [diff] [blame] | 1059 | ifdef CONFIG_ACS |
| 1060 | L_CFLAGS += -DCONFIG_ACS |
| 1061 | OBJS += src/ap/acs.c |
| 1062 | LIBS += -lm |
| 1063 | endif |
| 1064 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1065 | ifdef CONFIG_NO_STDOUT_DEBUG |
| 1066 | L_CFLAGS += -DCONFIG_NO_STDOUT_DEBUG |
| 1067 | endif |
| 1068 | |
Paul Stewart | 092955c | 2017-02-06 09:13:09 -0800 | [diff] [blame] | 1069 | ifdef CONFIG_DEBUG_SYSLOG |
| 1070 | L_CFLAGS += -DCONFIG_DEBUG_SYSLOG |
| 1071 | endif |
| 1072 | |
Dmitry Shmidt | 5460547 | 2013-11-08 11:10:19 -0800 | [diff] [blame] | 1073 | ifdef CONFIG_DEBUG_LINUX_TRACING |
| 1074 | L_CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING |
| 1075 | endif |
| 1076 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1077 | ifdef CONFIG_DEBUG_FILE |
| 1078 | L_CFLAGS += -DCONFIG_DEBUG_FILE |
| 1079 | endif |
| 1080 | |
| 1081 | ifdef CONFIG_ANDROID_LOG |
| 1082 | L_CFLAGS += -DCONFIG_ANDROID_LOG |
| 1083 | endif |
| 1084 | |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1085 | OBJS_c = hostapd_cli.c |
| 1086 | OBJS_c += src/common/wpa_ctrl.c |
| 1087 | OBJS_c += src/utils/os_$(CONFIG_OS).c |
| 1088 | OBJS_c += src/common/cli.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1089 | OBJS_c += src/utils/eloop.c |
Dmitry Shmidt | a3dc309 | 2015-06-23 11:21:28 -0700 | [diff] [blame] | 1090 | OBJS_c += src/utils/common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1091 | ifdef CONFIG_WPA_TRACE |
| 1092 | OBJS_c += src/utils/trace.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1093 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1094 | OBJS_c += src/utils/wpa_debug.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1095 | ifdef CONFIG_WPA_CLI_EDIT |
| 1096 | OBJS_c += src/utils/edit.c |
| 1097 | else |
| 1098 | OBJS_c += src/utils/edit_simple.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1099 | endif |
| 1100 | |
Bjoern Johansson | 05c7f27 | 2018-05-15 14:58:52 -0700 | [diff] [blame] | 1101 | ifeq ($(filter gce_x86 gce_x86_64 calypso, $(TARGET_DEVICE)),) |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1102 | ifdef CONFIG_CTRL_IFACE_HIDL |
| 1103 | HOSTAPD_USE_HIDL=y |
| 1104 | L_CFLAGS += -DCONFIG_CTRL_IFACE_HIDL |
| 1105 | L_CPPFLAGS = -Wall -Werror |
| 1106 | endif |
Roshan Pius | 35ecec4 | 2018-01-16 17:49:00 -0800 | [diff] [blame] | 1107 | endif |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1108 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1109 | ######################## |
| 1110 | |
| 1111 | include $(CLEAR_VARS) |
| 1112 | LOCAL_MODULE := hostapd_cli |
Po-Chien Hsueh | 2051e4b | 2017-02-10 11:34:58 +0800 | [diff] [blame] | 1113 | LOCAL_PROPRIETARY_MODULE := true |
Ying Wang | e93dd11 | 2013-04-09 21:53:29 -0700 | [diff] [blame] | 1114 | LOCAL_SHARED_LIBRARIES := libc libcutils liblog |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1115 | LOCAL_CFLAGS := $(L_CFLAGS) |
| 1116 | LOCAL_SRC_FILES := $(OBJS_c) |
| 1117 | LOCAL_C_INCLUDES := $(INCLUDES) |
| 1118 | include $(BUILD_EXECUTABLE) |
| 1119 | |
| 1120 | ######################## |
| 1121 | include $(CLEAR_VARS) |
| 1122 | LOCAL_MODULE := hostapd |
| 1123 | LOCAL_MODULE_TAGS := optional |
Po-Chien Hsueh | 2051e4b | 2017-02-10 11:34:58 +0800 | [diff] [blame] | 1124 | LOCAL_PROPRIETARY_MODULE := true |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1125 | LOCAL_MODULE_RELATIVE_PATH := hw |
Ahmed ElArabawy | 1832fd3 | 2019-12-05 20:12:54 -0800 | [diff] [blame] | 1126 | LOCAL_VINTF_FRAGMENTS := android.hardware.wifi.hostapd.xml |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1127 | ifdef CONFIG_DRIVER_CUSTOM |
| 1128 | LOCAL_STATIC_LIBRARIES := libCustomWifi |
| 1129 | endif |
| 1130 | ifneq ($(BOARD_HOSTAPD_PRIVATE_LIB),) |
| 1131 | LOCAL_STATIC_LIBRARIES += $(BOARD_HOSTAPD_PRIVATE_LIB) |
| 1132 | endif |
Ying Wang | e93dd11 | 2013-04-09 21:53:29 -0700 | [diff] [blame] | 1133 | LOCAL_SHARED_LIBRARIES := libc libcutils liblog libcrypto libssl |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1134 | ifdef CONFIG_DRIVER_NL80211 |
Dmitry Shmidt | cd44645 | 2014-02-18 16:03:35 -0800 | [diff] [blame] | 1135 | ifneq ($(wildcard external/libnl),) |
Dmitry Shmidt | d620e6d | 2014-02-18 11:07:59 -0800 | [diff] [blame] | 1136 | LOCAL_SHARED_LIBRARIES += libnl |
Dmitry Shmidt | cd44645 | 2014-02-18 16:03:35 -0800 | [diff] [blame] | 1137 | else |
| 1138 | LOCAL_STATIC_LIBRARIES += libnl_2 |
| 1139 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1140 | endif |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1141 | ifeq ($(HOSTAPD_USE_HIDL), y) |
| 1142 | LOCAL_SHARED_LIBRARIES += android.hardware.wifi.hostapd@1.0 |
Roshan Pius | e2d2101 | 2018-08-17 11:22:06 -0700 | [diff] [blame] | 1143 | LOCAL_SHARED_LIBRARIES += android.hardware.wifi.hostapd@1.1 |
lesl | 1a842e6 | 2019-12-02 19:00:37 +0800 | [diff] [blame] | 1144 | LOCAL_SHARED_LIBRARIES += android.hardware.wifi.hostapd@1.2 |
Steven Moreland | 423bc96 | 2019-10-04 10:29:53 -0700 | [diff] [blame] | 1145 | LOCAL_SHARED_LIBRARIES += libbase libhidlbase libutils |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1146 | LOCAL_STATIC_LIBRARIES += libhostapd_hidl |
| 1147 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1148 | LOCAL_CFLAGS := $(L_CFLAGS) |
| 1149 | LOCAL_SRC_FILES := $(OBJS) |
| 1150 | LOCAL_C_INCLUDES := $(INCLUDES) |
Christopher Wiley | 5ec9510 | 2016-07-13 10:34:47 -0700 | [diff] [blame] | 1151 | LOCAL_INIT_RC := hostapd.android.rc |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1152 | include $(BUILD_EXECUTABLE) |
| 1153 | |
Bjoern Johansson | 05c7f27 | 2018-05-15 14:58:52 -0700 | [diff] [blame] | 1154 | ######################## |
| 1155 | include $(CLEAR_VARS) |
| 1156 | LOCAL_MODULE := hostapd_nohidl |
| 1157 | LOCAL_MODULE_TAGS := optional |
| 1158 | LOCAL_PROPRIETARY_MODULE := true |
| 1159 | ifdef CONFIG_DRIVER_CUSTOM |
| 1160 | LOCAL_STATIC_LIBRARIES := libCustomWifi |
| 1161 | endif |
| 1162 | ifneq ($(BOARD_HOSTAPD_PRIVATE_LIB),) |
| 1163 | LOCAL_STATIC_LIBRARIES += $(BOARD_HOSTAPD_PRIVATE_LIB) |
| 1164 | endif |
| 1165 | LOCAL_SHARED_LIBRARIES := libc libcutils liblog libcrypto libssl |
| 1166 | ifdef CONFIG_DRIVER_NL80211 |
| 1167 | ifneq ($(wildcard external/libnl),) |
| 1168 | LOCAL_SHARED_LIBRARIES += libnl |
| 1169 | else |
| 1170 | LOCAL_STATIC_LIBRARIES += libnl_2 |
| 1171 | endif |
| 1172 | endif |
| 1173 | LOCAL_CFLAGS := $(patsubst -DCONFIG_CTRL_IFACE_HIDL,,$(L_CFLAGS)) |
| 1174 | LOCAL_SRC_FILES := $(OBJS) |
| 1175 | LOCAL_C_INCLUDES := $(INCLUDES) |
| 1176 | include $(BUILD_EXECUTABLE) |
| 1177 | |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1178 | ifeq ($(HOSTAPD_USE_HIDL), y) |
| 1179 | ### Hidl service library ### |
| 1180 | ######################## |
| 1181 | include $(CLEAR_VARS) |
| 1182 | LOCAL_MODULE := libhostapd_hidl |
| 1183 | LOCAL_VENDOR_MODULE := true |
| 1184 | LOCAL_CPPFLAGS := $(L_CPPFLAGS) |
| 1185 | LOCAL_CFLAGS := $(L_CFLAGS) |
| 1186 | LOCAL_C_INCLUDES := $(INCLUDES) |
lesl | 1a842e6 | 2019-12-02 19:00:37 +0800 | [diff] [blame] | 1187 | HIDL_INTERFACE_VERSION = 1.2 |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1188 | LOCAL_SRC_FILES := \ |
| 1189 | hidl/$(HIDL_INTERFACE_VERSION)/hidl.cpp \ |
| 1190 | hidl/$(HIDL_INTERFACE_VERSION)/hostapd.cpp |
| 1191 | LOCAL_SHARED_LIBRARIES := \ |
| 1192 | android.hardware.wifi.hostapd@1.0 \ |
Roshan Pius | e2d2101 | 2018-08-17 11:22:06 -0700 | [diff] [blame] | 1193 | android.hardware.wifi.hostapd@1.1 \ |
lesl | 1a842e6 | 2019-12-02 19:00:37 +0800 | [diff] [blame] | 1194 | android.hardware.wifi.hostapd@1.2 \ |
Roshan Pius | 30b452e | 2017-12-27 13:36:21 -0800 | [diff] [blame] | 1195 | libbase \ |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1196 | libhidlbase \ |
Roshan Pius | cc81756 | 2017-12-22 14:45:05 -0800 | [diff] [blame] | 1197 | libutils \ |
| 1198 | liblog |
| 1199 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ |
| 1200 | $(LOCAL_PATH)/hidl/$(HIDL_INTERFACE_VERSION) |
| 1201 | include $(BUILD_STATIC_LIBRARY) |
| 1202 | endif # HOSTAPD_USE_HIDL == y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1203 | endif # ifeq ($(WPA_BUILD_HOSTAPD),true) |