1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pkg/wakaama: cleanup build system integration

Avoid modifying the cloned repository for each build
This commit is contained in:
Alexandre Abadie 2020-06-10 14:17:34 +02:00
parent 58cd126517
commit 6de497a066
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
4 changed files with 18 additions and 17 deletions

View File

@ -6,19 +6,6 @@ PKG_LICENSE=EDL-1.0,EPL-1.0
include $(RIOTBASE)/pkg/pkg.mk
all:
"$(MAKE)" -C $(PKG_BUILDDIR)
$(PKG_PREPARED): $(PKG_BUILDDIR)/copied
$(PKG_BUILDDIR)/copied: $(PKG_PATCHED) FORCE
mkdir -p "$(PKG_BUILDDIR)"
# copy the Wakaama core files
cp $(PKG_BUILDDIR)/core/*.c $(PKG_BUILDDIR)/core/*.h $(PKG_BUILDDIR)
# copy the coap implementation from Wakaama
cp $(PKG_BUILDDIR)/core/er-coap-13/*.c $(PKG_BUILDDIR)/core/er-coap-13/*.h $(PKG_BUILDDIR)
# copy the mandatory objects, implemented on Wakaama examples
cp $(PKG_BUILDDIR)/examples/client/object_server.c $(PKG_BUILDDIR)
cp $(PKG_BUILDDIR)/examples/client/object_security.c $(PKG_BUILDDIR)
cp $(PKG_BUILDDIR)/examples/client/object_access_control.c $(PKG_BUILDDIR)
echo 'MODULE:=wakaama' > $(PKG_BUILDDIR)/Makefile
echo 'include $$(RIOTBASE)/Makefile.base' >> $(PKG_BUILDDIR)/Makefile
"$(MAKE)" MODULE=wakaama_core -C $(PKG_BUILDDIR)/core -f $(RIOTBASE)/Makefile.base
"$(MAKE)" MODULE=wakaama_core_coap13 -C $(PKG_BUILDDIR)/core/er-coap-13 -f $(RIOTBASE)/Makefile.base
"$(MAKE)" -C $(PKG_BUILDDIR)/examples/client -f $(CURDIR)/wakaama_client.mk

View File

@ -1,3 +1,5 @@
USEMODULE += wakaama_core wakaama_core_coap13 wakaama_client
# include contrib code (platform adaption and client implementation)
USEMODULE += wakaama_contrib

View File

@ -1,7 +1,8 @@
DIRS += $(RIOTBASE)/pkg/wakaama/contrib
INCLUDES += -I$(RIOTBASE)/pkg/wakaama/include
INCLUDES += -I$(PKGDIRBASE)/wakaama
INCLUDES += -I$(PKGDIRBASE)/wakaama/core
INCLUDES += -I$(PKGDIRBASE)/wakaama/core/er-coap-13
# NOTE: Use wakaama in client mode
CFLAGS += -DLWM2M_CLIENT_MODE
@ -15,3 +16,5 @@ endif
ifneq (,$(or $(CONFIG_LWM2M_WITH_LOGS),$(filter -DCONFIG_LWM2M_WITH_LOGS=1,$(CFLAGS))))
CFLAGS += -DLWM2M_WITH_LOGS=1
endif
PSEUDOMODULES += wakaama

View File

@ -0,0 +1,9 @@
MODULE = wakaama_client
SRC = \
object_server.c \
object_security.c \
object_access_control.c \
#
include $(RIOTBASE)/Makefile.base