[riot-notifications] [RIOT-OS/RIOT] Add nanopb package (#11157)

Juan I Carrano notifications at github.com
Tue Mar 12 18:13:06 CET 2019

jcarrano commented on this pull request.

> +
+TOOLCHAIN_FILE = $(PKG_BUILDDIR)/xcompile-toolchain.cmake
+PROTO_FILES=$(shell ls $(PROTO_DIR))
+all: $(PKG_BUILDDIR)/Makefile
+	cp $(PKG_BUILDDIR)/libnanopb.a $(BINDIR)/nanopb.a
+	rm -rf $(PROTO_BUILD_DIR) && \
+	mkdir $(PROTO_BUILD_DIR) && \
+	cp $(PKG_DIR)/Makefile.template $(PKG_BUILDDIR)/Makefile && \

The package's makefile should only take care of building the package. The rest of the rules must be in Makefile.include so that they are added to the main makefile. It is possible to define it so that the user does not have to worry about anything: the same way it is done for `.c` files:

- Use a wildcard to collect `.proto` files
- From this collection, create a target for each .proto.
- Define an implicit rule so that make knows how to build a `pb.{c,h}` from a `.proto`

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190312/3e335e4c/attachment.html>

More information about the notifications mailing list