Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1 | ifndef CC |
| 2 | CC=gcc |
| 3 | endif |
| 4 | |
| 5 | ifndef CFLAGS |
| 6 | CFLAGS = -MMD -O2 -Wall -g |
| 7 | endif |
| 8 | |
Dmitry Shmidt | 014a3ff | 2015-12-28 13:27:49 -0800 | [diff] [blame] | 9 | ifdef LIBS |
| 10 | # If LIBS is set with some global build system defaults, clone those for |
| 11 | # LIBS_c, LIBS_h, and LIBS_n to cover hostapd_cli, hlr_auc_gw, and |
| 12 | # nt_password_hash as well. |
| 13 | ifndef LIBS_c |
| 14 | LIBS_c := $(LIBS) |
| 15 | endif |
| 16 | ifndef LIBS_h |
| 17 | LIBS_h := $(LIBS) |
| 18 | endif |
| 19 | ifndef LIBS_n |
| 20 | LIBS_n := $(LIBS) |
| 21 | endif |
| 22 | endif |
| 23 | |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 24 | CFLAGS += $(EXTRA_CFLAGS) |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 25 | CFLAGS += -I$(abspath ../src) |
| 26 | CFLAGS += -I$(abspath ../src/utils) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 27 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 28 | export BINDIR ?= /usr/local/bin/ |
| 29 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 30 | -include .config |
| 31 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 32 | ifndef CONFIG_NO_GITVER |
| 33 | # Add VERSION_STR postfix for builds from a git repository |
| 34 | ifeq ($(wildcard ../.git),../.git) |
| 35 | GITVER := $(shell git describe --dirty=+) |
| 36 | ifneq ($(GITVER),) |
| 37 | CFLAGS += -DGIT_VERSION_STR_POSTFIX=\"-$(GITVER)\" |
| 38 | endif |
| 39 | endif |
| 40 | endif |
| 41 | |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 42 | ifdef CONFIG_TESTING_OPTIONS |
| 43 | CFLAGS += -DCONFIG_TESTING_OPTIONS |
| 44 | CONFIG_WPS_TESTING=y |
| 45 | endif |
| 46 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 47 | ifndef CONFIG_OS |
| 48 | ifdef CONFIG_NATIVE_WINDOWS |
| 49 | CONFIG_OS=win32 |
| 50 | else |
| 51 | CONFIG_OS=unix |
| 52 | endif |
| 53 | endif |
| 54 | |
| 55 | ifeq ($(CONFIG_OS), internal) |
| 56 | CFLAGS += -DOS_NO_C_LIB_DEFINES |
| 57 | endif |
| 58 | |
| 59 | ifdef CONFIG_NATIVE_WINDOWS |
| 60 | CFLAGS += -DCONFIG_NATIVE_WINDOWS |
| 61 | LIBS += -lws2_32 |
| 62 | endif |
| 63 | |
| 64 | OBJS += main.o |
| 65 | OBJS += config_file.o |
| 66 | |
| 67 | OBJS += ../src/ap/hostapd.o |
| 68 | OBJS += ../src/ap/wpa_auth_glue.o |
| 69 | OBJS += ../src/ap/drv_callbacks.o |
| 70 | OBJS += ../src/ap/ap_drv_ops.o |
| 71 | OBJS += ../src/ap/utils.o |
| 72 | OBJS += ../src/ap/authsrv.o |
| 73 | OBJS += ../src/ap/ieee802_1x.o |
| 74 | OBJS += ../src/ap/ap_config.o |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 75 | OBJS += ../src/ap/eap_user_db.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 76 | OBJS += ../src/ap/ieee802_11_auth.o |
| 77 | OBJS += ../src/ap/sta_info.o |
| 78 | OBJS += ../src/ap/wpa_auth.o |
| 79 | OBJS += ../src/ap/tkip_countermeasures.o |
| 80 | OBJS += ../src/ap/ap_mlme.o |
| 81 | OBJS += ../src/ap/wpa_auth_ie.o |
| 82 | OBJS += ../src/ap/preauth_auth.o |
| 83 | OBJS += ../src/ap/pmksa_cache_auth.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 84 | OBJS += ../src/ap/ieee802_11_shared.o |
| 85 | OBJS += ../src/ap/beacon.o |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 86 | OBJS += ../src/ap/bss_load.o |
Dmitry Shmidt | 849734c | 2016-05-27 09:59:01 -0700 | [diff] [blame] | 87 | OBJS += ../src/ap/neighbor_db.o |
| 88 | OBJS += ../src/ap/rrm.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 89 | |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 90 | OBJS_c = hostapd_cli.o |
| 91 | OBJS_c += ../src/common/wpa_ctrl.o |
| 92 | OBJS_c += ../src/utils/os_$(CONFIG_OS).o |
| 93 | OBJS_c += ../src/common/cli.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 94 | |
| 95 | NEED_RC4=y |
| 96 | NEED_AES=y |
| 97 | NEED_MD5=y |
| 98 | NEED_SHA1=y |
| 99 | |
| 100 | OBJS += ../src/drivers/drivers.o |
| 101 | CFLAGS += -DHOSTAPD |
| 102 | |
Dmitry Shmidt | aca489e | 2016-09-28 15:44:14 -0700 | [diff] [blame] | 103 | ifdef CONFIG_TAXONOMY |
| 104 | CFLAGS += -DCONFIG_TAXONOMY |
| 105 | OBJS += ../src/ap/taxonomy.o |
| 106 | endif |
| 107 | |
Dmitry Shmidt | 7f93d6f | 2014-02-21 11:22:49 -0800 | [diff] [blame] | 108 | ifdef CONFIG_MODULE_TESTS |
| 109 | CFLAGS += -DCONFIG_MODULE_TESTS |
| 110 | OBJS += hapd_module_tests.o |
| 111 | endif |
| 112 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 113 | ifdef CONFIG_WPA_TRACE |
| 114 | CFLAGS += -DWPA_TRACE |
| 115 | OBJS += ../src/utils/trace.o |
| 116 | HOBJS += ../src/utils/trace.o |
| 117 | LDFLAGS += -rdynamic |
| 118 | CFLAGS += -funwind-tables |
| 119 | ifdef CONFIG_WPA_TRACE_BFD |
Dmitry Shmidt | ec58b16 | 2014-02-19 12:44:18 -0800 | [diff] [blame] | 120 | CFLAGS += -DPACKAGE="hostapd" -DWPA_TRACE_BFD |
Dmitry Shmidt | 13ca8d8 | 2014-02-20 10:18:40 -0800 | [diff] [blame] | 121 | LIBS += -lbfd -ldl -liberty -lz |
| 122 | LIBS_c += -lbfd -ldl -liberty -lz |
| 123 | LIBS_h += -lbfd -ldl -liberty -lz |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 124 | LIBS_n += -lbfd -ldl -liberty -lz |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 125 | endif |
| 126 | endif |
| 127 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 128 | ifndef CONFIG_ELOOP |
| 129 | CONFIG_ELOOP=eloop |
| 130 | endif |
| 131 | OBJS += ../src/utils/$(CONFIG_ELOOP).o |
| 132 | OBJS_c += ../src/utils/$(CONFIG_ELOOP).o |
Dmitry Shmidt | fa3fc4a | 2013-11-21 13:34:38 -0800 | [diff] [blame] | 133 | |
| 134 | ifeq ($(CONFIG_ELOOP), eloop) |
| 135 | # Using glibc < 2.17 requires -lrt for clock_gettime() |
| 136 | LIBS += -lrt |
| 137 | LIBS_c += -lrt |
| 138 | LIBS_h += -lrt |
Dmitry Shmidt | bd14a57 | 2014-02-18 10:33:49 -0800 | [diff] [blame] | 139 | LIBS_n += -lrt |
Dmitry Shmidt | fa3fc4a | 2013-11-21 13:34:38 -0800 | [diff] [blame] | 140 | endif |
| 141 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 142 | ifdef CONFIG_ELOOP_POLL |
| 143 | CFLAGS += -DCONFIG_ELOOP_POLL |
| 144 | endif |
| 145 | |
| 146 | ifdef CONFIG_ELOOP_EPOLL |
| 147 | CFLAGS += -DCONFIG_ELOOP_EPOLL |
| 148 | endif |
| 149 | |
Dmitry Shmidt | b97e428 | 2016-02-08 10:16:07 -0800 | [diff] [blame] | 150 | ifdef CONFIG_ELOOP_KQUEUE |
| 151 | CFLAGS += -DCONFIG_ELOOP_KQUEUE |
| 152 | endif |
| 153 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 154 | OBJS += ../src/utils/common.o |
Dmitry Shmidt | a3dc309 | 2015-06-23 11:21:28 -0700 | [diff] [blame] | 155 | OBJS_c += ../src/utils/common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 156 | OBJS += ../src/utils/wpa_debug.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 157 | OBJS_c += ../src/utils/wpa_debug.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 158 | OBJS += ../src/utils/wpabuf.o |
| 159 | OBJS += ../src/utils/os_$(CONFIG_OS).o |
| 160 | OBJS += ../src/utils/ip_addr.o |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 161 | OBJS += ../src/utils/crc32.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 162 | |
| 163 | OBJS += ../src/common/ieee802_11_common.o |
| 164 | OBJS += ../src/common/wpa_common.o |
Dmitry Shmidt | ff787d5 | 2015-01-12 13:01:47 -0800 | [diff] [blame] | 165 | OBJS += ../src/common/hw_features_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 166 | |
| 167 | OBJS += ../src/eapol_auth/eapol_auth_sm.o |
| 168 | |
| 169 | |
Dmitry Shmidt | 01904cf | 2013-12-05 11:08:35 -0800 | [diff] [blame] | 170 | ifdef CONFIG_CODE_COVERAGE |
| 171 | CFLAGS += -O0 -fprofile-arcs -ftest-coverage |
| 172 | LIBS += -lgcov |
| 173 | LIBS_c += -lgcov |
| 174 | LIBS_h += -lgcov |
| 175 | LIBS_n += -lgcov |
| 176 | endif |
| 177 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 178 | ifndef CONFIG_NO_DUMP_STATE |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 179 | # define HOSTAPD_DUMP_STATE to include support for dumping internal state |
| 180 | # through control interface commands (undefine it, if you want to save in |
| 181 | # binary size) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 182 | CFLAGS += -DHOSTAPD_DUMP_STATE |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 183 | OBJS += ../src/eapol_auth/eapol_auth_dump.o |
| 184 | endif |
| 185 | |
| 186 | ifdef CONFIG_NO_RADIUS |
| 187 | CFLAGS += -DCONFIG_NO_RADIUS |
| 188 | CONFIG_NO_ACCOUNTING=y |
| 189 | else |
| 190 | OBJS += ../src/radius/radius.o |
| 191 | OBJS += ../src/radius/radius_client.o |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 192 | OBJS += ../src/radius/radius_das.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 193 | endif |
| 194 | |
| 195 | ifdef CONFIG_NO_ACCOUNTING |
| 196 | CFLAGS += -DCONFIG_NO_ACCOUNTING |
| 197 | else |
| 198 | OBJS += ../src/ap/accounting.o |
| 199 | endif |
| 200 | |
| 201 | ifdef CONFIG_NO_VLAN |
| 202 | CFLAGS += -DCONFIG_NO_VLAN |
| 203 | else |
| 204 | OBJS += ../src/ap/vlan_init.o |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 205 | OBJS += ../src/ap/vlan_ifconfig.o |
Dmitry Shmidt | 57c2d39 | 2016-02-23 13:40:19 -0800 | [diff] [blame] | 206 | OBJS += ../src/ap/vlan.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 207 | ifdef CONFIG_FULL_DYNAMIC_VLAN |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 208 | # Define CONFIG_FULL_DYNAMIC_VLAN to have hostapd manipulate bridges |
| 209 | # and VLAN interfaces for the VLAN feature. |
| 210 | CFLAGS += -DCONFIG_FULL_DYNAMIC_VLAN |
| 211 | OBJS += ../src/ap/vlan_full.o |
| 212 | ifdef CONFIG_VLAN_NETLINK |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 213 | OBJS += ../src/ap/vlan_util.o |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 214 | else |
| 215 | OBJS += ../src/ap/vlan_ioctl.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 216 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 217 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 218 | endif |
| 219 | |
| 220 | ifdef CONFIG_NO_CTRL_IFACE |
| 221 | CFLAGS += -DCONFIG_NO_CTRL_IFACE |
| 222 | else |
Dmitry Shmidt | 31a29cc | 2016-03-09 15:58:17 -0800 | [diff] [blame] | 223 | ifeq ($(CONFIG_CTRL_IFACE), udp) |
| 224 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 225 | else |
| 226 | ifeq ($(CONFIG_CTRL_IFACE), udp6) |
| 227 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 228 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP_IPV6 |
| 229 | else |
| 230 | ifeq ($(CONFIG_CTRL_IFACE), udp-remote) |
| 231 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 232 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP_REMOTE |
| 233 | else |
| 234 | ifeq ($(CONFIG_CTRL_IFACE), udp6-remote) |
| 235 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 236 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP_REMOTE |
| 237 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP_IPV6 |
| 238 | else |
| 239 | CFLAGS += -DCONFIG_CTRL_IFACE_UNIX |
| 240 | endif |
| 241 | endif |
| 242 | endif |
| 243 | endif |
| 244 | OBJS += ../src/common/ctrl_iface_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 245 | OBJS += ctrl_iface.o |
| 246 | OBJS += ../src/ap/ctrl_iface_ap.o |
| 247 | endif |
| 248 | |
Dmitry Shmidt | 31a29cc | 2016-03-09 15:58:17 -0800 | [diff] [blame] | 249 | ifndef CONFIG_NO_CTRL_IFACE |
| 250 | CFLAGS += -DCONFIG_CTRL_IFACE |
| 251 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 252 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 253 | ifdef CONFIG_RSN_PREAUTH |
| 254 | CFLAGS += -DCONFIG_RSN_PREAUTH |
| 255 | CONFIG_L2_PACKET=y |
| 256 | endif |
| 257 | |
Dmitry Shmidt | f21452a | 2014-02-26 10:55:25 -0800 | [diff] [blame] | 258 | ifdef CONFIG_HS20 |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 259 | CONFIG_PROXYARP=y |
| 260 | endif |
| 261 | |
| 262 | ifdef CONFIG_PROXYARP |
| 263 | CONFIG_L2_PACKET=y |
| 264 | endif |
| 265 | |
| 266 | ifdef CONFIG_SUITEB |
| 267 | CFLAGS += -DCONFIG_SUITEB |
Dmitry Shmidt | f21452a | 2014-02-26 10:55:25 -0800 | [diff] [blame] | 268 | endif |
| 269 | |
Dmitry Shmidt | 807291d | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 270 | ifdef CONFIG_SUITEB192 |
| 271 | CFLAGS += -DCONFIG_SUITEB192 |
| 272 | NEED_SHA384=y |
| 273 | endif |
| 274 | |
Hai Shalom | 74f70d4 | 2019-02-11 14:42:39 -0800 | [diff] [blame] | 275 | ifdef CONFIG_OCV |
| 276 | CFLAGS += -DCONFIG_OCV |
| 277 | OBJS += ../src/common/ocv.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 278 | endif |
| 279 | |
| 280 | ifdef CONFIG_IEEE80211R |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 281 | CFLAGS += -DCONFIG_IEEE80211R -DCONFIG_IEEE80211R_AP |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 282 | OBJS += ../src/ap/wpa_auth_ft.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 283 | NEED_AES_UNWRAP=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 284 | NEED_AES_SIV=y |
| 285 | NEED_ETH_P_OUI=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 286 | NEED_HMAC_SHA256_KDF=y |
| 287 | endif |
| 288 | |
| 289 | ifdef NEED_ETH_P_OUI |
| 290 | CFLAGS += -DCONFIG_ETH_P_OUI |
| 291 | OBJS += ../src/ap/eth_p_oui.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 292 | endif |
| 293 | |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 294 | ifdef CONFIG_SAE |
| 295 | CFLAGS += -DCONFIG_SAE |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 296 | OBJS += ../src/common/sae.o |
| 297 | NEED_ECC=y |
| 298 | NEED_DH_GROUPS=y |
Hai Shalom | b755a2a | 2020-04-23 21:49:02 -0700 | [diff] [blame] | 299 | NEED_HMAC_SHA256_KDF=y |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 300 | NEED_AP_MLME=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 301 | NEED_DRAGONFLY=y |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 302 | endif |
| 303 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 304 | ifdef CONFIG_OWE |
| 305 | CFLAGS += -DCONFIG_OWE |
| 306 | NEED_ECC=y |
| 307 | NEED_HMAC_SHA256_KDF=y |
| 308 | NEED_HMAC_SHA384_KDF=y |
| 309 | NEED_HMAC_SHA512_KDF=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 310 | NEED_SHA384=y |
| 311 | NEED_SHA512=y |
| 312 | endif |
| 313 | |
Jimmy Chen | caaac07 | 2019-09-16 16:36:06 +0800 | [diff] [blame] | 314 | ifdef CONFIG_WAPI_INTERFACE |
| 315 | L_CFLAGS += -DCONFIG_WAPI_INTERFACE |
| 316 | endif |
| 317 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 318 | ifdef CONFIG_AIRTIME_POLICY |
| 319 | CFLAGS += -DCONFIG_AIRTIME_POLICY |
| 320 | OBJS += ../src/ap/airtime_policy.o |
| 321 | endif |
| 322 | |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 323 | ifdef CONFIG_FILS |
| 324 | CFLAGS += -DCONFIG_FILS |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 325 | OBJS += ../src/ap/fils_hlp.o |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 326 | NEED_SHA384=y |
| 327 | NEED_AES_SIV=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 328 | ifdef CONFIG_FILS_SK_PFS |
| 329 | CFLAGS += -DCONFIG_FILS_SK_PFS |
| 330 | NEED_ECC=y |
| 331 | endif |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 332 | endif |
| 333 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 334 | ifdef CONFIG_WNM |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 335 | CFLAGS += -DCONFIG_WNM -DCONFIG_WNM_AP |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 336 | OBJS += ../src/ap/wnm_ap.o |
| 337 | endif |
| 338 | |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 339 | ifdef CONFIG_IEEE80211AC |
| 340 | CFLAGS += -DCONFIG_IEEE80211AC |
| 341 | endif |
| 342 | |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 343 | ifdef CONFIG_IEEE80211AX |
| 344 | CFLAGS += -DCONFIG_IEEE80211AX |
| 345 | OBJS += ../src/ap/ieee802_11_he.o |
| 346 | endif |
| 347 | |
Dmitry Shmidt | 57c2d39 | 2016-02-23 13:40:19 -0800 | [diff] [blame] | 348 | ifdef CONFIG_MBO |
| 349 | CFLAGS += -DCONFIG_MBO |
| 350 | OBJS += ../src/ap/mbo_ap.o |
| 351 | endif |
| 352 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 353 | include ../src/drivers/drivers.mak |
| 354 | OBJS += $(DRV_AP_OBJS) |
| 355 | CFLAGS += $(DRV_AP_CFLAGS) |
| 356 | LDFLAGS += $(DRV_AP_LDFLAGS) |
| 357 | LIBS += $(DRV_AP_LIBS) |
| 358 | |
| 359 | ifdef CONFIG_L2_PACKET |
| 360 | ifdef CONFIG_DNET_PCAP |
| 361 | ifdef CONFIG_L2_FREEBSD |
| 362 | LIBS += -lpcap |
| 363 | OBJS += ../src/l2_packet/l2_packet_freebsd.o |
| 364 | else |
| 365 | LIBS += -ldnet -lpcap |
| 366 | OBJS += ../src/l2_packet/l2_packet_pcap.o |
| 367 | endif |
| 368 | else |
| 369 | OBJS += ../src/l2_packet/l2_packet_linux.o |
| 370 | endif |
| 371 | else |
| 372 | OBJS += ../src/l2_packet/l2_packet_none.o |
| 373 | endif |
| 374 | |
| 375 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 376 | ifdef CONFIG_ERP |
| 377 | CFLAGS += -DCONFIG_ERP |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 378 | NEED_HMAC_SHA256_KDF=y |
| 379 | endif |
| 380 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 381 | ifdef CONFIG_EAP_MD5 |
| 382 | CFLAGS += -DEAP_SERVER_MD5 |
| 383 | OBJS += ../src/eap_server/eap_server_md5.o |
| 384 | CHAP=y |
| 385 | endif |
| 386 | |
| 387 | ifdef CONFIG_EAP_TLS |
| 388 | CFLAGS += -DEAP_SERVER_TLS |
| 389 | OBJS += ../src/eap_server/eap_server_tls.o |
| 390 | TLS_FUNCS=y |
| 391 | endif |
| 392 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 393 | ifdef CONFIG_EAP_UNAUTH_TLS |
| 394 | CFLAGS += -DEAP_SERVER_UNAUTH_TLS |
| 395 | ifndef CONFIG_EAP_TLS |
| 396 | OBJS += ../src/eap_server/eap_server_tls.o |
| 397 | TLS_FUNCS=y |
| 398 | endif |
| 399 | endif |
| 400 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 401 | ifdef CONFIG_EAP_PEAP |
| 402 | CFLAGS += -DEAP_SERVER_PEAP |
| 403 | OBJS += ../src/eap_server/eap_server_peap.o |
| 404 | OBJS += ../src/eap_common/eap_peap_common.o |
| 405 | TLS_FUNCS=y |
| 406 | CONFIG_EAP_MSCHAPV2=y |
| 407 | endif |
| 408 | |
| 409 | ifdef CONFIG_EAP_TTLS |
| 410 | CFLAGS += -DEAP_SERVER_TTLS |
| 411 | OBJS += ../src/eap_server/eap_server_ttls.o |
| 412 | TLS_FUNCS=y |
| 413 | CHAP=y |
| 414 | endif |
| 415 | |
| 416 | ifdef CONFIG_EAP_MSCHAPV2 |
| 417 | CFLAGS += -DEAP_SERVER_MSCHAPV2 |
| 418 | OBJS += ../src/eap_server/eap_server_mschapv2.o |
| 419 | MS_FUNCS=y |
| 420 | endif |
| 421 | |
| 422 | ifdef CONFIG_EAP_GTC |
| 423 | CFLAGS += -DEAP_SERVER_GTC |
| 424 | OBJS += ../src/eap_server/eap_server_gtc.o |
| 425 | endif |
| 426 | |
| 427 | ifdef CONFIG_EAP_SIM |
| 428 | CFLAGS += -DEAP_SERVER_SIM |
| 429 | OBJS += ../src/eap_server/eap_server_sim.o |
| 430 | CONFIG_EAP_SIM_COMMON=y |
| 431 | NEED_AES_CBC=y |
| 432 | endif |
| 433 | |
| 434 | ifdef CONFIG_EAP_AKA |
| 435 | CFLAGS += -DEAP_SERVER_AKA |
| 436 | OBJS += ../src/eap_server/eap_server_aka.o |
| 437 | CONFIG_EAP_SIM_COMMON=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 438 | NEED_AES_CBC=y |
| 439 | endif |
| 440 | |
| 441 | ifdef CONFIG_EAP_AKA_PRIME |
| 442 | CFLAGS += -DEAP_SERVER_AKA_PRIME |
| 443 | endif |
| 444 | |
| 445 | ifdef CONFIG_EAP_SIM_COMMON |
| 446 | OBJS += ../src/eap_common/eap_sim_common.o |
| 447 | # Example EAP-SIM/AKA interface for GSM/UMTS authentication. This can be |
| 448 | # replaced with another file implementating the interface specified in |
| 449 | # eap_sim_db.h. |
| 450 | OBJS += ../src/eap_server/eap_sim_db.o |
| 451 | NEED_FIPS186_2_PRF=y |
| 452 | endif |
| 453 | |
| 454 | ifdef CONFIG_EAP_PAX |
| 455 | CFLAGS += -DEAP_SERVER_PAX |
| 456 | OBJS += ../src/eap_server/eap_server_pax.o ../src/eap_common/eap_pax_common.o |
| 457 | endif |
| 458 | |
| 459 | ifdef CONFIG_EAP_PSK |
| 460 | CFLAGS += -DEAP_SERVER_PSK |
| 461 | OBJS += ../src/eap_server/eap_server_psk.o ../src/eap_common/eap_psk_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 462 | NEED_AES_ENCBLOCK=y |
| 463 | NEED_AES_EAX=y |
| 464 | endif |
| 465 | |
| 466 | ifdef CONFIG_EAP_SAKE |
| 467 | CFLAGS += -DEAP_SERVER_SAKE |
| 468 | OBJS += ../src/eap_server/eap_server_sake.o ../src/eap_common/eap_sake_common.o |
| 469 | endif |
| 470 | |
| 471 | ifdef CONFIG_EAP_GPSK |
| 472 | CFLAGS += -DEAP_SERVER_GPSK |
| 473 | OBJS += ../src/eap_server/eap_server_gpsk.o ../src/eap_common/eap_gpsk_common.o |
| 474 | ifdef CONFIG_EAP_GPSK_SHA256 |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 475 | CFLAGS += -DEAP_GPSK_SHA256 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 476 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 477 | endif |
| 478 | |
| 479 | ifdef CONFIG_EAP_PWD |
| 480 | CFLAGS += -DEAP_SERVER_PWD |
| 481 | OBJS += ../src/eap_server/eap_server_pwd.o ../src/eap_common/eap_pwd_common.o |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 482 | NEED_ECC=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 483 | NEED_DRAGONFLY=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 484 | endif |
| 485 | |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 486 | ifdef CONFIG_EAP_EKE |
| 487 | CFLAGS += -DEAP_SERVER_EKE |
| 488 | OBJS += ../src/eap_server/eap_server_eke.o ../src/eap_common/eap_eke_common.o |
| 489 | NEED_DH_GROUPS=y |
| 490 | NEED_DH_GROUPS_ALL=y |
| 491 | endif |
| 492 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 493 | ifdef CONFIG_EAP_VENDOR_TEST |
| 494 | CFLAGS += -DEAP_SERVER_VENDOR_TEST |
| 495 | OBJS += ../src/eap_server/eap_server_vendor_test.o |
| 496 | endif |
| 497 | |
| 498 | ifdef CONFIG_EAP_FAST |
| 499 | CFLAGS += -DEAP_SERVER_FAST |
| 500 | OBJS += ../src/eap_server/eap_server_fast.o |
| 501 | OBJS += ../src/eap_common/eap_fast_common.o |
| 502 | TLS_FUNCS=y |
| 503 | NEED_T_PRF=y |
| 504 | NEED_AES_UNWRAP=y |
| 505 | endif |
| 506 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 507 | ifdef CONFIG_EAP_TEAP |
| 508 | CFLAGS += -DEAP_SERVER_TEAP |
| 509 | OBJS += ../src/eap_server/eap_server_teap.o |
| 510 | OBJS += ../src/eap_common/eap_teap_common.o |
| 511 | TLS_FUNCS=y |
| 512 | NEED_T_PRF=y |
| 513 | NEED_SHA384=y |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 514 | NEED_TLS_PRF_SHA256=y |
| 515 | NEED_TLS_PRF_SHA384=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 516 | NEED_AES_UNWRAP=y |
| 517 | endif |
| 518 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 519 | ifdef CONFIG_WPS |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 520 | CFLAGS += -DCONFIG_WPS -DEAP_SERVER_WSC |
| 521 | OBJS += ../src/utils/uuid.o |
| 522 | OBJS += ../src/ap/wps_hostapd.o |
| 523 | OBJS += ../src/eap_server/eap_server_wsc.o ../src/eap_common/eap_wsc_common.o |
| 524 | OBJS += ../src/wps/wps.o |
| 525 | OBJS += ../src/wps/wps_common.o |
| 526 | OBJS += ../src/wps/wps_attr_parse.o |
| 527 | OBJS += ../src/wps/wps_attr_build.o |
| 528 | OBJS += ../src/wps/wps_attr_process.o |
| 529 | OBJS += ../src/wps/wps_dev_attr.o |
| 530 | OBJS += ../src/wps/wps_enrollee.o |
| 531 | OBJS += ../src/wps/wps_registrar.o |
| 532 | NEED_DH_GROUPS=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 533 | NEED_BASE64=y |
| 534 | NEED_AES_CBC=y |
| 535 | NEED_MODEXP=y |
| 536 | CONFIG_EAP=y |
| 537 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 538 | ifdef CONFIG_WPS_NFC |
| 539 | CFLAGS += -DCONFIG_WPS_NFC |
| 540 | OBJS += ../src/wps/ndef.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 541 | NEED_WPS_OOB=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 542 | endif |
| 543 | |
| 544 | ifdef NEED_WPS_OOB |
| 545 | CFLAGS += -DCONFIG_WPS_OOB |
| 546 | endif |
| 547 | |
| 548 | ifdef CONFIG_WPS_UPNP |
| 549 | CFLAGS += -DCONFIG_WPS_UPNP |
| 550 | OBJS += ../src/wps/wps_upnp.o |
| 551 | OBJS += ../src/wps/wps_upnp_ssdp.o |
| 552 | OBJS += ../src/wps/wps_upnp_web.o |
| 553 | OBJS += ../src/wps/wps_upnp_event.o |
| 554 | OBJS += ../src/wps/wps_upnp_ap.o |
| 555 | OBJS += ../src/wps/upnp_xml.o |
| 556 | OBJS += ../src/wps/httpread.o |
| 557 | OBJS += ../src/wps/http_client.o |
| 558 | OBJS += ../src/wps/http_server.o |
| 559 | endif |
| 560 | |
| 561 | ifdef CONFIG_WPS_STRICT |
| 562 | CFLAGS += -DCONFIG_WPS_STRICT |
| 563 | OBJS += ../src/wps/wps_validate.o |
| 564 | endif |
| 565 | |
| 566 | ifdef CONFIG_WPS_TESTING |
| 567 | CFLAGS += -DCONFIG_WPS_TESTING |
| 568 | endif |
| 569 | |
| 570 | endif |
| 571 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 572 | ifdef CONFIG_DPP |
| 573 | CFLAGS += -DCONFIG_DPP |
| 574 | OBJS += ../src/common/dpp.o |
| 575 | OBJS += ../src/ap/dpp_hostapd.o |
| 576 | OBJS += ../src/ap/gas_query_ap.o |
| 577 | NEED_AES_SIV=y |
| 578 | NEED_HMAC_SHA256_KDF=y |
| 579 | NEED_HMAC_SHA384_KDF=y |
| 580 | NEED_HMAC_SHA512_KDF=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 581 | NEED_SHA384=y |
| 582 | NEED_SHA512=y |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 583 | NEED_ECC=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 584 | NEED_JSON=y |
| 585 | NEED_GAS=y |
| 586 | NEED_BASE64=y |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 587 | NEED_ASN1=y |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 588 | ifdef CONFIG_DPP2 |
| 589 | CFLAGS += -DCONFIG_DPP2 |
| 590 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 591 | endif |
| 592 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 593 | ifdef CONFIG_EAP_IKEV2 |
| 594 | CFLAGS += -DEAP_SERVER_IKEV2 |
| 595 | OBJS += ../src/eap_server/eap_server_ikev2.o ../src/eap_server/ikev2.o |
| 596 | OBJS += ../src/eap_common/eap_ikev2_common.o ../src/eap_common/ikev2_common.o |
| 597 | NEED_DH_GROUPS=y |
| 598 | NEED_DH_GROUPS_ALL=y |
| 599 | NEED_MODEXP=y |
| 600 | NEED_CIPHER=y |
| 601 | endif |
| 602 | |
| 603 | ifdef CONFIG_EAP_TNC |
| 604 | CFLAGS += -DEAP_SERVER_TNC |
| 605 | OBJS += ../src/eap_server/eap_server_tnc.o |
| 606 | OBJS += ../src/eap_server/tncs.o |
| 607 | NEED_BASE64=y |
| 608 | ifndef CONFIG_DRIVER_BSD |
| 609 | LIBS += -ldl |
| 610 | endif |
| 611 | endif |
| 612 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 613 | ifdef CONFIG_MACSEC |
| 614 | CFLAGS += -DCONFIG_MACSEC |
| 615 | OBJS += ../src/ap/wpa_auth_kay.o |
| 616 | OBJS += ../src/pae/ieee802_1x_cp.o |
| 617 | OBJS += ../src/pae/ieee802_1x_kay.o |
| 618 | OBJS += ../src/pae/ieee802_1x_key.o |
| 619 | OBJS += ../src/pae/ieee802_1x_secy_ops.o |
| 620 | endif |
| 621 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 622 | # Basic EAP functionality is needed for EAPOL |
| 623 | OBJS += eap_register.o |
| 624 | OBJS += ../src/eap_server/eap_server.o |
| 625 | OBJS += ../src/eap_common/eap_common.o |
| 626 | OBJS += ../src/eap_server/eap_server_methods.o |
| 627 | OBJS += ../src/eap_server/eap_server_identity.o |
| 628 | CFLAGS += -DEAP_SERVER_IDENTITY |
| 629 | |
| 630 | ifdef CONFIG_EAP |
| 631 | CFLAGS += -DEAP_SERVER |
| 632 | endif |
| 633 | |
| 634 | ifdef CONFIG_PKCS12 |
| 635 | CFLAGS += -DPKCS12_FUNCS |
| 636 | endif |
| 637 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 638 | ifdef NEED_DRAGONFLY |
| 639 | OBJS += ../src/common/dragonfly.o |
| 640 | endif |
| 641 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 642 | ifdef MS_FUNCS |
| 643 | OBJS += ../src/crypto/ms_funcs.o |
| 644 | NEED_DES=y |
| 645 | NEED_MD4=y |
| 646 | endif |
| 647 | |
| 648 | ifdef CHAP |
| 649 | OBJS += ../src/eap_common/chap.o |
| 650 | endif |
| 651 | |
| 652 | ifdef TLS_FUNCS |
| 653 | NEED_DES=y |
| 654 | # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, and EAP_TTLS) |
| 655 | CFLAGS += -DEAP_TLS_FUNCS |
| 656 | OBJS += ../src/eap_server/eap_server_tls_common.o |
| 657 | NEED_TLS_PRF=y |
| 658 | endif |
| 659 | |
| 660 | ifndef CONFIG_TLS |
| 661 | CONFIG_TLS=openssl |
| 662 | endif |
| 663 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 664 | ifdef CONFIG_TLSV11 |
| 665 | CFLAGS += -DCONFIG_TLSV11 |
| 666 | endif |
| 667 | |
| 668 | ifdef CONFIG_TLSV12 |
| 669 | CFLAGS += -DCONFIG_TLSV12 |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 670 | endif |
| 671 | |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 672 | ifeq ($(CONFIG_TLS), wolfssl) |
| 673 | CONFIG_CRYPTO=wolfssl |
| 674 | ifdef TLS_FUNCS |
| 675 | OBJS += ../src/crypto/tls_wolfssl.o |
| 676 | LIBS += -lwolfssl -lm |
| 677 | endif |
| 678 | OBJS += ../src/crypto/crypto_wolfssl.o |
| 679 | HOBJS += ../src/crypto/crypto_wolfssl.o |
| 680 | ifdef NEED_FIPS186_2_PRF |
| 681 | OBJS += ../src/crypto/fips_prf_wolfssl.o |
| 682 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 683 | NEED_TLS_PRF_SHA256=y |
| 684 | LIBS += -lwolfssl -lm |
| 685 | LIBS_h += -lwolfssl -lm |
| 686 | ifdef CONFIG_TLS_ADD_DL |
| 687 | LIBS += -ldl |
| 688 | LIBS_h += -ldl |
| 689 | endif |
| 690 | endif |
| 691 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 692 | ifeq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 693 | CONFIG_CRYPTO=openssl |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 694 | ifdef TLS_FUNCS |
| 695 | OBJS += ../src/crypto/tls_openssl.o |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 696 | OBJS += ../src/crypto/tls_openssl_ocsp.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 697 | LIBS += -lssl |
| 698 | endif |
| 699 | OBJS += ../src/crypto/crypto_openssl.o |
| 700 | HOBJS += ../src/crypto/crypto_openssl.o |
| 701 | ifdef NEED_FIPS186_2_PRF |
| 702 | OBJS += ../src/crypto/fips_prf_openssl.o |
| 703 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 704 | NEED_TLS_PRF_SHA256=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 705 | LIBS += -lcrypto |
| 706 | LIBS_h += -lcrypto |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 707 | LIBS_n += -lcrypto |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 708 | ifdef CONFIG_TLS_ADD_DL |
| 709 | LIBS += -ldl |
| 710 | LIBS_h += -ldl |
| 711 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 712 | ifndef CONFIG_TLS_DEFAULT_CIPHERS |
| 713 | CONFIG_TLS_DEFAULT_CIPHERS = "DEFAULT:!EXP:!LOW" |
| 714 | endif |
| 715 | CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\" |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 716 | endif |
| 717 | |
| 718 | ifeq ($(CONFIG_TLS), gnutls) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 719 | ifndef CONFIG_CRYPTO |
| 720 | # default to libgcrypt |
| 721 | CONFIG_CRYPTO=gnutls |
| 722 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 723 | ifdef TLS_FUNCS |
| 724 | OBJS += ../src/crypto/tls_gnutls.o |
| 725 | LIBS += -lgnutls -lgpg-error |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 726 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 727 | OBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o |
| 728 | HOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 729 | ifdef NEED_FIPS186_2_PRF |
Dmitry Shmidt | 9866086 | 2014-03-11 17:26:21 -0700 | [diff] [blame] | 730 | OBJS += ../src/crypto/fips_prf_internal.o |
| 731 | SHA1OBJS += ../src/crypto/sha1-internal.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 732 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 733 | ifeq ($(CONFIG_CRYPTO), gnutls) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 734 | LIBS += -lgcrypt |
| 735 | LIBS_h += -lgcrypt |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 736 | LIBS_n += -lgcrypt |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 737 | CONFIG_INTERNAL_RC4=y |
| 738 | CONFIG_INTERNAL_DH_GROUP5=y |
| 739 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 740 | ifeq ($(CONFIG_CRYPTO), nettle) |
| 741 | LIBS += -lnettle -lgmp |
| 742 | LIBS_p += -lnettle -lgmp |
| 743 | CONFIG_INTERNAL_RC4=y |
| 744 | CONFIG_INTERNAL_DH_GROUP5=y |
| 745 | endif |
| 746 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 747 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 748 | ifeq ($(CONFIG_TLS), internal) |
| 749 | ifndef CONFIG_CRYPTO |
| 750 | CONFIG_CRYPTO=internal |
| 751 | endif |
| 752 | ifdef TLS_FUNCS |
| 753 | OBJS += ../src/crypto/crypto_internal-rsa.o |
| 754 | OBJS += ../src/crypto/tls_internal.o |
| 755 | OBJS += ../src/tls/tlsv1_common.o |
| 756 | OBJS += ../src/tls/tlsv1_record.o |
| 757 | OBJS += ../src/tls/tlsv1_cred.o |
| 758 | OBJS += ../src/tls/tlsv1_server.o |
| 759 | OBJS += ../src/tls/tlsv1_server_write.o |
| 760 | OBJS += ../src/tls/tlsv1_server_read.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 761 | OBJS += ../src/tls/rsa.o |
| 762 | OBJS += ../src/tls/x509v3.o |
| 763 | OBJS += ../src/tls/pkcs1.o |
| 764 | OBJS += ../src/tls/pkcs5.o |
| 765 | OBJS += ../src/tls/pkcs8.o |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 766 | NEED_ASN1=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 767 | NEED_BASE64=y |
| 768 | NEED_TLS_PRF=y |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 769 | ifdef CONFIG_TLSV12 |
| 770 | NEED_TLS_PRF_SHA256=y |
| 771 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 772 | NEED_MODEXP=y |
| 773 | NEED_CIPHER=y |
| 774 | CFLAGS += -DCONFIG_TLS_INTERNAL |
| 775 | CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER |
| 776 | endif |
| 777 | ifdef NEED_CIPHER |
| 778 | NEED_DES=y |
| 779 | OBJS += ../src/crypto/crypto_internal-cipher.o |
| 780 | endif |
| 781 | ifdef NEED_MODEXP |
| 782 | OBJS += ../src/crypto/crypto_internal-modexp.o |
| 783 | OBJS += ../src/tls/bignum.o |
| 784 | endif |
| 785 | ifeq ($(CONFIG_CRYPTO), libtomcrypt) |
| 786 | OBJS += ../src/crypto/crypto_libtomcrypt.o |
| 787 | LIBS += -ltomcrypt -ltfm |
| 788 | LIBS_h += -ltomcrypt -ltfm |
| 789 | CONFIG_INTERNAL_SHA256=y |
| 790 | CONFIG_INTERNAL_RC4=y |
| 791 | CONFIG_INTERNAL_DH_GROUP5=y |
| 792 | endif |
| 793 | ifeq ($(CONFIG_CRYPTO), internal) |
| 794 | OBJS += ../src/crypto/crypto_internal.o |
| 795 | NEED_AES_DEC=y |
| 796 | CFLAGS += -DCONFIG_CRYPTO_INTERNAL |
| 797 | ifdef CONFIG_INTERNAL_LIBTOMMATH |
| 798 | CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH |
| 799 | ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST |
| 800 | CFLAGS += -DLTM_FAST |
| 801 | endif |
| 802 | else |
| 803 | LIBS += -ltommath |
| 804 | LIBS_h += -ltommath |
| 805 | endif |
| 806 | CONFIG_INTERNAL_AES=y |
| 807 | CONFIG_INTERNAL_DES=y |
| 808 | CONFIG_INTERNAL_SHA1=y |
| 809 | CONFIG_INTERNAL_MD4=y |
| 810 | CONFIG_INTERNAL_MD5=y |
| 811 | CONFIG_INTERNAL_SHA256=y |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 812 | CONFIG_INTERNAL_SHA384=y |
| 813 | CONFIG_INTERNAL_SHA512=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 814 | CONFIG_INTERNAL_RC4=y |
| 815 | CONFIG_INTERNAL_DH_GROUP5=y |
| 816 | endif |
| 817 | ifeq ($(CONFIG_CRYPTO), cryptoapi) |
| 818 | OBJS += ../src/crypto/crypto_cryptoapi.o |
| 819 | OBJS_p += ../src/crypto/crypto_cryptoapi.o |
| 820 | CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI |
| 821 | CONFIG_INTERNAL_SHA256=y |
| 822 | CONFIG_INTERNAL_RC4=y |
| 823 | endif |
| 824 | endif |
| 825 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 826 | ifeq ($(CONFIG_TLS), linux) |
| 827 | OBJS += ../src/crypto/crypto_linux.o |
| 828 | ifdef TLS_FUNCS |
| 829 | OBJS += ../src/crypto/crypto_internal-rsa.o |
| 830 | OBJS += ../src/crypto/tls_internal.o |
| 831 | OBJS += ../src/tls/tlsv1_common.o |
| 832 | OBJS += ../src/tls/tlsv1_record.o |
| 833 | OBJS += ../src/tls/tlsv1_cred.o |
| 834 | OBJS += ../src/tls/tlsv1_server.o |
| 835 | OBJS += ../src/tls/tlsv1_server_write.o |
| 836 | OBJS += ../src/tls/tlsv1_server_read.o |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 837 | OBJS += ../src/tls/rsa.o |
| 838 | OBJS += ../src/tls/x509v3.o |
| 839 | OBJS += ../src/tls/pkcs1.o |
| 840 | OBJS += ../src/tls/pkcs5.o |
| 841 | OBJS += ../src/tls/pkcs8.o |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 842 | NEED_ASN1=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 843 | NEED_BASE64=y |
| 844 | NEED_TLS_PRF=y |
| 845 | ifdef CONFIG_TLSV12 |
| 846 | NEED_TLS_PRF_SHA256=y |
| 847 | endif |
| 848 | NEED_MODEXP=y |
| 849 | NEED_CIPHER=y |
| 850 | CFLAGS += -DCONFIG_TLS_INTERNAL |
| 851 | CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER |
| 852 | endif |
| 853 | ifdef NEED_MODEXP |
| 854 | OBJS += ../src/crypto/crypto_internal-modexp.o |
| 855 | OBJS += ../src/tls/bignum.o |
| 856 | CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH |
| 857 | CFLAGS += -DLTM_FAST |
| 858 | endif |
| 859 | CONFIG_INTERNAL_DH_GROUP5=y |
| 860 | ifdef NEED_FIPS186_2_PRF |
| 861 | OBJS += ../src/crypto/fips_prf_internal.o |
| 862 | OBJS += ../src/crypto/sha1-internal.o |
| 863 | endif |
| 864 | endif |
| 865 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 866 | ifeq ($(CONFIG_TLS), none) |
| 867 | ifdef TLS_FUNCS |
| 868 | OBJS += ../src/crypto/tls_none.o |
| 869 | CFLAGS += -DEAP_TLS_NONE |
| 870 | CONFIG_INTERNAL_AES=y |
| 871 | CONFIG_INTERNAL_SHA1=y |
| 872 | CONFIG_INTERNAL_MD5=y |
| 873 | endif |
| 874 | OBJS += ../src/crypto/crypto_none.o |
| 875 | OBJS_p += ../src/crypto/crypto_none.o |
| 876 | CONFIG_INTERNAL_SHA256=y |
| 877 | CONFIG_INTERNAL_RC4=y |
| 878 | endif |
| 879 | |
| 880 | ifndef TLS_FUNCS |
| 881 | OBJS += ../src/crypto/tls_none.o |
| 882 | ifeq ($(CONFIG_TLS), internal) |
| 883 | CONFIG_INTERNAL_AES=y |
| 884 | CONFIG_INTERNAL_SHA1=y |
| 885 | CONFIG_INTERNAL_MD5=y |
| 886 | CONFIG_INTERNAL_RC4=y |
| 887 | endif |
| 888 | endif |
| 889 | |
| 890 | AESOBJS = # none so far |
| 891 | ifdef CONFIG_INTERNAL_AES |
| 892 | AESOBJS += ../src/crypto/aes-internal.o ../src/crypto/aes-internal-enc.o |
| 893 | endif |
| 894 | |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 895 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 896 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 897 | AESOBJS += ../src/crypto/aes-wrap.o |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 898 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 899 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 900 | ifdef NEED_AES_EAX |
| 901 | AESOBJS += ../src/crypto/aes-eax.o |
| 902 | NEED_AES_CTR=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 903 | endif |
| 904 | ifdef NEED_AES_SIV |
| 905 | AESOBJS += ../src/crypto/aes-siv.o |
| 906 | NEED_AES_CTR=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 907 | endif |
| 908 | ifdef NEED_AES_CTR |
| 909 | AESOBJS += ../src/crypto/aes-ctr.o |
| 910 | endif |
| 911 | ifdef NEED_AES_ENCBLOCK |
| 912 | AESOBJS += ../src/crypto/aes-encblock.o |
| 913 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 914 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 915 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 916 | AESOBJS += ../src/crypto/aes-omac1.o |
| 917 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 918 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 919 | ifdef NEED_AES_UNWRAP |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 920 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 921 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 922 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 923 | NEED_AES_DEC=y |
| 924 | AESOBJS += ../src/crypto/aes-unwrap.o |
| 925 | endif |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 926 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 927 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 928 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 929 | ifdef NEED_AES_CBC |
| 930 | NEED_AES_DEC=y |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 931 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 932 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 933 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 934 | AESOBJS += ../src/crypto/aes-cbc.o |
| 935 | endif |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 936 | endif |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 937 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 938 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 939 | ifdef NEED_AES_DEC |
| 940 | ifdef CONFIG_INTERNAL_AES |
| 941 | AESOBJS += ../src/crypto/aes-internal-dec.o |
| 942 | endif |
| 943 | endif |
| 944 | ifdef NEED_AES |
| 945 | OBJS += $(AESOBJS) |
| 946 | endif |
| 947 | |
| 948 | ifdef NEED_SHA1 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 949 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 950 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 951 | ifneq ($(CONFIG_TLS), gnutls) |
| 952 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 953 | SHA1OBJS += ../src/crypto/sha1.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 954 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 955 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 956 | endif |
| 957 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 958 | SHA1OBJS += ../src/crypto/sha1-prf.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 959 | ifdef CONFIG_INTERNAL_SHA1 |
| 960 | SHA1OBJS += ../src/crypto/sha1-internal.o |
| 961 | ifdef NEED_FIPS186_2_PRF |
| 962 | SHA1OBJS += ../src/crypto/fips_prf_internal.o |
| 963 | endif |
| 964 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 965 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 966 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 967 | SHA1OBJS += ../src/crypto/sha1-pbkdf2.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 968 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 969 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 970 | ifdef NEED_T_PRF |
| 971 | SHA1OBJS += ../src/crypto/sha1-tprf.o |
| 972 | endif |
| 973 | ifdef NEED_TLS_PRF |
| 974 | SHA1OBJS += ../src/crypto/sha1-tlsprf.o |
| 975 | endif |
| 976 | endif |
| 977 | |
| 978 | ifdef NEED_SHA1 |
| 979 | OBJS += $(SHA1OBJS) |
| 980 | endif |
| 981 | |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 982 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 983 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 984 | ifneq ($(CONFIG_TLS), gnutls) |
| 985 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 986 | OBJS += ../src/crypto/md5.o |
| 987 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 988 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 989 | endif |
| 990 | endif |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 991 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 992 | ifdef NEED_MD5 |
| 993 | ifdef CONFIG_INTERNAL_MD5 |
| 994 | OBJS += ../src/crypto/md5-internal.o |
| 995 | HOBJS += ../src/crypto/md5-internal.o |
| 996 | endif |
| 997 | endif |
| 998 | |
| 999 | ifdef NEED_MD4 |
| 1000 | ifdef CONFIG_INTERNAL_MD4 |
| 1001 | OBJS += ../src/crypto/md4-internal.o |
| 1002 | endif |
| 1003 | endif |
| 1004 | |
| 1005 | ifdef NEED_DES |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1006 | CFLAGS += -DCONFIG_DES |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1007 | ifdef CONFIG_INTERNAL_DES |
| 1008 | OBJS += ../src/crypto/des-internal.o |
| 1009 | endif |
| 1010 | endif |
| 1011 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1012 | ifdef CONFIG_NO_RC4 |
| 1013 | CFLAGS += -DCONFIG_NO_RC4 |
| 1014 | endif |
| 1015 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1016 | ifdef NEED_RC4 |
| 1017 | ifdef CONFIG_INTERNAL_RC4 |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1018 | ifndef CONFIG_NO_RC4 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1019 | OBJS += ../src/crypto/rc4.o |
| 1020 | endif |
| 1021 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1022 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1023 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1024 | CFLAGS += -DCONFIG_SHA256 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1025 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1026 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1027 | ifneq ($(CONFIG_TLS), gnutls) |
| 1028 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1029 | OBJS += ../src/crypto/sha256.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1030 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1031 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1032 | endif |
| 1033 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1034 | OBJS += ../src/crypto/sha256-prf.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1035 | ifdef CONFIG_INTERNAL_SHA256 |
| 1036 | OBJS += ../src/crypto/sha256-internal.o |
| 1037 | endif |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1038 | ifdef NEED_TLS_PRF_SHA256 |
| 1039 | OBJS += ../src/crypto/sha256-tlsprf.o |
| 1040 | endif |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 1041 | ifdef NEED_TLS_PRF_SHA384 |
| 1042 | OBJS += ../src/crypto/sha384-tlsprf.o |
| 1043 | endif |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1044 | ifdef NEED_HMAC_SHA256_KDF |
| 1045 | OBJS += ../src/crypto/sha256-kdf.o |
| 1046 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1047 | ifdef NEED_HMAC_SHA384_KDF |
| 1048 | OBJS += ../src/crypto/sha384-kdf.o |
| 1049 | endif |
| 1050 | ifdef NEED_HMAC_SHA512_KDF |
| 1051 | OBJS += ../src/crypto/sha512-kdf.o |
| 1052 | endif |
Dmitry Shmidt | 807291d | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 1053 | ifdef NEED_SHA384 |
| 1054 | CFLAGS += -DCONFIG_SHA384 |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1055 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1056 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1057 | ifneq ($(CONFIG_TLS), gnutls) |
| 1058 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1059 | OBJS += ../src/crypto/sha384.o |
| 1060 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1061 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1062 | endif |
| 1063 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1064 | OBJS += ../src/crypto/sha384-prf.o |
Dmitry Shmidt | 807291d | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 1065 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1066 | ifdef NEED_SHA512 |
| 1067 | CFLAGS += -DCONFIG_SHA512 |
| 1068 | ifneq ($(CONFIG_TLS), openssl) |
| 1069 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1070 | ifneq ($(CONFIG_TLS), gnutls) |
| 1071 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1072 | OBJS += ../src/crypto/sha512.o |
| 1073 | endif |
| 1074 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1075 | endif |
| 1076 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1077 | OBJS += ../src/crypto/sha512-prf.o |
| 1078 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1079 | |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 1080 | ifdef CONFIG_INTERNAL_SHA384 |
| 1081 | CFLAGS += -DCONFIG_INTERNAL_SHA384 |
| 1082 | OBJS += ../src/crypto/sha384-internal.o |
| 1083 | endif |
| 1084 | |
| 1085 | ifdef CONFIG_INTERNAL_SHA512 |
| 1086 | CFLAGS += -DCONFIG_INTERNAL_SHA512 |
| 1087 | OBJS += ../src/crypto/sha512-internal.o |
| 1088 | endif |
| 1089 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 1090 | ifdef NEED_ASN1 |
| 1091 | OBJS += ../src/tls/asn1.o |
| 1092 | endif |
| 1093 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1094 | ifdef NEED_DH_GROUPS |
| 1095 | OBJS += ../src/crypto/dh_groups.o |
| 1096 | endif |
| 1097 | ifdef NEED_DH_GROUPS_ALL |
| 1098 | CFLAGS += -DALL_DH_GROUPS |
| 1099 | endif |
| 1100 | ifdef CONFIG_INTERNAL_DH_GROUP5 |
| 1101 | ifdef NEED_DH_GROUPS |
| 1102 | OBJS += ../src/crypto/dh_group5.o |
| 1103 | endif |
| 1104 | endif |
| 1105 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 1106 | ifdef NEED_ECC |
| 1107 | CFLAGS += -DCONFIG_ECC |
| 1108 | endif |
| 1109 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1110 | ifdef CONFIG_NO_RANDOM_POOL |
| 1111 | CFLAGS += -DCONFIG_NO_RANDOM_POOL |
| 1112 | else |
Hai Shalom | 74f70d4 | 2019-02-11 14:42:39 -0800 | [diff] [blame] | 1113 | ifdef CONFIG_GETRANDOM |
| 1114 | CFLAGS += -DCONFIG_GETRANDOM |
| 1115 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1116 | OBJS += ../src/crypto/random.o |
| 1117 | HOBJS += ../src/crypto/random.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1118 | HOBJS += ../src/utils/eloop.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1119 | HOBJS += $(SHA1OBJS) |
Dmitry Shmidt | dda10c2 | 2015-03-24 16:05:01 -0700 | [diff] [blame] | 1120 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1121 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1122 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1123 | HOBJS += ../src/crypto/md5.o |
| 1124 | endif |
Dmitry Shmidt | dda10c2 | 2015-03-24 16:05:01 -0700 | [diff] [blame] | 1125 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1126 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1127 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1128 | |
| 1129 | ifdef CONFIG_RADIUS_SERVER |
| 1130 | CFLAGS += -DRADIUS_SERVER |
| 1131 | OBJS += ../src/radius/radius_server.o |
| 1132 | endif |
| 1133 | |
| 1134 | ifdef CONFIG_IPV6 |
| 1135 | CFLAGS += -DCONFIG_IPV6 |
| 1136 | endif |
| 1137 | |
| 1138 | ifdef CONFIG_DRIVER_RADIUS_ACL |
| 1139 | CFLAGS += -DCONFIG_DRIVER_RADIUS_ACL |
| 1140 | endif |
| 1141 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1142 | ifdef NEED_BASE64 |
| 1143 | OBJS += ../src/utils/base64.o |
| 1144 | endif |
| 1145 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1146 | ifdef NEED_JSON |
| 1147 | OBJS += ../src/utils/json.o |
| 1148 | CFLAGS += -DCONFIG_JSON |
| 1149 | endif |
| 1150 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1151 | ifdef NEED_AP_MLME |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1152 | OBJS += ../src/ap/wmm.o |
| 1153 | OBJS += ../src/ap/ap_list.o |
| 1154 | OBJS += ../src/ap/ieee802_11.o |
| 1155 | OBJS += ../src/ap/hw_features.o |
Dmitry Shmidt | 051af73 | 2013-10-22 13:52:46 -0700 | [diff] [blame] | 1156 | OBJS += ../src/ap/dfs.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1157 | CFLAGS += -DNEED_AP_MLME |
| 1158 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1159 | OBJS += ../src/ap/ieee802_11_ht.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1160 | |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1161 | ifdef CONFIG_IEEE80211AC |
| 1162 | OBJS += ../src/ap/ieee802_11_vht.o |
| 1163 | endif |
| 1164 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1165 | ifdef CONFIG_P2P_MANAGER |
| 1166 | CFLAGS += -DCONFIG_P2P_MANAGER |
| 1167 | OBJS += ../src/ap/p2p_hostapd.o |
| 1168 | endif |
| 1169 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1170 | ifdef CONFIG_HS20 |
| 1171 | CFLAGS += -DCONFIG_HS20 |
| 1172 | OBJS += ../src/ap/hs20.o |
| 1173 | CONFIG_INTERWORKING=y |
| 1174 | endif |
| 1175 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1176 | ifdef CONFIG_INTERWORKING |
| 1177 | CFLAGS += -DCONFIG_INTERWORKING |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1178 | NEED_GAS=y |
| 1179 | endif |
| 1180 | |
| 1181 | ifdef NEED_GAS |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1182 | OBJS += ../src/common/gas.o |
| 1183 | OBJS += ../src/ap/gas_serv.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1184 | endif |
| 1185 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1186 | ifdef CONFIG_PROXYARP |
| 1187 | CFLAGS += -DCONFIG_PROXYARP |
| 1188 | OBJS += ../src/ap/x_snoop.o |
| 1189 | OBJS += ../src/ap/dhcp_snoop.o |
| 1190 | ifdef CONFIG_IPV6 |
| 1191 | OBJS += ../src/ap/ndisc_snoop.o |
| 1192 | endif |
| 1193 | endif |
| 1194 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1195 | OBJS += ../src/drivers/driver_common.o |
| 1196 | |
| 1197 | ifdef CONFIG_WPA_CLI_EDIT |
| 1198 | OBJS_c += ../src/utils/edit.o |
| 1199 | else |
| 1200 | OBJS_c += ../src/utils/edit_simple.o |
| 1201 | endif |
| 1202 | |
Dmitry Shmidt | 391c59f | 2013-09-03 12:16:28 -0700 | [diff] [blame] | 1203 | ifdef CONFIG_ACS |
| 1204 | CFLAGS += -DCONFIG_ACS |
| 1205 | OBJS += ../src/ap/acs.o |
| 1206 | LIBS += -lm |
| 1207 | endif |
| 1208 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1209 | ifdef CONFIG_NO_STDOUT_DEBUG |
| 1210 | CFLAGS += -DCONFIG_NO_STDOUT_DEBUG |
| 1211 | endif |
| 1212 | |
Paul Stewart | 092955c | 2017-02-06 09:13:09 -0800 | [diff] [blame] | 1213 | ifdef CONFIG_DEBUG_SYSLOG |
| 1214 | CFLAGS += -DCONFIG_DEBUG_SYSLOG |
| 1215 | endif |
| 1216 | |
Dmitry Shmidt | cce0666 | 2013-11-04 18:44:24 -0800 | [diff] [blame] | 1217 | ifdef CONFIG_DEBUG_LINUX_TRACING |
| 1218 | CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING |
| 1219 | endif |
| 1220 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1221 | ifdef CONFIG_DEBUG_FILE |
| 1222 | CFLAGS += -DCONFIG_DEBUG_FILE |
| 1223 | endif |
| 1224 | |
Dmitry Shmidt | 4530cfd | 2012-09-09 15:20:40 -0700 | [diff] [blame] | 1225 | ifdef CONFIG_SQLITE |
| 1226 | CFLAGS += -DCONFIG_SQLITE |
| 1227 | LIBS += -lsqlite3 |
| 1228 | LIBS_h += -lsqlite3 |
| 1229 | endif |
| 1230 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1231 | ifdef CONFIG_FST |
| 1232 | CFLAGS += -DCONFIG_FST |
| 1233 | OBJS += ../src/fst/fst.o |
| 1234 | OBJS += ../src/fst/fst_group.o |
| 1235 | OBJS += ../src/fst/fst_iface.o |
| 1236 | OBJS += ../src/fst/fst_session.o |
| 1237 | OBJS += ../src/fst/fst_ctrl_aux.o |
| 1238 | ifdef CONFIG_FST_TEST |
| 1239 | CFLAGS += -DCONFIG_FST_TEST |
| 1240 | endif |
| 1241 | ifndef CONFIG_NO_CTRL_IFACE |
| 1242 | OBJS += ../src/fst/fst_ctrl_iface.o |
| 1243 | endif |
| 1244 | endif |
| 1245 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 1246 | ifdef CONFIG_WEP |
| 1247 | CFLAGS += -DCONFIG_WEP |
| 1248 | endif |
| 1249 | |
Hai Shalom | b755a2a | 2020-04-23 21:49:02 -0700 | [diff] [blame] | 1250 | ifdef CONFIG_NO_TKIP |
| 1251 | CFLAGS += -DCONFIG_NO_TKIP |
| 1252 | endif |
| 1253 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1254 | ALL=hostapd hostapd_cli |
| 1255 | |
| 1256 | all: verify_config $(ALL) |
| 1257 | |
| 1258 | Q=@ |
| 1259 | E=echo |
| 1260 | ifeq ($(V), 1) |
| 1261 | Q= |
| 1262 | E=true |
| 1263 | endif |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1264 | ifeq ($(QUIET), 1) |
| 1265 | Q=@ |
| 1266 | E=true |
| 1267 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1268 | |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 1269 | ifdef CONFIG_CODE_COVERAGE |
| 1270 | %.o: %.c |
| 1271 | @$(E) " CC " $< |
| 1272 | $(Q)cd $(dir $@); $(CC) -c -o $(notdir $@) $(CFLAGS) $(notdir $<) |
| 1273 | else |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1274 | %.o: %.c |
| 1275 | $(Q)$(CC) -c -o $@ $(CFLAGS) $< |
| 1276 | @$(E) " CC " $< |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 1277 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1278 | |
| 1279 | verify_config: |
| 1280 | @if [ ! -r .config ]; then \ |
| 1281 | echo 'Building hostapd requires a configuration file'; \ |
| 1282 | echo '(.config). See README for more instructions. You can'; \ |
| 1283 | echo 'run "cp defconfig .config" to create an example'; \ |
| 1284 | echo 'configuration.'; \ |
| 1285 | exit 1; \ |
| 1286 | fi |
| 1287 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1288 | $(DESTDIR)$(BINDIR)/%: % |
| 1289 | install -D $(<) $(@) |
| 1290 | |
| 1291 | install: $(addprefix $(DESTDIR)$(BINDIR)/,$(ALL)) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1292 | |
| 1293 | ../src/drivers/build.hostapd: |
| 1294 | @if [ -f ../src/drivers/build.wpa_supplicant ]; then \ |
| 1295 | $(MAKE) -C ../src/drivers clean; \ |
| 1296 | fi |
| 1297 | @touch ../src/drivers/build.hostapd |
| 1298 | |
| 1299 | BCHECK=../src/drivers/build.hostapd |
| 1300 | |
| 1301 | hostapd: $(BCHECK) $(OBJS) |
| 1302 | $(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS) |
| 1303 | @$(E) " LD " $@ |
| 1304 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1305 | ifdef CONFIG_WPA_TRACE |
| 1306 | OBJS_c += ../src/utils/trace.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1307 | endif |
| 1308 | hostapd_cli: $(OBJS_c) |
| 1309 | $(Q)$(CC) $(LDFLAGS) -o hostapd_cli $(OBJS_c) $(LIBS_c) |
| 1310 | @$(E) " LD " $@ |
| 1311 | |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1312 | NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS) |
Dmitry Shmidt | ff787d5 | 2015-01-12 13:01:47 -0800 | [diff] [blame] | 1313 | NOBJS += ../src/utils/common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1314 | ifdef NEED_RC4 |
| 1315 | ifdef CONFIG_INTERNAL_RC4 |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1316 | ifndef CONFIG_NO_RC4 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1317 | NOBJS += ../src/crypto/rc4.o |
| 1318 | endif |
| 1319 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1320 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1321 | ifdef CONFIG_INTERNAL_MD5 |
| 1322 | NOBJS += ../src/crypto/md5-internal.o |
| 1323 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1324 | NOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o |
| 1325 | NOBJS += ../src/utils/os_$(CONFIG_OS).o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1326 | NOBJS += ../src/utils/wpa_debug.o |
| 1327 | NOBJS += ../src/utils/wpabuf.o |
| 1328 | ifdef CONFIG_WPA_TRACE |
| 1329 | NOBJS += ../src/utils/trace.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1330 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1331 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1332 | HOBJS += hlr_auc_gw.o ../src/utils/common.o ../src/utils/wpa_debug.o ../src/utils/os_$(CONFIG_OS).o ../src/utils/wpabuf.o ../src/crypto/milenage.o |
| 1333 | HOBJS += ../src/crypto/aes-encblock.o |
| 1334 | ifdef CONFIG_INTERNAL_AES |
| 1335 | HOBJS += ../src/crypto/aes-internal.o |
| 1336 | HOBJS += ../src/crypto/aes-internal-enc.o |
| 1337 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1338 | ifeq ($(CONFIG_TLS), linux) |
| 1339 | HOBJS += ../src/crypto/crypto_linux.o |
| 1340 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1341 | |
| 1342 | nt_password_hash: $(NOBJS) |
| 1343 | $(Q)$(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n) |
| 1344 | @$(E) " LD " $@ |
| 1345 | |
| 1346 | hlr_auc_gw: $(HOBJS) |
| 1347 | $(Q)$(CC) $(LDFLAGS) -o hlr_auc_gw $(HOBJS) $(LIBS_h) |
| 1348 | @$(E) " LD " $@ |
| 1349 | |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 1350 | lcov-html: |
| 1351 | lcov -c -d .. > lcov.info |
| 1352 | genhtml lcov.info --output-directory lcov-html |
| 1353 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1354 | clean: |
| 1355 | $(MAKE) -C ../src clean |
| 1356 | rm -f core *~ *.o hostapd hostapd_cli nt_password_hash hlr_auc_gw |
Dmitry Shmidt | 01904cf | 2013-12-05 11:08:35 -0800 | [diff] [blame] | 1357 | rm -f *.d *.gcno *.gcda *.gcov |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 1358 | rm -f lcov.info |
| 1359 | rm -rf lcov-html |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1360 | |
| 1361 | -include $(OBJS:%.o=%.d) |