1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/tinydtls/Makefile.include
Aiman Ismail 5391e50bb7 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
2020-02-05 07:00:14 +01:00

49 lines
1.3 KiB
Makefile

PKG_BUILDDIR ?= $(PKGDIRBASE)/tinydtls
INCLUDES += -I$(PKG_BUILDDIR)
ifeq ($(TOOLCHAIN), llvm)
CFLAGS += -Wno-gnu-zero-variadic-macro-arguments -Wno-unused-function
endif
INCLUDES += -I$(RIOTBASE)/pkg/tinydtls/include
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
# NOTE: PSK should be enabled by default BUT if the user define any other cipher
# suite(s) it should not be enabled.
# 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
# Handles the verbosity of tinyDTLS. Default: Minimum or just error messages.
ifeq (,$(filter -DDTLS_DEBUG,$(CFLAGS)))
CFLAGS += -DTINYDTLS_LOG_LVL=0
else
CFLAGS += -DTINYDTLS_LOG_LVL=6
endif
ifneq (,$(filter tinydtls_aes,$(USEMODULE)))
DIRS += $(PKG_BUILDDIR)/aes
endif
ifneq (,$(filter tinydtls_ecc,$(USEMODULE)))
DIRS += $(PKG_BUILDDIR)/ecc
endif
# For now contrib only contains sock_dtls adaption
ifneq (,$(filter tinydtls_sock_dtls,$(USEMODULE)))
DIRS += $(RIOTBASE)/pkg/tinydtls/contrib
endif