[build] Use per-target flags and libraries
authorEmmanuele Bassi <ebassi@linux.intel.com>
Tue, 21 Jul 2009 13:11:28 +0000 (14:11 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Tue, 21 Jul 2009 13:11:28 +0000 (14:11 +0100)
AM_LDFLAGS is ignored by the LDFLAGS target, and it's also not the right
place to put the libraries used by the linker.

Thanks to Vincent Untz for spotting this.

tests/interactive/Makefile.am

index dd38df8..2d503c7 100644 (file)
@@ -79,13 +79,11 @@ INCLUDES = \
        -I$(top_builddir)/clutter \
        -DG_DISABLE_SINGLE_INCLUDES
 
-LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.la
-AM_CPPFLAGS = $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
-AM_LDFLAGS = $(CLUTTER_LIBS)
+common_ldadd = $(top_builddir)/clutter/libclutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.la
 
 noinst_PROGRAMS = test-interactive
 
-test_interactive_SOURCES = \
-       test-main.c \
-       $(UNIT_TESTS)
+test_interactive_SOURCES = test-main.c $(UNIT_TESTS)
+test_interactive_CPPFLAGS = $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
 test_interactive_LDFLAGS = -export-dynamic
+test_interactive_LDADD = $(CLUTTER_LIBS) $(common_ldadd)