Use foo_LDADD instead of foo_LDFLAGS to specify the libraries to link to.
This should make sure arguments are passed to the linker in the right
order, and makes LDFLAGS usable again.
Based on patch by Brian Cameron <brian.cameron@oracle.com>
Fixes #615697.
demo_SOURCES = demo.c
demo_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GTK_CFLAGS)
-demo_LDFLAGS = $(GST_BASE_LIBS) $(GST_LIBS) $(GTK_LIBS)
+demo_LDADD = $(GST_BASE_LIBS) $(GST_LIBS) $(GTK_LIBS)
noinst_PROGRAMS = shapewipe-example
shapewipe_example_SOURCES = shapewipe-example.c
-shapewipe_example_CFLAGS = $(GST_CFLAGS) $(GST_CONTROLLER_CFLAGS)
-shapewipe_example_LDFLAGS = $(GST_LIBS) $(GST_CONTROLLER_LIBS)
+shapewipe_example_CFLAGS = $(GST_CONTROLLER_CFLAGS) $(GST_CFLAGS)
+shapewipe_example_LDADD = $(GST_CONTROLLER_LIBS) $(GST_LIBS)
noinst_HEADERS =
demo_osssrc_SOURCES = demo-osssrc.c
demo_osssrc_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GTK_CFLAGS)
-demo_osssrc_LDFLAGS = $(GST_BASE_LIBS) $(GST_LIBS) $(GTK_LIBS)
+demo_osssrc_LDADD = $(GST_BASE_LIBS) $(GST_LIBS) $(GTK_LIBS)
demo_audiotest_SOURCES = demo-audiotest.c
demo_audiotest_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GTK_CFLAGS)
-demo_audiotest_LDFLAGS = $(GST_BASE_LIBS) $(GST_LIBS) $(GTK_LIBS)
+demo_audiotest_LDADD = $(GST_BASE_LIBS) $(GST_LIBS) $(GTK_LIBS)
spectrum_example_SOURCES = spectrum-example.c
spectrum_example_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GTK_CFLAGS)
-spectrum_example_LDFLAGS = $(GST_BASE_LIBS) $(GST_LIBS) $(GTK_LIBS)
+spectrum_example_LDADD = $(GST_BASE_LIBS) $(GST_LIBS) $(GTK_LIBS)
probe_SOURCES = probe.c
probe_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
-probe_LDFLAGS = $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-0.10 $(GST_BASE_LIBS) $(GST_LIBS)
+probe_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-0.10 $(GST_BASE_LIBS) $(GST_LIBS)
if HAVE_GTK
GTK_TESTS = gdkpixbufsink-test
gdkpixbufsink_test_SOURCES = gdkpixbufsink-test.c
-gdkpixbufsink_test_CFLAGS = $(GTK_CFLAGS) $(GST_CFLAGS)
-gdkpixbufsink_test_LDADD = $(GTK_LIBS) $(GST_LIBS)
+gdkpixbufsink_test_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS)
+gdkpixbufsink_test_LDADD = $(GST_LIBS) $(GTK_LIBS)
gdkpixbufsink_test_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
else
GTK_TESTS =
ximagesrc_test_SOURCES = ximagesrc-test.c
ximagesrc_test_CFLAGS = $(GST_CFLAGS)
-ximagesrc_test_LDFLAGS = $(GST_LIBS)
+ximagesrc_test_LDADD = $(GST_LIBS)
else
X_TESTS =
endif