1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 06:12:43 +01:00

pkg/libcose: Add package for COSE

This commit is contained in:
Koen Zandberg 2018-04-16 19:01:27 +02:00
parent a0025a38a3
commit 6c39d2d621
No known key found for this signature in database
GPG Key ID: BA1718B37D79F51C
5 changed files with 41 additions and 0 deletions

12
pkg/libcose/Makefile Normal file
View File

@ -0,0 +1,12 @@
PKG_NAME=libcose
PKG_URL=https://github.com/bergzand/libcose
PKG_VERSION=v0.3.1
PKG_LICENSE=LGPL
.PHONY: all
all: git-download
"$(MAKE)" -C $(PKG_BUILDDIR)/src -f $(CURDIR)/Makefile.libcose
"$(MAKE)" -C $(PKG_BUILDDIR)/src/crypt -f $(CURDIR)/Makefile.libcose_crypt
include $(RIOTBASE)/pkg/pkg.mk

10
pkg/libcose/Makefile.dep Normal file
View File

@ -0,0 +1,10 @@
USEPKG += cn-cbor
USEMODULE += libcose_crypt
ifneq (,$(filter libcose_crypt_tweetnacl,$(USEMODULE)))
USEPKG += tweetnacl
endif
ifneq (,$(filter libcose_crypt_hacl,$(USEMODULE)))
USEPKG += hacl
endif

View File

@ -0,0 +1,12 @@
INCLUDES += -I$(PKGDIRBASE)/libcose/include
CFLAGS += -DUSE_CBOR_CONTEXT
ifneq (,$(filter libcose_crypt_tweetnacl,$(USEMODULE)))
CFLAGS += -DCRYPTO_TWEETNACL
endif
ifneq (,$(filter libcose_crypt_hacl,$(USEMODULE)))
CFLAGS += -DCRYPTO_HACL
endif
# Declare pseudomodules here to be selfcontained
PSEUDOMODULES += libcose_crypt_%

View File

@ -0,0 +1,3 @@
MODULE := libcose
include $(RIOTBASE)/Makefile.base

View File

@ -0,0 +1,4 @@
MODULE := libcose_crypt
SUBMODULES = 1
include $(RIOTBASE)/Makefile.base