build: Rename DEBUG_CPPFLAGS to STRICT_CFLAGS.
authorAndre Noll <maan@systemlinux.org>
Sat, 19 Apr 2014 23:22:53 +0000 (23:22 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 26 Oct 2014 12:15:54 +0000 (13:15 +0100)
This variable is a misnomer for two reasons: First, its purpose is
unrelated to debugging. We just prefer to compile our own source
files with more strict flags than the flags used for the generated
*.cmdline.c files. Compiling those with the strict flags would
result in warnings we can not fix anyway. Second, these flags are
no preprocessor flags but compiler flags. So STRICT_CFLAGS is more
appropriate than DEBUG_CPPFLAGS.

Makefile.real

index 19e229dda9b59d970e56b08237e765caac3044f3..608e89902b288de49531b62f3aec246c2f8226ff 100644 (file)
@@ -80,12 +80,11 @@ $(subst p,P,$(subst q,Q,$(subst r,R,$(subst s,S,$(subst t,T,\
 $(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,$(subst y,Y,\
 $(subst z,Z,$1))))))))))))))))))))))))))
 
 $(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,$(subst y,Y,\
 $(subst z,Z,$1))))))))))))))))))))))))))
 
-
-DEBUG_CPPFLAGS += -g -Wunused -Wundef -W
-DEBUG_CPPFLAGS += -Wredundant-decls
-DEBUG_CPPFLAGS += -Wall -Wno-sign-compare -Wno-unknown-pragmas
-DEBUG_CPPFLAGS += -Wformat-security
-DEBUG_CPPFLAGS += -Wmissing-format-attribute
+STRICT_CFLAGS += -g -Wunused -Wundef -W
+STRICT_CFLAGS += -Wredundant-decls
+STRICT_CFLAGS += -Wall -Wno-sign-compare -Wno-unknown-pragmas
+STRICT_CFLAGS += -Wformat-security
+STRICT_CFLAGS += -Wmissing-format-attribute
 
 ifeq ($(uname_s),Linux)
        CPPFLAGS += -fdata-sections -ffunction-sections
 
 ifeq ($(uname_s),Linux)
        CPPFLAGS += -fdata-sections -ffunction-sections
@@ -222,7 +221,7 @@ $(object_dir)/mm.o $(dep_dir)/mm.d \
 
 $(object_dir)/%.o: %.c | $(object_dir)
        @[ -z "$(Q)" ] || echo 'CC $<'
 
 $(object_dir)/%.o: %.c | $(object_dir)
        @[ -z "$(Q)" ] || echo 'CC $<'
-       $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $<
+       $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(STRICT_CFLAGS) $<
 
 $(object_dir)/%.cmdline.o: $(cmdline_dir)/%.cmdline.c $(cmdline_dir)/%.cmdline.h | $(object_dir)
        @[ -z "$(Q)" ] || echo 'CC $<'
 
 $(object_dir)/%.cmdline.o: $(cmdline_dir)/%.cmdline.c $(cmdline_dir)/%.cmdline.h | $(object_dir)
        @[ -z "$(Q)" ] || echo 'CC $<'