From 71d9f361ee19dc7db85d9a828f21a8c9e853b4a6 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Wed, 27 Nov 2019 11:54:18 +0100 Subject: [PATCH] pkg/flatbuffers: add support to RIOT --- pkg/flatbuffers/Makefile | 9 +++++++++ pkg/flatbuffers/Makefile.dep | 1 + pkg/flatbuffers/Makefile.flatbuffers | 5 +++++ pkg/flatbuffers/Makefile.include | 11 +++++++++++ pkg/flatbuffers/doc.txt | 8 ++++++++ 5 files changed, 34 insertions(+) create mode 100644 pkg/flatbuffers/Makefile create mode 100644 pkg/flatbuffers/Makefile.dep create mode 100644 pkg/flatbuffers/Makefile.flatbuffers create mode 100644 pkg/flatbuffers/Makefile.include create mode 100644 pkg/flatbuffers/doc.txt diff --git a/pkg/flatbuffers/Makefile b/pkg/flatbuffers/Makefile new file mode 100644 index 0000000000..732aa0f34f --- /dev/null +++ b/pkg/flatbuffers/Makefile @@ -0,0 +1,9 @@ +PKG_NAME=flatbuffers +PKG_URL=https://github.com/google/flatbuffers +PKG_VERSION=v1.11.0 +PKG_LICENSE=Apache2.0 + +include $(RIOTBASE)/pkg/pkg.mk + +all: + "$(MAKE)" -C $(PKG_BUILDDIR)/src -f $(CURDIR)/Makefile.$(PKG_NAME) diff --git a/pkg/flatbuffers/Makefile.dep b/pkg/flatbuffers/Makefile.dep new file mode 100644 index 0000000000..5648689939 --- /dev/null +++ b/pkg/flatbuffers/Makefile.dep @@ -0,0 +1 @@ +USEMODULE += cpp11-compat diff --git a/pkg/flatbuffers/Makefile.flatbuffers b/pkg/flatbuffers/Makefile.flatbuffers new file mode 100644 index 0000000000..ca39aaabec --- /dev/null +++ b/pkg/flatbuffers/Makefile.flatbuffers @@ -0,0 +1,5 @@ +MODULE = flatbuffers + +NO_AUTO_SRC := 1 + +include $(RIOTBASE)/Makefile.base diff --git a/pkg/flatbuffers/Makefile.include b/pkg/flatbuffers/Makefile.include new file mode 100644 index 0000000000..b2327fa368 --- /dev/null +++ b/pkg/flatbuffers/Makefile.include @@ -0,0 +1,11 @@ +INCLUDES += -I$(PKGDIRBASE)/flatbuffers/include + +FLATC ?= flatc + +ifneq (0,$(shell which flatc 2>&1 > /dev/null ; echo $$?)) + FLATC = $(RIOTTOOLS)/flatc/flatc + $(call target-export-variables,all,FLATC) +endif + +# This module requires cpp11 support +CXXEXFLAGS += -std=c++11 diff --git a/pkg/flatbuffers/doc.txt b/pkg/flatbuffers/doc.txt new file mode 100644 index 0000000000..8e3f8a6eeb --- /dev/null +++ b/pkg/flatbuffers/doc.txt @@ -0,0 +1,8 @@ +/** + * @defgroup pkg_flatbuffers FlatBuffers + * @ingroup pkg + * @ingroup sys_serialization + * @brief FlatBuffers: Memory Efficient Serialization Library + * + * @see http://google.github.io/flatbuffers/ + */