mk: include $(GCCWARN) when building ELF objects

It's currently impossible to turn on dprintf() statements in
com32/modules because $(GCCWARN) isn't used as part of $(CFLAGS).

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
debug.c32: Dynamically enable/disable debug code at runtime

It's useful to be able to enable (and disable) debug code at runtime,
particularly for allowing users that are unable to build their own
Syslinux releases the chance to provide useful debugging output.

For example, say a user reports trouble with their PXE stack but doesn't
have a development environment setup to turn on the debug code
themselves. With this change you can simply request that they do,

    debug.c32 -e pxe_call unload_pxe open_file

to enable the debug in those functions. By only turning on code in
specific functions we reduce the chance of disrupting the buggy
behaviour and improve the signal to noise ratio for print statements.

To disable debug code use the -d flag,

    debug.c32 -d pxe_call

To use this new feature simply do,

    if (syslinux_debug_enabled) {
        debug1();
        debug2();
        ....
    }

from within the function you wish to add debug code. Note that this
feature is not limited to print statements - you can put any code within
the conditional, such as verifying a checksum or checking for memory
leaks.

The plan is to leave the dynamic debug code built in for all prereleases
and to turn it off for final releases.

People may still want to build with all dprintf() statements enabled,
and so a new symbol, DYNAMIC_DEBUG, was introduced rather than
repurposing the old DEBUG, DEBUG_STDIO and DEBUG_PORT symbols.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
mk: enable dynamic debug support

This will probably be disabled for releases, but it's definitely
worthwhile having enabled for all prereleases.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Merge branch 'dynamic-debug' into elflink