pkg/tinydtls: cleanup Makefile.include
- Removes `TINYDTLS_LOG` because it is redundant with `TINYDTLS_LOG_LVL` - Remove check for using tinydtls module because the Makefile will only be included if the tinydtls module is used
This commit is contained in:
parent
24b42d192c
commit
5391e50bb7
@ -7,45 +7,31 @@ ifeq ($(TOOLCHAIN), llvm)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
INCLUDES += -I$(RIOTBASE)/pkg/tinydtls/include
|
INCLUDES += -I$(RIOTBASE)/pkg/tinydtls/include
|
||||||
|
INCLUDES += -I$(PKG_BUILDDIR)
|
||||||
|
# Mandatory for tinyDTLS
|
||||||
|
CFLAGS += -DDTLSv12 -DWITH_SHA256
|
||||||
|
|
||||||
ifneq (,$(filter tinydtls,$(USEMODULE)))
|
# Dependencies partially under control of the App's requirements
|
||||||
INCLUDES += -I$(PKG_BUILDDIR)
|
|
||||||
# Mandatory for tinyDTLS
|
|
||||||
CFLAGS += -DDTLSv12 -DWITH_SHA256
|
|
||||||
|
|
||||||
# Dependencies partially under control of the App's requirements
|
# The configuration for socket overrides Sock
|
||||||
|
ifeq (,$(filter posix_sockets,$(USEMODULE)))
|
||||||
|
CFLAGS += -DWITH_RIOT_GNRC
|
||||||
|
endif
|
||||||
|
|
||||||
# The configuration for socket overrides Sock
|
# NOTE: PSK should be enabled by default BUT if the user define any other cipher
|
||||||
ifeq (,$(filter posix_sockets,$(USEMODULE)))
|
# suite(s) it should not be enabled.
|
||||||
CFLAGS += -DWITH_RIOT_GNRC
|
# TODO: Create the flag DTLS_CIPHERS with keywords PSK, ECC (and future)
|
||||||
|
ifeq (,$(filter -DDTLS_PSK,$(CFLAGS)))
|
||||||
|
ifeq (,$(filter -DDTLS_ECC,$(CFLAGS)))
|
||||||
|
CFLAGS += -DDTLS_PSK
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# NOTE: PSK should be enabled by default BUT if the user define any other cipher
|
# Handles the verbosity of tinyDTLS. Default: Minimum or just error messages.
|
||||||
# suite(s) it should not be enabled.
|
ifeq (,$(filter -DDTLS_DEBUG,$(CFLAGS)))
|
||||||
# TODO: Create the flag DTLS_CIPHERS with keywords PSK, ECC (and future)
|
CFLAGS += -DTINYDTLS_LOG_LVL=0
|
||||||
ifeq (,$(filter -DDTLS_PSK,$(CFLAGS)))
|
else
|
||||||
ifeq (,$(filter -DDTLS_ECC,$(CFLAGS)))
|
CFLAGS += -DTINYDTLS_LOG_LVL=6
|
||||||
CFLAGS += -DDTLS_PSK
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Enable debug when using tinydtls_sock_dtls
|
|
||||||
ifneq (,$(filter -DDTLS_DEBUG,$(CFLAGS)))
|
|
||||||
ifeq (,$(TINYDTLS_LOG))
|
|
||||||
CFLAGS += -DTINYDTLS_DEBUG
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Handles the verbosity of tinyDTLS. Default: Minimum or just error messages.
|
|
||||||
ifeq (,$(filter -DTINYDTLS_DEBUG,$(CFLAGS)))
|
|
||||||
ifeq ( , $(TINYDTLS_LOG))
|
|
||||||
CFLAGS += -DTINYDTLS_LOG_LVL=0
|
|
||||||
else
|
|
||||||
CFLAGS += -DTINYDTLS_LOG_LVL=$(TINYDTLS_LOG)
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
CFLAGS += -DTINYDTLS_LOG_LVL=6
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter tinydtls_aes,$(USEMODULE)))
|
ifneq (,$(filter tinydtls_aes,$(USEMODULE)))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user