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