$(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,$(subst y,Y,\
$(subst z,Z,$1))))))))))))))))))))))))))
-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
- LDFLAGS += -Wl,--gc-sections
- CPPFLAGS += -Wstrict-prototypes
- CPPFLAGS += -Wshadow
- # causes warnings on *BSD for the feature test macros
- CPPFLAGS += -Wunused-macros
-endif
-CPPFLAGS += -Os
-CPPFLAGS += -Wuninitialized
-CPPFLAGS += -Wchar-subscripts
CPPFLAGS += -DBINDIR='"$(BINDIR)"'
CPPFLAGS += -DBUILD_DATE='"$(build_date)"'
CPPFLAGS += -DUNAME_RS='"$(uname_rs)"'
CPPFLAGS += -DCC_VERSION='"$(cc_version)"'
-CPPFLAGS += -Werror-implicit-function-declaration
-CPPFLAGS += -Wmissing-noreturn
-CPPFLAGS += -Wbad-function-cast
-CPPFLAGS += -fno-strict-aliasing
CPPFLAGS += -DMAIN_INPUT_FILE_IS_$(*F)
CPPFLAGS += $(arch_cppflags)
CPPFLAGS += -I/usr/local/include
CPPFLAGS += -I$(cmdline_dir)
+CFLAGS += -Os
+CFLAGS += -Wuninitialized
+CFLAGS += -Wchar-subscripts
+CFLAGS += -Werror-implicit-function-declaration
+CFLAGS += -Wmissing-noreturn
+CFLAGS += -Wbad-function-cast
+CFLAGS += -fno-strict-aliasing
+
+ifeq ($(uname_s),Linux)
+ CFLAGS += -fdata-sections -ffunction-sections
+ CFLAGS += -Wstrict-prototypes
+ CFLAGS += -Wshadow
+ # causes warnings on *BSD for the feature test macros
+ CFLAGS += -Wunused-macros
+ LDFLAGS += -Wl,--gc-sections
+endif
+
+STRICT_CFLAGS = $(CFLAGS)
+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
+
LDFLAGS += $(clock_gettime_ldflags)
# To put more focus on warnings, be less verbose as default
@echo "$(object_executable_matrix)" | $< > $@
$(object_dir)/%.o: %.c | $(object_dir)
+
$(object_dir)/opus%.o $(dep_dir)/opus%.d: CPPFLAGS += $(opus_cppflags)
$(object_dir)/gui%.o $(dep_dir)/gui%.d: CPPFLAGS += $(curses_cppflags)
$(object_dir)/spx%.o $(dep_dir)/spx%.d: CPPFLAGS += $(speex_cppflags)
-$(object_dir)/%.cmdline.o: CPPFLAGS += -Wno-unused-function
-
$(object_dir)/mp3_afh.o $(dep_dir)/mp3_afh.d: CPPFLAGS += $(id3tag_cppflags)
$(object_dir)/crypt.o $(dep_dir)/crypt.d: CPPFLAGS += $(openssl_cppflags)
$(object_dir)/gcrypt.o $(dep_dir)/gcrypt.d: CPPFLAGS += $(gcrypt_cppflags)
+$(object_dir)/ao_write.o $(dep_dir)/ao_write.d: CPPFLAGS += $(ao_cppflags)
$(object_dir)/mp3dec_filter.o $(dep_dir)/mp3dec_filter.d \
: CPPFLAGS += $(mad_cppflags)
-$(object_dir)/compress_filter.o: CPPFLAGS += -O3
-$(object_dir)/ao_write.o $(dep_dir)/ao_write.d: CPPFLAGS += $(ao_cppflags)
-
$(object_dir)/aacdec_filter.o $(dep_dir)/aacdec_filter.d \
$(object_dir)/aac_common.o $(dep_dir)/aac_common.d \
$(object_dir)/aac_afh.o $(dep_dir)/aac_afh.d \
$(object_dir)/mm.o $(dep_dir)/mm.d \
: CPPFLAGS += $(osl_cppflags)
+$(object_dir)/%.cmdline.o: CFLAGS += -Wno-unused-function
+$(object_dir)/compress_filter.o: CFLAGS += -O3
+
$(object_dir)/%.o: %.c | $(object_dir)
@[ -z "$(Q)" ] || echo 'CC $<'
$(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 $<'
- $(Q) $(CC) -c -o $@ $(CPPFLAGS) $<
+ $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $<
$(dep_dir)/%.cmdline.d: $(cmdline_dir)/%.cmdline.c error2.h | $(dep_dir)
@[ -z "$(Q)" ] || echo 'DEP $<'