From: Andre Noll Date: Fri, 13 Sep 2013 05:12:58 +0000 (+0000) Subject: build: cppflags/ldflags conversion: libid3tag X-Git-Tag: v0.5.1~1^2~47 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=c79cdc5b88a4324a6a07b89688ad618ef0098e14 build: cppflags/ldflags conversion: libid3tag This removes the rule for mp3_afh.o so that this object will instead be created by means of the generic rule. To make this work, CPPFLAGS is modified for this target to include suitable cpp options for libid3tag as determined during configure. Similarly, the linker flags for libid3tag are removed from server_ldflags, afh_ldflags, play_ldflags, recv_ldflags and play_ldflags, and appropriate linker flags are added to LDFLAGS for all executables that need it. --- diff --git a/Makefile.in b/Makefile.in index df61b2fb..54cfd441 100644 --- a/Makefile.in +++ b/Makefile.in @@ -19,6 +19,8 @@ GENGETOPT := @gengetopt@ HELP2MAN := @help2man@ MKDIR_P := mkdir -p +id3tag_ldflags := @id3tag_ldflags@ + build_date := $(shell date) uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS") uname_rs := $(shell uname -rs) @@ -198,9 +200,9 @@ $(object_dir)/aac_afh.o: aac_afh.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $< + +$(object_dir)/mp3_afh.o: CPPFLAGS += @id3tag_cppflags@ $(object_dir)/mp3_afh.o: mp3_afh.c | $(object_dir) - @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @id3tag_cppflags@ $< $(object_dir)/gui%.o: gui%.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' @@ -251,6 +253,8 @@ ifeq ($(findstring clean, $(MAKECMDGOALS)),) -include $(m4_deps) endif +para_recv para_afh para_play para_server: LDFLAGS += $(id3tag_ldflags) + para_recv: $(recv_objs) @[ -z "$(Q)" ] || echo 'LD $@' $(Q) $(CC) $(recv_objs) -o $@ @recv_ldflags@ $(LDFLAGS) diff --git a/configure.ac b/configure.ac index dec0636f..f4049373 100644 --- a/configure.ac +++ b/configure.ac @@ -823,14 +823,8 @@ AC_MSG_RESULT($have_libid3tag) if test ${have_libid3tag} = yes; then AC_DEFINE(HAVE_LIBID3TAG, 1, define to 1 you have libid3tag) - server_ldflags="$server_ldflags $id3tag_libs -lid3tag -lz" - afh_ldflags="$afh_ldflags $id3tag_libs -lid3tag -lz" - play_ldflags="$play_ldflags -lz" - recv_ldflags="$recv_ldflags $id3tag_libs -lid3tag" - play_ldflags="$play_ldflags $id3tag_libs -lid3tag" AC_SUBST(id3tag_cppflags) -else - AC_MSG_WARN([no support for id3v2 tags]) + AC_SUBST(id3tag_ldflags, "$id3tag_libs -lid3tag -lz") fi CPPFLAGS="$OLD_CPPFLAGS" LDFLAGS="$OLD_LDFLAGS"