mongoose/docs/overview/build-options/intro.md
Sergey Lyubka 12437fd7fe Refactor Mongoose documentation
PUBLISHED_FROM=e9a4e5c7b4a1d03b93a2a79e29de19e60e919929
2016-09-01 14:35:02 +00:00

811 B

title items
Build Options
type name
file enabling-flags.md
type name
file disabling-flags.md
type name
file platform-spec.md
type name
file tunables.md

Mongoose source code ships in a single .c file that contains functionality for all supported protocols (modules). Modules can be disabled at compile time which reduces the executable's size. That can be done by setting preprocessor flags. Also, some preprocessor flags can be used to tune internal Mongoose parameters.

To set a preprocessor flag during compile time, use the -D <PREPROCESSOR_FLAG> compiler option. For example, to disable both MQTT and CoAP, compile the application my_app.c like this (assumed UNIX system):

  $ cc my_app.c mongoose.c -D MG_DISABLE_MQTT -D MG_DISABLE_COAP