[Flac-dev] patches for flac build
Matt Zimmerman
mdz at debian.org
Wed Jul 18 18:14:56 PDT 2001
On Wed, Jul 18, 2001 at 05:22:54PM -0700, Josh Coalson wrote:
> > thus propagating CFLAGS to all generated makefiles. The right thing to do
> > is probably to prepend to CFLAGS instead of replacing it, so the user's
> > settings will come later on the command line and override the defaults.
>
> OK, I checked in a fix... does this snippet look alright?
>
> SAVE_CFLAGS="$CFLAGS"
> CFLAGS='-I./include -I $(top_srcdir)/include -Wall -W'
> if test x$debug = xtrue; then
> CFLAGS="$CFLAGS -g -O0 -DDEBUG"
> else
> CFLAGS="$CFLAGS -O3 -DNDEBUG"
> if test x$GCC = xyes; then
> CFLAGS="$CFLAGS -fomit-frame-pointer -funroll-loops \
> -finline-functions -Winline -DFLAC__INLINE=__inline__"
> fi
> fi
> CFLAGS="$CFLAGS $SAVE_CFLAGS"
This should work fine, though it might be a little clearer to use:
CFLAGS="$CFLAGS -I./include ..."
if test ...
CFLAGS="-g -O0 -DDEBUG $CFLAGS"
etc. (appending to CFLAGS instead of prepending).
--
- mdz
More information about the Flac-dev
mailing list