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 |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 299 | NEED_AP_MLME=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 300 | NEED_DRAGONFLY=y |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 301 | endif |
| 302 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 303 | ifdef CONFIG_OWE |
| 304 | CFLAGS += -DCONFIG_OWE |
| 305 | NEED_ECC=y |
| 306 | NEED_HMAC_SHA256_KDF=y |
| 307 | NEED_HMAC_SHA384_KDF=y |
| 308 | NEED_HMAC_SHA512_KDF=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 309 | NEED_SHA384=y |
| 310 | NEED_SHA512=y |
| 311 | endif |
| 312 | |
Jimmy Chen | caaac07 | 2019-09-16 16:36:06 +0800 | [diff] [blame] | 313 | ifdef CONFIG_WAPI_INTERFACE |
| 314 | L_CFLAGS += -DCONFIG_WAPI_INTERFACE |
| 315 | endif |
| 316 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 317 | ifdef CONFIG_AIRTIME_POLICY |
| 318 | CFLAGS += -DCONFIG_AIRTIME_POLICY |
| 319 | OBJS += ../src/ap/airtime_policy.o |
| 320 | endif |
| 321 | |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 322 | ifdef CONFIG_FILS |
| 323 | CFLAGS += -DCONFIG_FILS |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 324 | OBJS += ../src/ap/fils_hlp.o |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 325 | NEED_SHA384=y |
| 326 | NEED_AES_SIV=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 327 | ifdef CONFIG_FILS_SK_PFS |
| 328 | CFLAGS += -DCONFIG_FILS_SK_PFS |
| 329 | NEED_ECC=y |
| 330 | endif |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 331 | endif |
| 332 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 333 | ifdef CONFIG_WNM |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 334 | CFLAGS += -DCONFIG_WNM -DCONFIG_WNM_AP |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 335 | OBJS += ../src/ap/wnm_ap.o |
| 336 | endif |
| 337 | |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 338 | ifdef CONFIG_IEEE80211AC |
| 339 | CFLAGS += -DCONFIG_IEEE80211AC |
| 340 | endif |
| 341 | |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 342 | ifdef CONFIG_IEEE80211AX |
| 343 | CFLAGS += -DCONFIG_IEEE80211AX |
| 344 | OBJS += ../src/ap/ieee802_11_he.o |
| 345 | endif |
| 346 | |
Dmitry Shmidt | 57c2d39 | 2016-02-23 13:40:19 -0800 | [diff] [blame] | 347 | ifdef CONFIG_MBO |
| 348 | CFLAGS += -DCONFIG_MBO |
| 349 | OBJS += ../src/ap/mbo_ap.o |
| 350 | endif |
| 351 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 352 | include ../src/drivers/drivers.mak |
| 353 | OBJS += $(DRV_AP_OBJS) |
| 354 | CFLAGS += $(DRV_AP_CFLAGS) |
| 355 | LDFLAGS += $(DRV_AP_LDFLAGS) |
| 356 | LIBS += $(DRV_AP_LIBS) |
| 357 | |
| 358 | ifdef CONFIG_L2_PACKET |
| 359 | ifdef CONFIG_DNET_PCAP |
| 360 | ifdef CONFIG_L2_FREEBSD |
| 361 | LIBS += -lpcap |
| 362 | OBJS += ../src/l2_packet/l2_packet_freebsd.o |
| 363 | else |
| 364 | LIBS += -ldnet -lpcap |
| 365 | OBJS += ../src/l2_packet/l2_packet_pcap.o |
| 366 | endif |
| 367 | else |
| 368 | OBJS += ../src/l2_packet/l2_packet_linux.o |
| 369 | endif |
| 370 | else |
| 371 | OBJS += ../src/l2_packet/l2_packet_none.o |
| 372 | endif |
| 373 | |
| 374 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 375 | ifdef CONFIG_ERP |
| 376 | CFLAGS += -DCONFIG_ERP |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 377 | NEED_HMAC_SHA256_KDF=y |
| 378 | endif |
| 379 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 380 | ifdef CONFIG_EAP_MD5 |
| 381 | CFLAGS += -DEAP_SERVER_MD5 |
| 382 | OBJS += ../src/eap_server/eap_server_md5.o |
| 383 | CHAP=y |
| 384 | endif |
| 385 | |
| 386 | ifdef CONFIG_EAP_TLS |
| 387 | CFLAGS += -DEAP_SERVER_TLS |
| 388 | OBJS += ../src/eap_server/eap_server_tls.o |
| 389 | TLS_FUNCS=y |
| 390 | endif |
| 391 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 392 | ifdef CONFIG_EAP_UNAUTH_TLS |
| 393 | CFLAGS += -DEAP_SERVER_UNAUTH_TLS |
| 394 | ifndef CONFIG_EAP_TLS |
| 395 | OBJS += ../src/eap_server/eap_server_tls.o |
| 396 | TLS_FUNCS=y |
| 397 | endif |
| 398 | endif |
| 399 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 400 | ifdef CONFIG_EAP_PEAP |
| 401 | CFLAGS += -DEAP_SERVER_PEAP |
| 402 | OBJS += ../src/eap_server/eap_server_peap.o |
| 403 | OBJS += ../src/eap_common/eap_peap_common.o |
| 404 | TLS_FUNCS=y |
| 405 | CONFIG_EAP_MSCHAPV2=y |
| 406 | endif |
| 407 | |
| 408 | ifdef CONFIG_EAP_TTLS |
| 409 | CFLAGS += -DEAP_SERVER_TTLS |
| 410 | OBJS += ../src/eap_server/eap_server_ttls.o |
| 411 | TLS_FUNCS=y |
| 412 | CHAP=y |
| 413 | endif |
| 414 | |
| 415 | ifdef CONFIG_EAP_MSCHAPV2 |
| 416 | CFLAGS += -DEAP_SERVER_MSCHAPV2 |
| 417 | OBJS += ../src/eap_server/eap_server_mschapv2.o |
| 418 | MS_FUNCS=y |
| 419 | endif |
| 420 | |
| 421 | ifdef CONFIG_EAP_GTC |
| 422 | CFLAGS += -DEAP_SERVER_GTC |
| 423 | OBJS += ../src/eap_server/eap_server_gtc.o |
| 424 | endif |
| 425 | |
| 426 | ifdef CONFIG_EAP_SIM |
| 427 | CFLAGS += -DEAP_SERVER_SIM |
| 428 | OBJS += ../src/eap_server/eap_server_sim.o |
| 429 | CONFIG_EAP_SIM_COMMON=y |
| 430 | NEED_AES_CBC=y |
| 431 | endif |
| 432 | |
| 433 | ifdef CONFIG_EAP_AKA |
| 434 | CFLAGS += -DEAP_SERVER_AKA |
| 435 | OBJS += ../src/eap_server/eap_server_aka.o |
| 436 | CONFIG_EAP_SIM_COMMON=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 437 | NEED_AES_CBC=y |
| 438 | endif |
| 439 | |
| 440 | ifdef CONFIG_EAP_AKA_PRIME |
| 441 | CFLAGS += -DEAP_SERVER_AKA_PRIME |
| 442 | endif |
| 443 | |
| 444 | ifdef CONFIG_EAP_SIM_COMMON |
| 445 | OBJS += ../src/eap_common/eap_sim_common.o |
| 446 | # Example EAP-SIM/AKA interface for GSM/UMTS authentication. This can be |
| 447 | # replaced with another file implementating the interface specified in |
| 448 | # eap_sim_db.h. |
| 449 | OBJS += ../src/eap_server/eap_sim_db.o |
| 450 | NEED_FIPS186_2_PRF=y |
| 451 | endif |
| 452 | |
| 453 | ifdef CONFIG_EAP_PAX |
| 454 | CFLAGS += -DEAP_SERVER_PAX |
| 455 | OBJS += ../src/eap_server/eap_server_pax.o ../src/eap_common/eap_pax_common.o |
| 456 | endif |
| 457 | |
| 458 | ifdef CONFIG_EAP_PSK |
| 459 | CFLAGS += -DEAP_SERVER_PSK |
| 460 | 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] | 461 | NEED_AES_ENCBLOCK=y |
| 462 | NEED_AES_EAX=y |
| 463 | endif |
| 464 | |
| 465 | ifdef CONFIG_EAP_SAKE |
| 466 | CFLAGS += -DEAP_SERVER_SAKE |
| 467 | OBJS += ../src/eap_server/eap_server_sake.o ../src/eap_common/eap_sake_common.o |
| 468 | endif |
| 469 | |
| 470 | ifdef CONFIG_EAP_GPSK |
| 471 | CFLAGS += -DEAP_SERVER_GPSK |
| 472 | OBJS += ../src/eap_server/eap_server_gpsk.o ../src/eap_common/eap_gpsk_common.o |
| 473 | ifdef CONFIG_EAP_GPSK_SHA256 |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 474 | CFLAGS += -DEAP_GPSK_SHA256 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 475 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 476 | endif |
| 477 | |
| 478 | ifdef CONFIG_EAP_PWD |
| 479 | CFLAGS += -DEAP_SERVER_PWD |
| 480 | 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] | 481 | NEED_ECC=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 482 | NEED_DRAGONFLY=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 483 | endif |
| 484 | |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 485 | ifdef CONFIG_EAP_EKE |
| 486 | CFLAGS += -DEAP_SERVER_EKE |
| 487 | OBJS += ../src/eap_server/eap_server_eke.o ../src/eap_common/eap_eke_common.o |
| 488 | NEED_DH_GROUPS=y |
| 489 | NEED_DH_GROUPS_ALL=y |
| 490 | endif |
| 491 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 492 | ifdef CONFIG_EAP_VENDOR_TEST |
| 493 | CFLAGS += -DEAP_SERVER_VENDOR_TEST |
| 494 | OBJS += ../src/eap_server/eap_server_vendor_test.o |
| 495 | endif |
| 496 | |
| 497 | ifdef CONFIG_EAP_FAST |
| 498 | CFLAGS += -DEAP_SERVER_FAST |
| 499 | OBJS += ../src/eap_server/eap_server_fast.o |
| 500 | OBJS += ../src/eap_common/eap_fast_common.o |
| 501 | TLS_FUNCS=y |
| 502 | NEED_T_PRF=y |
| 503 | NEED_AES_UNWRAP=y |
| 504 | endif |
| 505 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 506 | ifdef CONFIG_EAP_TEAP |
| 507 | CFLAGS += -DEAP_SERVER_TEAP |
| 508 | OBJS += ../src/eap_server/eap_server_teap.o |
| 509 | OBJS += ../src/eap_common/eap_teap_common.o |
| 510 | TLS_FUNCS=y |
| 511 | NEED_T_PRF=y |
| 512 | NEED_SHA384=y |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 513 | NEED_TLS_PRF_SHA256=y |
| 514 | NEED_TLS_PRF_SHA384=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 515 | NEED_AES_UNWRAP=y |
| 516 | endif |
| 517 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 518 | ifdef CONFIG_WPS |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 519 | CFLAGS += -DCONFIG_WPS -DEAP_SERVER_WSC |
| 520 | OBJS += ../src/utils/uuid.o |
| 521 | OBJS += ../src/ap/wps_hostapd.o |
| 522 | OBJS += ../src/eap_server/eap_server_wsc.o ../src/eap_common/eap_wsc_common.o |
| 523 | OBJS += ../src/wps/wps.o |
| 524 | OBJS += ../src/wps/wps_common.o |
| 525 | OBJS += ../src/wps/wps_attr_parse.o |
| 526 | OBJS += ../src/wps/wps_attr_build.o |
| 527 | OBJS += ../src/wps/wps_attr_process.o |
| 528 | OBJS += ../src/wps/wps_dev_attr.o |
| 529 | OBJS += ../src/wps/wps_enrollee.o |
| 530 | OBJS += ../src/wps/wps_registrar.o |
| 531 | NEED_DH_GROUPS=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 532 | NEED_BASE64=y |
| 533 | NEED_AES_CBC=y |
| 534 | NEED_MODEXP=y |
| 535 | CONFIG_EAP=y |
| 536 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 537 | ifdef CONFIG_WPS_NFC |
| 538 | CFLAGS += -DCONFIG_WPS_NFC |
| 539 | OBJS += ../src/wps/ndef.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 540 | NEED_WPS_OOB=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 541 | endif |
| 542 | |
| 543 | ifdef NEED_WPS_OOB |
| 544 | CFLAGS += -DCONFIG_WPS_OOB |
| 545 | endif |
| 546 | |
| 547 | ifdef CONFIG_WPS_UPNP |
| 548 | CFLAGS += -DCONFIG_WPS_UPNP |
| 549 | OBJS += ../src/wps/wps_upnp.o |
| 550 | OBJS += ../src/wps/wps_upnp_ssdp.o |
| 551 | OBJS += ../src/wps/wps_upnp_web.o |
| 552 | OBJS += ../src/wps/wps_upnp_event.o |
| 553 | OBJS += ../src/wps/wps_upnp_ap.o |
| 554 | OBJS += ../src/wps/upnp_xml.o |
| 555 | OBJS += ../src/wps/httpread.o |
| 556 | OBJS += ../src/wps/http_client.o |
| 557 | OBJS += ../src/wps/http_server.o |
| 558 | endif |
| 559 | |
| 560 | ifdef CONFIG_WPS_STRICT |
| 561 | CFLAGS += -DCONFIG_WPS_STRICT |
| 562 | OBJS += ../src/wps/wps_validate.o |
| 563 | endif |
| 564 | |
| 565 | ifdef CONFIG_WPS_TESTING |
| 566 | CFLAGS += -DCONFIG_WPS_TESTING |
| 567 | endif |
| 568 | |
| 569 | endif |
| 570 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 571 | ifdef CONFIG_DPP |
| 572 | CFLAGS += -DCONFIG_DPP |
| 573 | OBJS += ../src/common/dpp.o |
| 574 | OBJS += ../src/ap/dpp_hostapd.o |
| 575 | OBJS += ../src/ap/gas_query_ap.o |
| 576 | NEED_AES_SIV=y |
| 577 | NEED_HMAC_SHA256_KDF=y |
| 578 | NEED_HMAC_SHA384_KDF=y |
| 579 | NEED_HMAC_SHA512_KDF=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 580 | NEED_SHA384=y |
| 581 | NEED_SHA512=y |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 582 | NEED_ECC=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 583 | NEED_JSON=y |
| 584 | NEED_GAS=y |
| 585 | NEED_BASE64=y |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 586 | NEED_ASN1=y |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 587 | ifdef CONFIG_DPP2 |
| 588 | CFLAGS += -DCONFIG_DPP2 |
| 589 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 590 | endif |
| 591 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 592 | ifdef CONFIG_EAP_IKEV2 |
| 593 | CFLAGS += -DEAP_SERVER_IKEV2 |
| 594 | OBJS += ../src/eap_server/eap_server_ikev2.o ../src/eap_server/ikev2.o |
| 595 | OBJS += ../src/eap_common/eap_ikev2_common.o ../src/eap_common/ikev2_common.o |
| 596 | NEED_DH_GROUPS=y |
| 597 | NEED_DH_GROUPS_ALL=y |
| 598 | NEED_MODEXP=y |
| 599 | NEED_CIPHER=y |
| 600 | endif |
| 601 | |
| 602 | ifdef CONFIG_EAP_TNC |
| 603 | CFLAGS += -DEAP_SERVER_TNC |
| 604 | OBJS += ../src/eap_server/eap_server_tnc.o |
| 605 | OBJS += ../src/eap_server/tncs.o |
| 606 | NEED_BASE64=y |
| 607 | ifndef CONFIG_DRIVER_BSD |
| 608 | LIBS += -ldl |
| 609 | endif |
| 610 | endif |
| 611 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 612 | ifdef CONFIG_MACSEC |
| 613 | CFLAGS += -DCONFIG_MACSEC |
| 614 | OBJS += ../src/ap/wpa_auth_kay.o |
| 615 | OBJS += ../src/pae/ieee802_1x_cp.o |
| 616 | OBJS += ../src/pae/ieee802_1x_kay.o |
| 617 | OBJS += ../src/pae/ieee802_1x_key.o |
| 618 | OBJS += ../src/pae/ieee802_1x_secy_ops.o |
| 619 | endif |
| 620 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 621 | # Basic EAP functionality is needed for EAPOL |
| 622 | OBJS += eap_register.o |
| 623 | OBJS += ../src/eap_server/eap_server.o |
| 624 | OBJS += ../src/eap_common/eap_common.o |
| 625 | OBJS += ../src/eap_server/eap_server_methods.o |
| 626 | OBJS += ../src/eap_server/eap_server_identity.o |
| 627 | CFLAGS += -DEAP_SERVER_IDENTITY |
| 628 | |
| 629 | ifdef CONFIG_EAP |
| 630 | CFLAGS += -DEAP_SERVER |
| 631 | endif |
| 632 | |
| 633 | ifdef CONFIG_PKCS12 |
| 634 | CFLAGS += -DPKCS12_FUNCS |
| 635 | endif |
| 636 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 637 | ifdef NEED_DRAGONFLY |
| 638 | OBJS += ../src/common/dragonfly.o |
| 639 | endif |
| 640 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 641 | ifdef MS_FUNCS |
| 642 | OBJS += ../src/crypto/ms_funcs.o |
| 643 | NEED_DES=y |
| 644 | NEED_MD4=y |
| 645 | endif |
| 646 | |
| 647 | ifdef CHAP |
| 648 | OBJS += ../src/eap_common/chap.o |
| 649 | endif |
| 650 | |
| 651 | ifdef TLS_FUNCS |
| 652 | NEED_DES=y |
| 653 | # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, and EAP_TTLS) |
| 654 | CFLAGS += -DEAP_TLS_FUNCS |
| 655 | OBJS += ../src/eap_server/eap_server_tls_common.o |
| 656 | NEED_TLS_PRF=y |
| 657 | endif |
| 658 | |
| 659 | ifndef CONFIG_TLS |
| 660 | CONFIG_TLS=openssl |
| 661 | endif |
| 662 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 663 | ifdef CONFIG_TLSV11 |
| 664 | CFLAGS += -DCONFIG_TLSV11 |
| 665 | endif |
| 666 | |
| 667 | ifdef CONFIG_TLSV12 |
| 668 | CFLAGS += -DCONFIG_TLSV12 |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 669 | endif |
| 670 | |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 671 | ifeq ($(CONFIG_TLS), wolfssl) |
| 672 | CONFIG_CRYPTO=wolfssl |
| 673 | ifdef TLS_FUNCS |
| 674 | OBJS += ../src/crypto/tls_wolfssl.o |
| 675 | LIBS += -lwolfssl -lm |
| 676 | endif |
| 677 | OBJS += ../src/crypto/crypto_wolfssl.o |
| 678 | HOBJS += ../src/crypto/crypto_wolfssl.o |
| 679 | ifdef NEED_FIPS186_2_PRF |
| 680 | OBJS += ../src/crypto/fips_prf_wolfssl.o |
| 681 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 682 | NEED_TLS_PRF_SHA256=y |
| 683 | LIBS += -lwolfssl -lm |
| 684 | LIBS_h += -lwolfssl -lm |
| 685 | ifdef CONFIG_TLS_ADD_DL |
| 686 | LIBS += -ldl |
| 687 | LIBS_h += -ldl |
| 688 | endif |
| 689 | endif |
| 690 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 691 | ifeq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 692 | CONFIG_CRYPTO=openssl |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 693 | ifdef TLS_FUNCS |
| 694 | OBJS += ../src/crypto/tls_openssl.o |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 695 | OBJS += ../src/crypto/tls_openssl_ocsp.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 696 | LIBS += -lssl |
| 697 | endif |
| 698 | OBJS += ../src/crypto/crypto_openssl.o |
| 699 | HOBJS += ../src/crypto/crypto_openssl.o |
| 700 | ifdef NEED_FIPS186_2_PRF |
| 701 | OBJS += ../src/crypto/fips_prf_openssl.o |
| 702 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 703 | NEED_TLS_PRF_SHA256=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 704 | LIBS += -lcrypto |
| 705 | LIBS_h += -lcrypto |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 706 | LIBS_n += -lcrypto |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 707 | ifdef CONFIG_TLS_ADD_DL |
| 708 | LIBS += -ldl |
| 709 | LIBS_h += -ldl |
| 710 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 711 | ifndef CONFIG_TLS_DEFAULT_CIPHERS |
| 712 | CONFIG_TLS_DEFAULT_CIPHERS = "DEFAULT:!EXP:!LOW" |
| 713 | endif |
| 714 | CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\" |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 715 | endif |
| 716 | |
| 717 | ifeq ($(CONFIG_TLS), gnutls) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 718 | ifndef CONFIG_CRYPTO |
| 719 | # default to libgcrypt |
| 720 | CONFIG_CRYPTO=gnutls |
| 721 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 722 | ifdef TLS_FUNCS |
| 723 | OBJS += ../src/crypto/tls_gnutls.o |
| 724 | LIBS += -lgnutls -lgpg-error |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 725 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 726 | OBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o |
| 727 | HOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 728 | ifdef NEED_FIPS186_2_PRF |
Dmitry Shmidt | 9866086 | 2014-03-11 17:26:21 -0700 | [diff] [blame] | 729 | OBJS += ../src/crypto/fips_prf_internal.o |
| 730 | SHA1OBJS += ../src/crypto/sha1-internal.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 731 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 732 | ifeq ($(CONFIG_CRYPTO), gnutls) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 733 | LIBS += -lgcrypt |
| 734 | LIBS_h += -lgcrypt |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 735 | LIBS_n += -lgcrypt |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 736 | CONFIG_INTERNAL_RC4=y |
| 737 | CONFIG_INTERNAL_DH_GROUP5=y |
| 738 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 739 | ifeq ($(CONFIG_CRYPTO), nettle) |
| 740 | LIBS += -lnettle -lgmp |
| 741 | LIBS_p += -lnettle -lgmp |
| 742 | CONFIG_INTERNAL_RC4=y |
| 743 | CONFIG_INTERNAL_DH_GROUP5=y |
| 744 | endif |
| 745 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 746 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 747 | ifeq ($(CONFIG_TLS), internal) |
| 748 | ifndef CONFIG_CRYPTO |
| 749 | CONFIG_CRYPTO=internal |
| 750 | endif |
| 751 | ifdef TLS_FUNCS |
| 752 | OBJS += ../src/crypto/crypto_internal-rsa.o |
| 753 | OBJS += ../src/crypto/tls_internal.o |
| 754 | OBJS += ../src/tls/tlsv1_common.o |
| 755 | OBJS += ../src/tls/tlsv1_record.o |
| 756 | OBJS += ../src/tls/tlsv1_cred.o |
| 757 | OBJS += ../src/tls/tlsv1_server.o |
| 758 | OBJS += ../src/tls/tlsv1_server_write.o |
| 759 | OBJS += ../src/tls/tlsv1_server_read.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 760 | OBJS += ../src/tls/rsa.o |
| 761 | OBJS += ../src/tls/x509v3.o |
| 762 | OBJS += ../src/tls/pkcs1.o |
| 763 | OBJS += ../src/tls/pkcs5.o |
| 764 | OBJS += ../src/tls/pkcs8.o |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 765 | NEED_ASN1=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 766 | NEED_BASE64=y |
| 767 | NEED_TLS_PRF=y |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 768 | ifdef CONFIG_TLSV12 |
| 769 | NEED_TLS_PRF_SHA256=y |
| 770 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 771 | NEED_MODEXP=y |
| 772 | NEED_CIPHER=y |
| 773 | CFLAGS += -DCONFIG_TLS_INTERNAL |
| 774 | CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER |
| 775 | endif |
| 776 | ifdef NEED_CIPHER |
| 777 | NEED_DES=y |
| 778 | OBJS += ../src/crypto/crypto_internal-cipher.o |
| 779 | endif |
| 780 | ifdef NEED_MODEXP |
| 781 | OBJS += ../src/crypto/crypto_internal-modexp.o |
| 782 | OBJS += ../src/tls/bignum.o |
| 783 | endif |
| 784 | ifeq ($(CONFIG_CRYPTO), libtomcrypt) |
| 785 | OBJS += ../src/crypto/crypto_libtomcrypt.o |
| 786 | LIBS += -ltomcrypt -ltfm |
| 787 | LIBS_h += -ltomcrypt -ltfm |
| 788 | CONFIG_INTERNAL_SHA256=y |
| 789 | CONFIG_INTERNAL_RC4=y |
| 790 | CONFIG_INTERNAL_DH_GROUP5=y |
| 791 | endif |
| 792 | ifeq ($(CONFIG_CRYPTO), internal) |
| 793 | OBJS += ../src/crypto/crypto_internal.o |
| 794 | NEED_AES_DEC=y |
| 795 | CFLAGS += -DCONFIG_CRYPTO_INTERNAL |
| 796 | ifdef CONFIG_INTERNAL_LIBTOMMATH |
| 797 | CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH |
| 798 | ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST |
| 799 | CFLAGS += -DLTM_FAST |
| 800 | endif |
| 801 | else |
| 802 | LIBS += -ltommath |
| 803 | LIBS_h += -ltommath |
| 804 | endif |
| 805 | CONFIG_INTERNAL_AES=y |
| 806 | CONFIG_INTERNAL_DES=y |
| 807 | CONFIG_INTERNAL_SHA1=y |
| 808 | CONFIG_INTERNAL_MD4=y |
| 809 | CONFIG_INTERNAL_MD5=y |
| 810 | CONFIG_INTERNAL_SHA256=y |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 811 | CONFIG_INTERNAL_SHA384=y |
| 812 | CONFIG_INTERNAL_SHA512=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 813 | CONFIG_INTERNAL_RC4=y |
| 814 | CONFIG_INTERNAL_DH_GROUP5=y |
| 815 | endif |
| 816 | ifeq ($(CONFIG_CRYPTO), cryptoapi) |
| 817 | OBJS += ../src/crypto/crypto_cryptoapi.o |
| 818 | OBJS_p += ../src/crypto/crypto_cryptoapi.o |
| 819 | CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI |
| 820 | CONFIG_INTERNAL_SHA256=y |
| 821 | CONFIG_INTERNAL_RC4=y |
| 822 | endif |
| 823 | endif |
| 824 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 825 | ifeq ($(CONFIG_TLS), linux) |
| 826 | OBJS += ../src/crypto/crypto_linux.o |
| 827 | ifdef TLS_FUNCS |
| 828 | OBJS += ../src/crypto/crypto_internal-rsa.o |
| 829 | OBJS += ../src/crypto/tls_internal.o |
| 830 | OBJS += ../src/tls/tlsv1_common.o |
| 831 | OBJS += ../src/tls/tlsv1_record.o |
| 832 | OBJS += ../src/tls/tlsv1_cred.o |
| 833 | OBJS += ../src/tls/tlsv1_server.o |
| 834 | OBJS += ../src/tls/tlsv1_server_write.o |
| 835 | OBJS += ../src/tls/tlsv1_server_read.o |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 836 | OBJS += ../src/tls/rsa.o |
| 837 | OBJS += ../src/tls/x509v3.o |
| 838 | OBJS += ../src/tls/pkcs1.o |
| 839 | OBJS += ../src/tls/pkcs5.o |
| 840 | OBJS += ../src/tls/pkcs8.o |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 841 | NEED_ASN1=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 842 | NEED_BASE64=y |
| 843 | NEED_TLS_PRF=y |
| 844 | ifdef CONFIG_TLSV12 |
| 845 | NEED_TLS_PRF_SHA256=y |
| 846 | endif |
| 847 | NEED_MODEXP=y |
| 848 | NEED_CIPHER=y |
| 849 | CFLAGS += -DCONFIG_TLS_INTERNAL |
| 850 | CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER |
| 851 | endif |
| 852 | ifdef NEED_MODEXP |
| 853 | OBJS += ../src/crypto/crypto_internal-modexp.o |
| 854 | OBJS += ../src/tls/bignum.o |
| 855 | CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH |
| 856 | CFLAGS += -DLTM_FAST |
| 857 | endif |
| 858 | CONFIG_INTERNAL_DH_GROUP5=y |
| 859 | ifdef NEED_FIPS186_2_PRF |
| 860 | OBJS += ../src/crypto/fips_prf_internal.o |
| 861 | OBJS += ../src/crypto/sha1-internal.o |
| 862 | endif |
| 863 | endif |
| 864 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 865 | ifeq ($(CONFIG_TLS), none) |
| 866 | ifdef TLS_FUNCS |
| 867 | OBJS += ../src/crypto/tls_none.o |
| 868 | CFLAGS += -DEAP_TLS_NONE |
| 869 | CONFIG_INTERNAL_AES=y |
| 870 | CONFIG_INTERNAL_SHA1=y |
| 871 | CONFIG_INTERNAL_MD5=y |
| 872 | endif |
| 873 | OBJS += ../src/crypto/crypto_none.o |
| 874 | OBJS_p += ../src/crypto/crypto_none.o |
| 875 | CONFIG_INTERNAL_SHA256=y |
| 876 | CONFIG_INTERNAL_RC4=y |
| 877 | endif |
| 878 | |
| 879 | ifndef TLS_FUNCS |
| 880 | OBJS += ../src/crypto/tls_none.o |
| 881 | ifeq ($(CONFIG_TLS), internal) |
| 882 | CONFIG_INTERNAL_AES=y |
| 883 | CONFIG_INTERNAL_SHA1=y |
| 884 | CONFIG_INTERNAL_MD5=y |
| 885 | CONFIG_INTERNAL_RC4=y |
| 886 | endif |
| 887 | endif |
| 888 | |
| 889 | AESOBJS = # none so far |
| 890 | ifdef CONFIG_INTERNAL_AES |
| 891 | AESOBJS += ../src/crypto/aes-internal.o ../src/crypto/aes-internal-enc.o |
| 892 | endif |
| 893 | |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 894 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 895 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 896 | AESOBJS += ../src/crypto/aes-wrap.o |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 897 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 898 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 899 | ifdef NEED_AES_EAX |
| 900 | AESOBJS += ../src/crypto/aes-eax.o |
| 901 | NEED_AES_CTR=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 902 | endif |
| 903 | ifdef NEED_AES_SIV |
| 904 | AESOBJS += ../src/crypto/aes-siv.o |
| 905 | NEED_AES_CTR=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 906 | endif |
| 907 | ifdef NEED_AES_CTR |
| 908 | AESOBJS += ../src/crypto/aes-ctr.o |
| 909 | endif |
| 910 | ifdef NEED_AES_ENCBLOCK |
| 911 | AESOBJS += ../src/crypto/aes-encblock.o |
| 912 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 913 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 914 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 915 | AESOBJS += ../src/crypto/aes-omac1.o |
| 916 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 917 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 918 | ifdef NEED_AES_UNWRAP |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 919 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 920 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 921 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 922 | NEED_AES_DEC=y |
| 923 | AESOBJS += ../src/crypto/aes-unwrap.o |
| 924 | endif |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 925 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 926 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 927 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 928 | ifdef NEED_AES_CBC |
| 929 | NEED_AES_DEC=y |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 930 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 931 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 932 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 933 | AESOBJS += ../src/crypto/aes-cbc.o |
| 934 | endif |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 935 | endif |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 936 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 937 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 938 | ifdef NEED_AES_DEC |
| 939 | ifdef CONFIG_INTERNAL_AES |
| 940 | AESOBJS += ../src/crypto/aes-internal-dec.o |
| 941 | endif |
| 942 | endif |
| 943 | ifdef NEED_AES |
| 944 | OBJS += $(AESOBJS) |
| 945 | endif |
| 946 | |
| 947 | ifdef NEED_SHA1 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 948 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 949 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 950 | ifneq ($(CONFIG_TLS), gnutls) |
| 951 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 952 | SHA1OBJS += ../src/crypto/sha1.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 953 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 954 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 955 | endif |
| 956 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 957 | SHA1OBJS += ../src/crypto/sha1-prf.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 958 | ifdef CONFIG_INTERNAL_SHA1 |
| 959 | SHA1OBJS += ../src/crypto/sha1-internal.o |
| 960 | ifdef NEED_FIPS186_2_PRF |
| 961 | SHA1OBJS += ../src/crypto/fips_prf_internal.o |
| 962 | endif |
| 963 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 964 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 965 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 966 | SHA1OBJS += ../src/crypto/sha1-pbkdf2.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 967 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 968 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 969 | ifdef NEED_T_PRF |
| 970 | SHA1OBJS += ../src/crypto/sha1-tprf.o |
| 971 | endif |
| 972 | ifdef NEED_TLS_PRF |
| 973 | SHA1OBJS += ../src/crypto/sha1-tlsprf.o |
| 974 | endif |
| 975 | endif |
| 976 | |
| 977 | ifdef NEED_SHA1 |
| 978 | OBJS += $(SHA1OBJS) |
| 979 | endif |
| 980 | |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 981 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 982 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 983 | ifneq ($(CONFIG_TLS), gnutls) |
| 984 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 985 | OBJS += ../src/crypto/md5.o |
| 986 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 987 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 988 | endif |
| 989 | endif |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 990 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 991 | ifdef NEED_MD5 |
| 992 | ifdef CONFIG_INTERNAL_MD5 |
| 993 | OBJS += ../src/crypto/md5-internal.o |
| 994 | HOBJS += ../src/crypto/md5-internal.o |
| 995 | endif |
| 996 | endif |
| 997 | |
| 998 | ifdef NEED_MD4 |
| 999 | ifdef CONFIG_INTERNAL_MD4 |
| 1000 | OBJS += ../src/crypto/md4-internal.o |
| 1001 | endif |
| 1002 | endif |
| 1003 | |
| 1004 | ifdef NEED_DES |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1005 | CFLAGS += -DCONFIG_DES |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1006 | ifdef CONFIG_INTERNAL_DES |
| 1007 | OBJS += ../src/crypto/des-internal.o |
| 1008 | endif |
| 1009 | endif |
| 1010 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1011 | ifdef CONFIG_NO_RC4 |
| 1012 | CFLAGS += -DCONFIG_NO_RC4 |
| 1013 | endif |
| 1014 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1015 | ifdef NEED_RC4 |
| 1016 | ifdef CONFIG_INTERNAL_RC4 |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1017 | ifndef CONFIG_NO_RC4 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1018 | OBJS += ../src/crypto/rc4.o |
| 1019 | endif |
| 1020 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1021 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1022 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1023 | CFLAGS += -DCONFIG_SHA256 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1024 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1025 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1026 | ifneq ($(CONFIG_TLS), gnutls) |
| 1027 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1028 | OBJS += ../src/crypto/sha256.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1029 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1030 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1031 | endif |
| 1032 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1033 | OBJS += ../src/crypto/sha256-prf.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1034 | ifdef CONFIG_INTERNAL_SHA256 |
| 1035 | OBJS += ../src/crypto/sha256-internal.o |
| 1036 | endif |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1037 | ifdef NEED_TLS_PRF_SHA256 |
| 1038 | OBJS += ../src/crypto/sha256-tlsprf.o |
| 1039 | endif |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 1040 | ifdef NEED_TLS_PRF_SHA384 |
| 1041 | OBJS += ../src/crypto/sha384-tlsprf.o |
| 1042 | endif |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1043 | ifdef NEED_HMAC_SHA256_KDF |
| 1044 | OBJS += ../src/crypto/sha256-kdf.o |
| 1045 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1046 | ifdef NEED_HMAC_SHA384_KDF |
| 1047 | OBJS += ../src/crypto/sha384-kdf.o |
| 1048 | endif |
| 1049 | ifdef NEED_HMAC_SHA512_KDF |
| 1050 | OBJS += ../src/crypto/sha512-kdf.o |
| 1051 | endif |
Dmitry Shmidt | 807291d | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 1052 | ifdef NEED_SHA384 |
| 1053 | CFLAGS += -DCONFIG_SHA384 |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1054 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1055 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1056 | ifneq ($(CONFIG_TLS), gnutls) |
| 1057 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1058 | OBJS += ../src/crypto/sha384.o |
| 1059 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1060 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1061 | endif |
| 1062 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1063 | OBJS += ../src/crypto/sha384-prf.o |
Dmitry Shmidt | 807291d | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 1064 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1065 | ifdef NEED_SHA512 |
| 1066 | CFLAGS += -DCONFIG_SHA512 |
| 1067 | ifneq ($(CONFIG_TLS), openssl) |
| 1068 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1069 | ifneq ($(CONFIG_TLS), gnutls) |
| 1070 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1071 | OBJS += ../src/crypto/sha512.o |
| 1072 | endif |
| 1073 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1074 | endif |
| 1075 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1076 | OBJS += ../src/crypto/sha512-prf.o |
| 1077 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1078 | |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 1079 | ifdef CONFIG_INTERNAL_SHA384 |
| 1080 | CFLAGS += -DCONFIG_INTERNAL_SHA384 |
| 1081 | OBJS += ../src/crypto/sha384-internal.o |
| 1082 | endif |
| 1083 | |
| 1084 | ifdef CONFIG_INTERNAL_SHA512 |
| 1085 | CFLAGS += -DCONFIG_INTERNAL_SHA512 |
| 1086 | OBJS += ../src/crypto/sha512-internal.o |
| 1087 | endif |
| 1088 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 1089 | ifdef NEED_ASN1 |
| 1090 | OBJS += ../src/tls/asn1.o |
| 1091 | endif |
| 1092 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1093 | ifdef NEED_DH_GROUPS |
| 1094 | OBJS += ../src/crypto/dh_groups.o |
| 1095 | endif |
| 1096 | ifdef NEED_DH_GROUPS_ALL |
| 1097 | CFLAGS += -DALL_DH_GROUPS |
| 1098 | endif |
| 1099 | ifdef CONFIG_INTERNAL_DH_GROUP5 |
| 1100 | ifdef NEED_DH_GROUPS |
| 1101 | OBJS += ../src/crypto/dh_group5.o |
| 1102 | endif |
| 1103 | endif |
| 1104 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 1105 | ifdef NEED_ECC |
| 1106 | CFLAGS += -DCONFIG_ECC |
| 1107 | endif |
| 1108 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1109 | ifdef CONFIG_NO_RANDOM_POOL |
| 1110 | CFLAGS += -DCONFIG_NO_RANDOM_POOL |
| 1111 | else |
Hai Shalom | 74f70d4 | 2019-02-11 14:42:39 -0800 | [diff] [blame] | 1112 | ifdef CONFIG_GETRANDOM |
| 1113 | CFLAGS += -DCONFIG_GETRANDOM |
| 1114 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1115 | OBJS += ../src/crypto/random.o |
| 1116 | HOBJS += ../src/crypto/random.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1117 | HOBJS += ../src/utils/eloop.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1118 | HOBJS += $(SHA1OBJS) |
Dmitry Shmidt | dda10c2 | 2015-03-24 16:05:01 -0700 | [diff] [blame] | 1119 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1120 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1121 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1122 | HOBJS += ../src/crypto/md5.o |
| 1123 | endif |
Dmitry Shmidt | dda10c2 | 2015-03-24 16:05:01 -0700 | [diff] [blame] | 1124 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1125 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1126 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1127 | |
| 1128 | ifdef CONFIG_RADIUS_SERVER |
| 1129 | CFLAGS += -DRADIUS_SERVER |
| 1130 | OBJS += ../src/radius/radius_server.o |
| 1131 | endif |
| 1132 | |
| 1133 | ifdef CONFIG_IPV6 |
| 1134 | CFLAGS += -DCONFIG_IPV6 |
| 1135 | endif |
| 1136 | |
| 1137 | ifdef CONFIG_DRIVER_RADIUS_ACL |
| 1138 | CFLAGS += -DCONFIG_DRIVER_RADIUS_ACL |
| 1139 | endif |
| 1140 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1141 | ifdef NEED_BASE64 |
| 1142 | OBJS += ../src/utils/base64.o |
| 1143 | endif |
| 1144 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1145 | ifdef NEED_JSON |
| 1146 | OBJS += ../src/utils/json.o |
| 1147 | CFLAGS += -DCONFIG_JSON |
| 1148 | endif |
| 1149 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1150 | ifdef NEED_AP_MLME |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1151 | OBJS += ../src/ap/wmm.o |
| 1152 | OBJS += ../src/ap/ap_list.o |
| 1153 | OBJS += ../src/ap/ieee802_11.o |
| 1154 | OBJS += ../src/ap/hw_features.o |
Dmitry Shmidt | 051af73 | 2013-10-22 13:52:46 -0700 | [diff] [blame] | 1155 | OBJS += ../src/ap/dfs.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1156 | CFLAGS += -DNEED_AP_MLME |
| 1157 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1158 | OBJS += ../src/ap/ieee802_11_ht.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1159 | |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1160 | ifdef CONFIG_IEEE80211AC |
| 1161 | OBJS += ../src/ap/ieee802_11_vht.o |
| 1162 | endif |
| 1163 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1164 | ifdef CONFIG_P2P_MANAGER |
| 1165 | CFLAGS += -DCONFIG_P2P_MANAGER |
| 1166 | OBJS += ../src/ap/p2p_hostapd.o |
| 1167 | endif |
| 1168 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1169 | ifdef CONFIG_HS20 |
| 1170 | CFLAGS += -DCONFIG_HS20 |
| 1171 | OBJS += ../src/ap/hs20.o |
| 1172 | CONFIG_INTERWORKING=y |
| 1173 | endif |
| 1174 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1175 | ifdef CONFIG_INTERWORKING |
| 1176 | CFLAGS += -DCONFIG_INTERWORKING |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1177 | NEED_GAS=y |
| 1178 | endif |
| 1179 | |
| 1180 | ifdef NEED_GAS |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1181 | OBJS += ../src/common/gas.o |
| 1182 | OBJS += ../src/ap/gas_serv.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1183 | endif |
| 1184 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1185 | ifdef CONFIG_PROXYARP |
| 1186 | CFLAGS += -DCONFIG_PROXYARP |
| 1187 | OBJS += ../src/ap/x_snoop.o |
| 1188 | OBJS += ../src/ap/dhcp_snoop.o |
| 1189 | ifdef CONFIG_IPV6 |
| 1190 | OBJS += ../src/ap/ndisc_snoop.o |
| 1191 | endif |
| 1192 | endif |
| 1193 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1194 | OBJS += ../src/drivers/driver_common.o |
| 1195 | |
| 1196 | ifdef CONFIG_WPA_CLI_EDIT |
| 1197 | OBJS_c += ../src/utils/edit.o |
| 1198 | else |
| 1199 | OBJS_c += ../src/utils/edit_simple.o |
| 1200 | endif |
| 1201 | |
Dmitry Shmidt | 391c59f | 2013-09-03 12:16:28 -0700 | [diff] [blame] | 1202 | ifdef CONFIG_ACS |
| 1203 | CFLAGS += -DCONFIG_ACS |
| 1204 | OBJS += ../src/ap/acs.o |
| 1205 | LIBS += -lm |
| 1206 | endif |
| 1207 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1208 | ifdef CONFIG_NO_STDOUT_DEBUG |
| 1209 | CFLAGS += -DCONFIG_NO_STDOUT_DEBUG |
| 1210 | endif |
| 1211 | |
Paul Stewart | 092955c | 2017-02-06 09:13:09 -0800 | [diff] [blame] | 1212 | ifdef CONFIG_DEBUG_SYSLOG |
| 1213 | CFLAGS += -DCONFIG_DEBUG_SYSLOG |
| 1214 | endif |
| 1215 | |
Dmitry Shmidt | cce0666 | 2013-11-04 18:44:24 -0800 | [diff] [blame] | 1216 | ifdef CONFIG_DEBUG_LINUX_TRACING |
| 1217 | CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING |
| 1218 | endif |
| 1219 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1220 | ifdef CONFIG_DEBUG_FILE |
| 1221 | CFLAGS += -DCONFIG_DEBUG_FILE |
| 1222 | endif |
| 1223 | |
Dmitry Shmidt | 4530cfd | 2012-09-09 15:20:40 -0700 | [diff] [blame] | 1224 | ifdef CONFIG_SQLITE |
| 1225 | CFLAGS += -DCONFIG_SQLITE |
| 1226 | LIBS += -lsqlite3 |
| 1227 | LIBS_h += -lsqlite3 |
| 1228 | endif |
| 1229 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1230 | ifdef CONFIG_FST |
| 1231 | CFLAGS += -DCONFIG_FST |
| 1232 | OBJS += ../src/fst/fst.o |
| 1233 | OBJS += ../src/fst/fst_group.o |
| 1234 | OBJS += ../src/fst/fst_iface.o |
| 1235 | OBJS += ../src/fst/fst_session.o |
| 1236 | OBJS += ../src/fst/fst_ctrl_aux.o |
| 1237 | ifdef CONFIG_FST_TEST |
| 1238 | CFLAGS += -DCONFIG_FST_TEST |
| 1239 | endif |
| 1240 | ifndef CONFIG_NO_CTRL_IFACE |
| 1241 | OBJS += ../src/fst/fst_ctrl_iface.o |
| 1242 | endif |
| 1243 | endif |
| 1244 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 1245 | ifdef CONFIG_WEP |
| 1246 | CFLAGS += -DCONFIG_WEP |
| 1247 | endif |
| 1248 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1249 | ALL=hostapd hostapd_cli |
| 1250 | |
| 1251 | all: verify_config $(ALL) |
| 1252 | |
| 1253 | Q=@ |
| 1254 | E=echo |
| 1255 | ifeq ($(V), 1) |
| 1256 | Q= |
| 1257 | E=true |
| 1258 | endif |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1259 | ifeq ($(QUIET), 1) |
| 1260 | Q=@ |
| 1261 | E=true |
| 1262 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1263 | |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 1264 | ifdef CONFIG_CODE_COVERAGE |
| 1265 | %.o: %.c |
| 1266 | @$(E) " CC " $< |
| 1267 | $(Q)cd $(dir $@); $(CC) -c -o $(notdir $@) $(CFLAGS) $(notdir $<) |
| 1268 | else |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1269 | %.o: %.c |
| 1270 | $(Q)$(CC) -c -o $@ $(CFLAGS) $< |
| 1271 | @$(E) " CC " $< |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 1272 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1273 | |
| 1274 | verify_config: |
| 1275 | @if [ ! -r .config ]; then \ |
| 1276 | echo 'Building hostapd requires a configuration file'; \ |
| 1277 | echo '(.config). See README for more instructions. You can'; \ |
| 1278 | echo 'run "cp defconfig .config" to create an example'; \ |
| 1279 | echo 'configuration.'; \ |
| 1280 | exit 1; \ |
| 1281 | fi |
| 1282 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1283 | $(DESTDIR)$(BINDIR)/%: % |
| 1284 | install -D $(<) $(@) |
| 1285 | |
| 1286 | install: $(addprefix $(DESTDIR)$(BINDIR)/,$(ALL)) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1287 | |
| 1288 | ../src/drivers/build.hostapd: |
| 1289 | @if [ -f ../src/drivers/build.wpa_supplicant ]; then \ |
| 1290 | $(MAKE) -C ../src/drivers clean; \ |
| 1291 | fi |
| 1292 | @touch ../src/drivers/build.hostapd |
| 1293 | |
| 1294 | BCHECK=../src/drivers/build.hostapd |
| 1295 | |
| 1296 | hostapd: $(BCHECK) $(OBJS) |
| 1297 | $(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS) |
| 1298 | @$(E) " LD " $@ |
| 1299 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1300 | ifdef CONFIG_WPA_TRACE |
| 1301 | OBJS_c += ../src/utils/trace.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1302 | endif |
| 1303 | hostapd_cli: $(OBJS_c) |
| 1304 | $(Q)$(CC) $(LDFLAGS) -o hostapd_cli $(OBJS_c) $(LIBS_c) |
| 1305 | @$(E) " LD " $@ |
| 1306 | |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1307 | NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS) |
Dmitry Shmidt | ff787d5 | 2015-01-12 13:01:47 -0800 | [diff] [blame] | 1308 | NOBJS += ../src/utils/common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1309 | ifdef NEED_RC4 |
| 1310 | ifdef CONFIG_INTERNAL_RC4 |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1311 | ifndef CONFIG_NO_RC4 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1312 | NOBJS += ../src/crypto/rc4.o |
| 1313 | endif |
| 1314 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1315 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1316 | ifdef CONFIG_INTERNAL_MD5 |
| 1317 | NOBJS += ../src/crypto/md5-internal.o |
| 1318 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1319 | NOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o |
| 1320 | NOBJS += ../src/utils/os_$(CONFIG_OS).o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1321 | NOBJS += ../src/utils/wpa_debug.o |
| 1322 | NOBJS += ../src/utils/wpabuf.o |
| 1323 | ifdef CONFIG_WPA_TRACE |
| 1324 | NOBJS += ../src/utils/trace.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1325 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1326 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1327 | 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 |
| 1328 | HOBJS += ../src/crypto/aes-encblock.o |
| 1329 | ifdef CONFIG_INTERNAL_AES |
| 1330 | HOBJS += ../src/crypto/aes-internal.o |
| 1331 | HOBJS += ../src/crypto/aes-internal-enc.o |
| 1332 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1333 | ifeq ($(CONFIG_TLS), linux) |
| 1334 | HOBJS += ../src/crypto/crypto_linux.o |
| 1335 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1336 | |
| 1337 | nt_password_hash: $(NOBJS) |
| 1338 | $(Q)$(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n) |
| 1339 | @$(E) " LD " $@ |
| 1340 | |
| 1341 | hlr_auc_gw: $(HOBJS) |
| 1342 | $(Q)$(CC) $(LDFLAGS) -o hlr_auc_gw $(HOBJS) $(LIBS_h) |
| 1343 | @$(E) " LD " $@ |
| 1344 | |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 1345 | lcov-html: |
| 1346 | lcov -c -d .. > lcov.info |
| 1347 | genhtml lcov.info --output-directory lcov-html |
| 1348 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1349 | clean: |
| 1350 | $(MAKE) -C ../src clean |
| 1351 | 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] | 1352 | rm -f *.d *.gcno *.gcda *.gcov |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 1353 | rm -f lcov.info |
| 1354 | rm -rf lcov-html |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1355 | |
| 1356 | -include $(OBJS:%.o=%.d) |