]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
MCONFIG: allow developers to override CFLAGS
authorTheodore Ts'o <tytso@mit.edu>
Sun, 21 Sep 2014 19:35:21 +0000 (15:35 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 21 Sep 2014 19:35:21 +0000 (15:35 -0400)
Move other C compiler flags to ALL_CFLAGS so that CFLAGS only controls
the debugging and optimization flags.  This allows a developer to
build with "make CFLAGS=-g" in order to compile w/o optimization.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
MCONFIG.in

index 4751176d79e89991b777dd28b89649d8d6ebe0bc..29505da60d6fe3bb55f179305a485861dcea75b0 100644 (file)
@@ -73,9 +73,9 @@ pkgconfigdir = $(libdir)/pkgconfig
 
 CC = @CC@
 BUILD_CC = @BUILD_CC@
-CFLAGS = @CFLAGS@ @DEFS@ $(LOCAL_CFLAGS)
+CFLAGS = @CFLAGS@
 CPPFLAGS = @INCLUDES@
-ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
+ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS) @DEFS@ $(LOCAL_CFLAGS)
 LDFLAGS = @LDFLAGS@
 ALL_LDFLAGS = $(LDFLAGS) @LDFLAG_DYNAMIC@
 LDFLAGS_STATIC = $(LDFLAGS) @LDFLAG_STATIC@
@@ -197,14 +197,14 @@ WFLAGS=           -std=gnu99 -D_XOPEN_SOURCE=600 -D_GNU_SOURCE \
                        -UENABLE_NLS
 
 gcc-wall-new:
-       ($(MAKE) CFLAGS="@CFLAGS@ $(WFLAGS)" > /dev/null) 2>&1 | sed -f $(top_srcdir)/util/gcc-wall-cleanup
+       ($(MAKE) CFLAGS="$(ALL_CFLAGS) $(WFLAGS)" > /dev/null) 2>&1 | sed -f $(top_srcdir)/util/gcc-wall-cleanup
 
 gcc-wall:
        $(MAKE) clean > /dev/null
        $(MAKE) gcc-wall-new
 
 static-check:
-       ($(MAKE) C=1 V=1 CFLAGS="@CFLAGS@ $(WFLAGS)") 2>&1 | sed -f $(top_srcdir)/util/static-analysis-cleanup
+       ($(MAKE) C=1 V=1 CFLAGS="$(ALL_CFLAGS) $(WFLAGS)") 2>&1 | sed -f $(top_srcdir)/util/static-analysis-cleanup
 
 static-check-all:
        $(MAKE) clean > /dev/null