From 761d9bd95a6601c0b3be6591a6b6672b755e1fbe Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 15 Sep 2013 00:35:36 +0000 Subject: [PATCH] build: Define Make variables for cppflags. As a first step towards separating autoconf output variables and Make recipes, this commit defines Make variables for all cppflags at the top of Makefile.in and avoids @variable@ constructs in Make rules. As an additional benefit, this improves readability of the generated Makefile. --- Makefile.in | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/Makefile.in b/Makefile.in index 8f14e5aa..3e62d05f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -19,6 +19,15 @@ MKDIR_P := mkdir -p speex_cppflags := @speex_cppflags@ opus_cppflags := @opus_cppflags@ +arch_cppflags := @arch_cppflags@ +osl_cppflags := @osl_cppflags@ +id3tag_cppflags := @id3tag_cppflags@ +openssl_cppflags := @openssl_cppflags@ +ogg_cppflags := @ogg_cppflags@ +mad_cppflags := @mad_cppflags@ +faad_cppflags := @faad_cppflags@ +curses_cppflags := @curses_cppflags@ +ao_cppflags := @ao_cppflags@ id3tag_ldflags := @id3tag_ldflags@ ogg_ldflags := @ogg_ldflags@ @@ -90,10 +99,10 @@ CPPFLAGS += -Wmissing-noreturn CPPFLAGS += -Wbad-function-cast CPPFLAGS += -fno-strict-aliasing CPPFLAGS += -DMAIN_INPUT_FILE_IS_$(*F) -CPPFLAGS += @arch_cppflags@ +CPPFLAGS += $(arch_cppflags) CPPFLAGS += -I/usr/local/include CPPFLAGS += -I$(cmdline_dir) -CPPFLAGS += @osl_cppflags@ +CPPFLAGS += $(osl_cppflags) LDFLAGS += @clock_gettime_ldflags@ @@ -175,34 +184,34 @@ error2.h: $(hostbin_dir)/error2 @echo "$(object_executable_matrix)" | $< > $@ $(object_dir)/crypt.o: crypt.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @openssl_cppflags@ $< + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(openssl_cppflags) $< $(object_dir)/spx_common.o: spx_common.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(speex_cppflags) @ogg_cppflags@ $< + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(speex_cppflags) $(ogg_cppflags) $< $(object_dir)/spxdec_filter.o: spxdec_filter.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(speex_cppflags) @ogg_cppflags@ $< + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(speex_cppflags) $(ogg_cppflags) $< $(object_dir)/spx_afh.o: spx_afh.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(speex_cppflags) @ogg_cppflags@ $< + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(speex_cppflags) $(ogg_cppflags) $< $(object_dir)/oggdec_filter.o: oggdec_filter.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ogg_cppflags@ $< + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(ogg_cppflags) $< $(object_dir)/ogg_afh.o: ogg_afh.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ogg_cppflags@ $< + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(ogg_cppflags) $< $(object_dir)/ogg_afh_common.o: ogg_afh_common.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ogg_cppflags@ $< + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(ogg_cppflags) $< $(object_dir)/mp3dec_filter.o: mp3dec_filter.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @mad_cppflags@ $< + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(mad_cppflags) $< $(object_dir)/compress_filter.o: compress_filter.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' @@ -210,26 +219,27 @@ $(object_dir)/compress_filter.o: compress_filter.c | $(object_dir) $(object_dir)/aacdec_filter.o: aacdec_filter.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $< + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(faad_cppflags) $< $(object_dir)/aac_common.o: aac_common.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $< + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(faad_cppflags) $< $(object_dir)/aac_afh.o: aac_afh.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $< + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(faad_cppflags) $< $(object_dir)/opus%.o: CPPFLAGS += $(opus_cppflags) -$(object_dir)/mp3_afh.o: CPPFLAGS += @id3tag_cppflags@ +$(object_dir)/mp3_afh.o: CPPFLAGS += $(id3tag_cppflags) + $(object_dir)/mp3_afh.o: mp3_afh.c | $(object_dir) $(object_dir)/gui%.o: gui%.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @curses_cppflags@ $< + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(curses_cppflags) $< $(object_dir)/ao_write.o: ao_write.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ao_cppflags@ $< + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(ao_cppflags) $< $(object_dir)/%.cmdline.o: $(cmdline_dir)/%.cmdline.c $(cmdline_dir)/%.cmdline.h | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' -- 2.39.5