Next: 6 A first App Up: Writing GNUstep Makefiles Previous: 4 Enabling Verbose Messages

5 Disabling Debugging

By default, executables are created with debugging enabled. This means that they are created with debugging symbols, i.e., compiled with the -g option (which is useful for debugging it with gdb), and compiled using the -DDEBUG compiler flag (which defines the preprocessor symbol DEBUG during the compilation). In this way, you may isolate code to be executed only when compiling with the debug option typically as follows:
#ifdef DEBUG 
  /* Code compiled in only when debug=yes */
#endif
To compile this tool with debugging disabled, type:
make debug=no
Of course, if you have already compiled your tool with debugging enabled, you need to do a make clean first to remove the previous compilation, then type make debug=no to compile again with debugging disabled.



2010-02-14