3.3.2 Preprocessor Options
Keywords: sdccman

##
3.3.2 Preprocessor Options

SDCC uses sdcpp, an adapted version of the GNU Compiler Collection preprocessor cpp (gcc `http://gcc.gnu.org/`). If you need more dedicated options than those listed below please refer to the GCC CPP Manual at `http://www.gnu.org/software/gcc/onlinedocs/`.

- [-I<path>] The additional location where the preprocessor will look for <..h> or “..h” files.
- [-D<macro[=value]>] Command line definition of macros. Passed to the preprocessor.
- [-M] Tell the preprocessor to output a rule suitable for make describing the dependencies of each object file. For each source file, the preprocessor outputs one make-rule whose target is the object file name for that source file and whose dependencies are all the files `#include'd in it. This rule may be a single line or may be continued with `\'-newline if it is long. The list of rules is printed on standard output instead of the preprocessed C program. `-M' implies `-E'.
- [-C] Tell the preprocessor not to discard comments. Used with the `-E' option.
- [-MM] Like `-M' but the output mentions only the user header files included with `#include “file'. System header files included with `#include <file>' are omitted.
- [-Aquestion(answer)] Assert the answer answer for question, in case it is tested with a preprocessor conditional such as `#if #question(answer)'. `-A-' disables the standard assertions that normally describe the target machine.
- [-Umacro] Undefine macro macro. `-U' options are evaluated after all `-D' options, but before any `-include' and `-imacros' options.
- [-dM] Tell the preprocessor to output only a list of the macro definitions that are in effect at the end of preprocessing. Used with the `-E' option.
- [-dD] Tell the preprocessor to pass all macro definitions into the output, in their proper sequence in the rest of the output.
- [-dN] Like `-dD' except that the macro arguments and contents are omitted. Only `#define name' is included in the output.
- [-Wp preprocessorOption[,preprocessorOption]...] Pass the preprocessorOption to the preprocessor sdcpp.