From 46643240d1da0627cac9275117b9df6900958f39 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 19 Apr 2014 23:22:53 +0000 Subject: [PATCH] build: Rename DEBUG_CPPFLAGS to STRICT_CFLAGS. 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 | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Makefile.real b/Makefile.real index 19e229dd..608e8990 100644 --- a/Makefile.real +++ b/Makefile.real @@ -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)))))))))))))))))))))))))) - -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 @@ -222,7 +221,7 @@ $(object_dir)/mm.o $(dep_dir)/mm.d \ $(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 $<' -- 2.30.2