Some build stuff...
max at quendi.de
Wed Oct 3 07:39:30 EDT 2001
At 23:41 Uhr -0400 02.10.2001, Ryan C. Gordon wrote:
>Can we get some options in SDL_sound's build system for something like
>--enable-debug (or --disable-optimizations) so we can toggle a few things:
> Defining DEBUG and DEBUG_CHATTER for debug builds, and NDEBUG (disables
> assertions) for optimized builds. Optimized builds could probably do
> without the -g option too, but I guess individuals can strip the
> binaries themselves if they are concerned.
Actually, "make install" should perform the stripping automatically,
IIRC, with automake/libtool.
> The gcc -O2 flag only used without debugging enabled, since it makes
> stepping in gdb a pain in the arse.
> -Werror if at all possible. I just had a segfault that I would have
> caught at compile time (passed an integer where a pointer should be)
> that I could have caught without a debugger if the warning hadn't
> scrolled off my screen.
So, I sum this up like this:
* add -Werror (always)
* add a switch --enable-debug, which if given:
* #define DEBUG 1
* #undef NDEBUG
* turn off all optimizations (i.e. -O0)
else, if this flag is not given, or if --disable-debug is give, then
* #undef DEBUG
* #define NDEBUG 1
* no change to optimization (this will default to -O2 then)
If this is right, I will implement it later today.
email: <mailto:max at quendi.de>
phone: (+49) 6151-494890
More information about the sdlsound