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/ + */