mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:52:44 +01:00
pkg/wolfssl: improve build system integration
and avoid copying in the cloned repository when building
This commit is contained in:
parent
ac8e27aab6
commit
86f9190a4c
@ -5,11 +5,13 @@ PKG_LICENSE=GPLv2
|
|||||||
|
|
||||||
include $(RIOTBASE)/pkg/pkg.mk
|
include $(RIOTBASE)/pkg/pkg.mk
|
||||||
|
|
||||||
all: # Nothing to do here when building
|
.PHONY: wolfcrypt%
|
||||||
|
|
||||||
prepare:
|
all: $(filter wolfcrypt wolfcrypt-test wolfcrypt-benchmark,$(USEMODULE))
|
||||||
cp Makefile.wolfssl $(PKG_BUILDDIR)/src/Makefile
|
"$(MAKE)" -C $(PKG_BUILDDIR)/src -f $(CURDIR)/Makefile.wolfssl
|
||||||
cp Makefile.wolfcrypt $(PKG_BUILDDIR)/wolfcrypt/src/Makefile
|
|
||||||
touch $(PKG_BUILDDIR)/wolfssl.a
|
wolfcrypt:
|
||||||
cp Makefile.wolfcrypt-test $(PKG_BUILDDIR)/wolfcrypt/test/Makefile
|
"$(MAKE)" -C $(PKG_BUILDDIR)/wolfcrypt/src -f $(CURDIR)/Makefile.wolfcrypt
|
||||||
cp Makefile.wolfcrypt-benchmark $(PKG_BUILDDIR)/wolfcrypt/benchmark/Makefile
|
|
||||||
|
wolfcrypt-%:
|
||||||
|
"$(MAKE)" -C $(PKG_BUILDDIR)/wolfcrypt/$* -f $(CURDIR)/Makefile.wolfcrypt-$*
|
||||||
|
@ -1,32 +1,11 @@
|
|||||||
CFLAGS += -Wno-unused-parameter -Wno-unused
|
|
||||||
CFLAGS += -DWOLFSSL_USER_SETTINGS=1
|
CFLAGS += -DWOLFSSL_USER_SETTINGS=1
|
||||||
CFLAGS += -DWOLFSSL_RIOT_OS=1
|
CFLAGS += -DWOLFSSL_RIOT_OS=1
|
||||||
|
|
||||||
INCLUDES += -I$(PKGDIRBASE)/../../../
|
INCLUDES += -I$(PKGDIRBASE)/../../../
|
||||||
INCLUDES += -I$(PKGDIRBASE)/wolfssl
|
INCLUDES += -I$(PKGDIRBASE)/wolfssl
|
||||||
INCLUDES += -I$(RIOTBASE)/pkg/wolfssl/sock_tls
|
INCLUDES += -I$(RIOTBASE)/pkg/wolfssl/sock_tls
|
||||||
INCLUDES += -I$(RIOTBASE)/pkg/wolfssl/include
|
INCLUDES += -I$(RIOTBASE)/pkg/wolfssl/include
|
||||||
|
|
||||||
# One current limitation is that it is not possible to build `wolfcrypt` without
|
|
||||||
# including `wolfssl`.
|
|
||||||
# It would require some changes:
|
|
||||||
# * Use a different name for the `wolfssl` implementation to differenciate from
|
|
||||||
# the package directory
|
|
||||||
# * Declare `wolfssl` a PSEUDOMODULES
|
|
||||||
# * Remove the archive in Makefile.include for packages as they could be
|
|
||||||
# PSEUDOMODULES
|
|
||||||
# `$(USEPKG:%=$(BINDIR)/%.a):`
|
|
||||||
ifneq (,$(filter wolfcrypt,$(USEMODULE)))
|
|
||||||
DIRS += $(PKGDIRBASE)/wolfssl/wolfcrypt/src
|
|
||||||
endif
|
|
||||||
ifneq (,$(filter wolfcrypt-test,$(USEMODULE)))
|
|
||||||
DIRS += $(PKGDIRBASE)/wolfssl/wolfcrypt/test
|
|
||||||
endif
|
|
||||||
ifneq (,$(filter wolfcrypt-benchmark,$(USEMODULE)))
|
|
||||||
DIRS += $(PKGDIRBASE)/wolfssl/wolfcrypt/benchmark
|
|
||||||
endif
|
|
||||||
ifneq (,$(filter wolfssl,$(USEPKG)))
|
|
||||||
DIRS += $(PKGDIRBASE)/wolfssl/src
|
|
||||||
endif
|
|
||||||
ifneq (,$(filter sock_tls,$(USEMODULE)))
|
ifneq (,$(filter sock_tls,$(USEMODULE)))
|
||||||
DIRS += $(RIOTBASE)/pkg/wolfssl/sock_tls
|
DIRS += $(RIOTBASE)/pkg/wolfssl/sock_tls
|
||||||
endif
|
endif
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
MODULE = wolfcrypt
|
MODULE = wolfcrypt
|
||||||
|
|
||||||
|
CFLAGS += -Wno-unused
|
||||||
|
|
||||||
|
ifeq (llvm,$(TOOLCHAIN))
|
||||||
|
CFLAGS += -Wno-unused-parameter
|
||||||
|
endif
|
||||||
|
|
||||||
SUBMODULES += 1
|
SUBMODULES += 1
|
||||||
|
|
||||||
NO_AUTO_SRC = 1
|
NO_AUTO_SRC = 1
|
||||||
|
@ -3,4 +3,8 @@ MODULE = wolfssl
|
|||||||
NO_AUTO_SRC = 1
|
NO_AUTO_SRC = 1
|
||||||
SUBMODULES += 1
|
SUBMODULES += 1
|
||||||
|
|
||||||
|
ifeq (llvm,$(TOOLCHAIN))
|
||||||
|
CFLAGS += -Wno-unused-parameter
|
||||||
|
endif
|
||||||
|
|
||||||
include $(RIOTBASE)/Makefile.base
|
include $(RIOTBASE)/Makefile.base
|
||||||
|
Loading…
Reference in New Issue
Block a user