From 21c4cb41ff60615d1ac1ce593ee26ebe2172057c Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Thu, 3 Nov 2016 16:53:24 +0100 Subject: [PATCH] tinydtls: fix for build system fix --- examples/dtls-echo/Makefile | 16 ++++++++-------- pkg/tinydtls/Makefile | 2 +- pkg/tinydtls/Makefile.dep | 9 +++++++++ pkg/tinydtls/Makefile.include | 16 +++++++++++++++- 4 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 pkg/tinydtls/Makefile.dep diff --git a/examples/dtls-echo/Makefile b/examples/dtls-echo/Makefile index 0973887ee..64c22ff08 100644 --- a/examples/dtls-echo/Makefile +++ b/examples/dtls-echo/Makefile @@ -7,16 +7,16 @@ BOARD ?= native # This has to be the absolute path to the RIOT base directory: RIOTBASE ?= $(CURDIR)/../.. -BOARD_BLACKLIST := z1 wsn430-v1_4 wsn430-v1_3b waspmote-pro arduino-mega2560 \ - msb-430h msb-430 chronos telosb msbiot cc2538dk \ - saml21-xpro samr21-xpro arduino-duemilanove arduino-uno \ +# TinyDTLS only has support for 32-bit architectures ATM +BOARD_BLACKLIST := arduino-duemilanove arduino-mega2560 arduino-uno chronos \ + msb-430 msb-430h telosb waspmote-pro wsn430-v1_3b wsn430-v1_4 \ + z1 \ nrf52dk # see #6022 -BOARD_INSUFFICIENT_MEMORY := airfy-beacon chronos msb-430 msb-430h nrf51dongle \ - nrf6310 nucleo-f103 nucleo-f334 pca10000 pca10005 spark-core \ - stm32f0discovery telosb weio wsn430-v1_3b wsn430-v1_4 \ - yunjia-nrf51822 z1 nucleo-f072 cc2650stk nucleo-f030 \ - nucleo-f070 +BOARD_INSUFFICIENT_MEMORY := airfy-beacon nrf51dongle nrf6310 nucleo-f103 \ + nucleo-f334 pca10000 pca10005 spark-core \ + stm32f0discovery weio yunjia-nrf51822 nucleo-f072 \ + cc2650stk nucleo-f030 nucleo-f070 # Include packages that pull up and auto-init the link layer. # NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present diff --git a/pkg/tinydtls/Makefile b/pkg/tinydtls/Makefile index c697c91f2..cf06653a4 100644 --- a/pkg/tinydtls/Makefile +++ b/pkg/tinydtls/Makefile @@ -1,7 +1,7 @@ PKG_NAME=tinydtls PKG_URL=git://github.com/rfuentess/TinyDTLS.git # PKG_VERSION=RIOT-OS -PKG_VERSION=f824b5553a865c186a9b41236be03358f0c8feaf +PKG_VERSION=d06ad84d3e8bd3e86f7557faee34b68d5f8c0129 PKG_BUILDDIR ?= $(BINDIRBASE)/pkg/$(BOARD)/$(PKG_NAME) .PHONY: all diff --git a/pkg/tinydtls/Makefile.dep b/pkg/tinydtls/Makefile.dep new file mode 100644 index 000000000..f00a417af --- /dev/null +++ b/pkg/tinydtls/Makefile.dep @@ -0,0 +1,9 @@ +ifneq (,$(filter tinydtls,$(USEPKG))) + USEMODULE += tinydtls +endif + +ifneq (,$(filter tinydtls,$(USEMODULE))) + USEMODULE += tinydtls_aes + USEMODULE += tinydtls_ecc + USEMODULE += tinydtls_sha2 +endif diff --git a/pkg/tinydtls/Makefile.include b/pkg/tinydtls/Makefile.include index f56e0597f..b2cef49e4 100644 --- a/pkg/tinydtls/Makefile.include +++ b/pkg/tinydtls/Makefile.include @@ -1 +1,15 @@ -INCLUDES += -I$(BINDIRBASE)/pkg/$(BOARD)/tinydtls +PKG_BUILDDIR ?= $(BINDIRBASE)/pkg/$(BOARD)/tinydtls + +INCLUDES += -I$(PKG_BUILDDIR) + +ifneq (,$(filter tinydtls_aes,$(USEMODULE))) + DIRS += $(PKG_BUILDDIR)/aes +endif + +ifneq (,$(filter tinydtls_ecc,$(USEMODULE))) + DIRS += $(PKG_BUILDDIR)/ecc +endif + +ifneq (,$(filter tinydtls_sha2,$(USEMODULE))) + DIRS += $(PKG_BUILDDIR)/sha2 +endif