1# supplicant make file
2
3COMPONENT_PRIV_INCLUDEDIRS := src src/utils esp_supplicant/src
4COMPONENT_SRCDIRS := port src/ap src/common src/crypto src/eap_peer src/rsn_supp src/tls src/utils src/wps esp_supplicant/src
5COMPONENT_ADD_INCLUDEDIRS := include port/include esp_supplicant/include src/utils
6
7ifeq ($(CONFIG_ESP_WIFI_SOFTAP_SUPPORT), y)
8    COMPONENT_OBJEXCLUDE += src/esp_hostap.o
9endif
10
11ifeq ($(CONFIG_WPA_MBEDTLS_CRYPTO), y)
12    COMPONENT_OBJEXCLUDE += src/tls/asn1.o \
13    src/tls/bignum.o \
14    src/tls/pkcs1.o \
15    src/tls/pkcs5.o \
16    src/tls/pkcs8.o \
17    src/tls/rsa.o \
18    src/tls/tls_internal.o \
19    src/tls/tlsv1_client.o \
20    src/tls/tlsv1_client_read.o \
21    src/tls/tlsv1_client_write.o \
22    src/tls/tlsv1_common.o \
23    src/tls/tlsv1_cred.o \
24    src/tls/tlsv1_record.o \
25    src/tls/tlsv1_server.o \
26    src/tls/tlsv1_server_read.o \
27    src/tls/tlsv1_server_write.o \
28    src/tls/x509v3.o \
29    src/crypto/aes-ctr.o \
30    src/crypto/aes-cbc.o \
31    src/crypto/aes-internal-dec.o \
32    src/crypto/aes-internal-enc.o \
33    src/crypto/aes-internal.o \
34    src/crypto/crypto_internal-cipher.o \
35    src/crypto/crypto_internal-modexp.o \
36    src/crypto/crypto_internal-rsa.o \
37    src/crypto/crypto_mbedtls-rsa.o \
38    src/crypto/crypto_internal.o \
39    src/crypto/md5-internal.o \
40    src/crypto/md5.o \
41    src/crypto/sha1-internal.o \
42    src/crypto/sha1-pbkdf2.o \
43    src/crypto/sha1.o \
44    src/crypto/sha256-internal.o \
45    src/crypto/sha256.o
46else
47    COMPONENT_OBJEXCLUDE += src/crypto/tls_mbedtls.o \
48    src/crypto/crypto_mbedtls.o \
49    src/crypto/crypto_mbedtls-bignum.o \
50    src/crypto/crypto_mbedtls-ec.o
51endif
52
53ifneq ($(CONFIG_MBEDTLS_RC4_DISABLED), y)
54    COMPONENT_OBJEXCLUDE += src/crypto/rc4.o
55endif
56ifeq ($(CONFIG_MBEDTLS_DES_C), y)
57    COMPONENT_OBJEXCLUDE += src/crypto/des-internal.o
58endif
59ifeq ($(CONFIG_MBEDTLS_CMAC_C), y)
60    COMPONENT_OBJEXCLUDE += src/crypto/aes-omac1.o
61endif
62ifeq ($(CONFIG_MBEDTLS_NIST_KW_C), y)
63    COMPONENT_OBJEXCLUDE += src/crypto/aes-wrap.o
64    COMPONENT_OBJEXCLUDE += src/crypto/aes-unwrap.o
65    COMPONENT_OBJEXCLUDE += src/crypto/aes-ccm.o
66endif
67
68ifneq ($(CONFIG_WPA_11KV_SUPPORT), y)
69    COMPONENT_OBJEXCLUDE += src/common/rrm.o \
70    src/common/wnm_sta.o \
71    src/common/bss.o \
72    src/common/scan.o \
73    src/common/ieee802_11_common.o \
74    esp_supplicant/src/esp_common.o \
75    esp_supplicant/src/esp_scan.o
76endif
77ifneq ($(CONFIG_WPA_MBO_SUPPORT), y)
78    COMPONENT_OBJEXCLUDE += src/common/mbo.o
79endif
80
81CFLAGS += -DCONFIG_SHA256 -DCONFIG_DPP -DCONFIG_IEEE80211W -DESP_SUPPLICANT -DIEEE8021X_EAPOL -DEAP_PEER_METHOD -DEAP_TLS -DEAP_TTLS -DEAP_PEAP -DEAP_MSCHAPv2 -DUSE_WPA2_TASK -DCONFIG_WPS2 -DCONFIG_WPS_PIN -DUSE_WPS_TASK -DESPRESSIF_USE -DESP32_WORKAROUND -DCONFIG_ECC -DCONFIG_WNM -D__ets__ -Wno-strict-aliasing
82
83ifdef CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE
84    CFLAGS += -DCONFIG_WPA3_SAE
85endif
86ifdef CONFIG_WPA_WPS_STRICT
87	CFLAGS += -DCONFIG_WPS_STRICT
88endif
89ifdef CONFIG_WPA_MBO_SUPPORT
90	CFLAGS += -DCONFIG_MBO
91endif
92ifdef CONFIG_WPA_SUITE_B_192
93	CFLAGS += -DCONFIG_SUITEB192
94endif
95ifdef CONFIG_WPA_SUITE_B
96	CFLAGS += -DCONFIG_SUITEB
97endif
98ifdef CONFIG_ESP_WIFI_GCMP_SUPPORT
99	CFLAGS += -DCONFIG_GCMP
100endif
101ifdef CONFIG_ESP_WIFI_GMAC_SUPPORT
102	CFLAGS += -DCONFIG_GMAC
103endif
104