From a647a69791cf64a4bc52e14264558696ed8dd8f5 Mon Sep 17 00:00:00 2001 From: cpq Date: Tue, 7 Feb 2023 12:15:50 +0000 Subject: [PATCH] Add examples/readme with rules --- examples/README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 examples/README.md diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 00000000..ecd6bced --- /dev/null +++ b/examples/README.md @@ -0,0 +1,24 @@ +# Mongooose Network Library Examples + +In order to build and run any of the existing examples, please follow: +https://mongoose.ws/documentation/#how-to-build-and-run-examples + +## Contributing + +Rules for creating a new example: + +- Makefile golden reference for desktop/server example: [http-server](http-server) +- Makefile golden reference for the embedded example: + [stm32/nucleo-f746zg-baremetal](stm32/nucleo-f746zg-baremetal) +- An example must build on Windows, Mac and Ubuntu Linux systems +- Assume that user installed tools according to https://mongoose.ws/tutorials/tools/ +- Makefile must not include any other make files +- Use `CFLAGS` for compilation options +- Add `CFLAGS_EXTRA` to the end of `CFLAGS`, to allow user to specify + extra options, for example: + ``` + make CFLAGS_EXTRA="-pedantic -O2" + ``` +- If external repository is required, download it on demand using git + shallow clone. See embedded example golden reference +- Keep Makefile as short as possible, but verbose to understand it easily