Configure, cross-configure and overriding C-Flags


I’ve been trying to automate compiling (Linux) and cross-compiling
(Linux/xmingw32) and would like more control over the CFLAGs that are

The standard sequence:


make install
make distclean

cross-make install
cross-make distclean

will always include “-g -O2” during the compile … how to I change that
to, say, “-O3” on the command line (on the fly)?

Also, stripping the debugging information from the DLLs seems to render
them useless for compiling. For example if I run the mingw "strip"
comman on SDL.dll to shrink its size a subsequent compile of the SDL_ttf
library fails with an error “… checking for -lttf: no” . Are there
some special parameters that strip needs to keep the DLL intact?

It all boils down to the question on how to rebuild a source tree
quickly with either debug info OR maximum optimization and no debug info
using the configure and cross-configure scripts.

Any insights, tips and pointers would be greatly appreciated.

| Andreas Schiffler aschiffler at |
| Senior Systems Engineer - Deskplayer Inc., Buffalo |
| 4707 Eastwood Cres., Niagara Falls, Ont L2E 1B4, Canada |
| +1-905-371-3652 (private) - +1-905-371-8834 (work/fax) |