intro.md 811 Bytes
Newer Older
1 2
---
title: Build Options
3 4 5 6 7
items:
  - { type: file, name: enabling-flags.md }
  - { type: file, name: disabling-flags.md }
  - { type: file, name: platform-spec.md }
  - { type: file, name: tunables.md }
8 9 10 11
---

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

Sergey Lyubka's avatar
Sergey Lyubka committed
16 17
To set a preprocessor flag during compile time, use the `-D <PREPROCESSOR_FLAG>`
compiler option. For example, to disable both MQTT and CoAP,
18 19 20
compile the application `my_app.c` like this (assumed UNIX system):

```
21
  $ cc my_app.c mongoose.c -D MG_DISABLE_MQTT -D MG_DISABLE_COAP
22
```