Next: A first App Up: Writing GNUstep Makefiles Previous: A First Tool

Enabling Debugging

To compile this tool with debugging enabled, type in:
make debug=yes
This will create an executable with debugging symbols (i.e., compiled with the -g option), useful for debugging it with gdb; it will also compile the tool 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
The debugging executable will be placed in:
shared_debug_obj/ix86/linux-gnu/gnu-gnu-gnu-xgps
this allows you to keep both the debugging and the not-debugging executables, since they are in different trees. To install the debugging version, type make debug=yes install (note: this will overwrite the not-debugging version, if any, in the installation directory; only one can be installed at a time). To clean the debugging version, type make debug=yes clean.



Nicola Pero 2000-10-12