diff --git a/pkg/tweetnacl/Makefile b/pkg/tweetnacl/Makefile index b30d17ed36..c2d1bff57c 100644 --- a/pkg/tweetnacl/Makefile +++ b/pkg/tweetnacl/Makefile @@ -6,7 +6,6 @@ PKG_LICENSE=PD .PHONY: all all: git-download - @cp $(RIOTBASE)/pkg/tweetnacl/src/* $(PKG_BUILDDIR) - "$(MAKE)" -C $(PKG_BUILDDIR) + $(Q)"$(MAKE)" -C $(PKG_BUILDDIR) -f $(CURDIR)/Makefile.riot -include $(RIOTBASE)/pkg/pkg.mk \ No newline at end of file +include $(RIOTBASE)/pkg/pkg.mk diff --git a/pkg/tweetnacl/Makefile.riot b/pkg/tweetnacl/Makefile.riot new file mode 100644 index 0000000000..23ba5ad3e2 --- /dev/null +++ b/pkg/tweetnacl/Makefile.riot @@ -0,0 +1,3 @@ +MODULE=tweetnacl + +include $(RIOTBASE)/Makefile.base diff --git a/pkg/tweetnacl/patches/0001-RIOT-Use-RIOT-random_bytes-function-instead-of-rando.patch b/pkg/tweetnacl/patches/0001-RIOT-Use-RIOT-random_bytes-function-instead-of-rando.patch new file mode 100644 index 0000000000..ac6a91d216 Binary files /dev/null and b/pkg/tweetnacl/patches/0001-RIOT-Use-RIOT-random_bytes-function-instead-of-rando.patch differ diff --git a/pkg/tweetnacl/src/Makefile b/pkg/tweetnacl/src/Makefile deleted file mode 100644 index 2af2531e48..0000000000 --- a/pkg/tweetnacl/src/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -MODULE=tweetnacl - -include $(RIOTBASE)/Makefile.base \ No newline at end of file diff --git a/pkg/tweetnacl/src/randombytes.c b/pkg/tweetnacl/src/randombytes.c deleted file mode 100644 index ce3f938566..0000000000 --- a/pkg/tweetnacl/src/randombytes.c +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2016 Kaspar Schleiser - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -#include -#include "random.h" - -void randombytes(uint8_t *target, uint64_t n) -{ - /* tweetnacl needs uint64_t as "n" parameter, random provides uint32 */ - random_bytes(target, n); -}