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