Debugging

By default Allegro builds with maximum optimisation, no debug information, and the -fomit-frame-pointer option. This produces the most efficient code, but makes it very hard to debug your program if it is crashing inside an Allegro function. There are several variables to control the code generation options, which may be useful while debugging or if you want to modify Allegro. These can either be set as environment variables from the command prompt (eg. "set DEBUGMODE=1") or passed to make on the command line (eg. "make install DEBUGMODE=1"). To build a new version, run "make clean" to get rid of the previous build, set the appropriate variable, and then run "make install" to build a version with the new options. Don't forget to backup your previous liballeg.a first, or to recompile with the normal options when you are done!

If you only want to recompile a specific test program or utility, you can specify it as an argument to make, eg. "make demo" or "make grabber". The makefile also provides some special pseudo-targets:




Back to Contents