s/filter/plugin/ link plugins to GST_LIBS rearrange rules to a common format

Original commit message from CVS:
* s/filter/plugin/
* link plugins to GST_LIBS
* rearrange rules to a common format
diff --git a/ext/arts/Makefile.am b/ext/arts/Makefile.am
index ce2150a..5ca2b1b 100644
--- a/ext/arts/Makefile.am
+++ b/ext/arts/Makefile.am
@@ -15,14 +15,13 @@
 # mcopidl Extension Expansion Technology clean up
 CLEANFILES = gst_artsio.h gst_artsio.cc gst_artsio.mcopclass gst_artsio.mcoptype
 
-
 # FIXME automake 1.4 hack, 1.5 should let us put the .idl in
 #       _SOURCES at which point the follow can be removed
 
 libgstarts_la_SOURCES = gst_arts.c gst_artsio.cc gst_artsio_impl.cc
 libgstarts_la_CFLAGS = $(GST_CFLAGS)
 libgstarts_la_CXXFLAGS = $(ARTS_CXXFLAGS) $(GST_CFLAGS)
-libgstarts_la_LIBADD = $(ARTS_LIBS)
+libgstarts_la_LIBADD = $(GST_LIBS) $(ARTS_LIBS)
 
 EXTRA_DIST = gst_artsio.idl
 else
@@ -33,4 +32,3 @@
 
 dist-hook:
 	rm -f $(distdir)/gst_artsio.cc
-
diff --git a/ext/artsd/Makefile.am b/ext/artsd/Makefile.am
index f41f73d..b9db91f 100644
--- a/ext/artsd/Makefile.am
+++ b/ext/artsd/Makefile.am
@@ -3,7 +3,7 @@
 plugin_LTLIBRARIES = libartsdsink.la
 
 libartsdsink_la_SOURCES = gstartsdsink.c
-noinst_HEADERS = gstartsdsink.h
+libartsdsink_la_CFLAGS = $(GST_CFLAGS) $(ARTSC_CFLAGS)
+libartsdsink_la_LIBADD = $(GST_LIBS) $(ARTSC_LIBS)
 
-libartsdsink_la_CFLAGS = $(ARTSC_CFLAGS) $(GST_CFLAGS)
-libartsdsink_la_LIBADD = $(ARTSC_LIBS)
+noinst_HEADERS = gstartsdsink.h
diff --git a/ext/audiofile/Makefile.am b/ext/audiofile/Makefile.am
index 7e1ca5e..cb03aa5 100644
--- a/ext/audiofile/Makefile.am
+++ b/ext/audiofile/Makefile.am
@@ -3,12 +3,11 @@
 plugin_LTLIBRARIES = libafsink.la libafsrc.la
 
 libafsink_la_SOURCES = gstafsink.c
-libafsrc_la_SOURCES = gstafsrc.c
-noinst_HEADERS = gstafsink.h gstafsrc.h
-
-libafsink_la_LIBADD = $(AUDIOFILE_LIBS)
-libafsrc_la_LIBADD = $(AUDIOFILE_LIBS)
-
 libafsink_la_CFLAGS = $(GST_CFLAGS)
-libafsrc_la_CFLAGS = $(GST_CFLAGS)
+libafsink_la_LIBADD = $(GST_LIBS) $(AUDIOFILE_LIBS)
 
+libafsrc_la_SOURCES = gstafsrc.c
+libafsrc_la_CFLAGS = $(GST_CFLAGS)
+libafsrc_la_LIBADD = $(GST_LIBS) $(AUDIOFILE_LIBS)
+
+noinst_HEADERS = gstafsink.h gstafsrc.h
diff --git a/ext/gsm/Makefile.am b/ext/gsm/Makefile.am
index 92df5f6..b70b41c 100644
--- a/ext/gsm/Makefile.am
+++ b/ext/gsm/Makefile.am
@@ -3,8 +3,8 @@
 plugin_LTLIBRARIES = libgstgsm.la
 
 libgstgsm_la_SOURCES = gstgsm.c gstgsmdec.c gstgsmenc.c
-libgstgsm_la_LIBADD = $(GSM_LIBS)
 libgstgsm_la_CFLAGS = $(GST_CFLAGS)
+libgstgsm_la_LIBADD = $(GST_LIBS) $(GSM_LIBS)
 
 noinst_HEADERS = gstgsmenc.h gstgsmdec.h 
 
diff --git a/ext/hermes/Makefile.am b/ext/hermes/Makefile.am
index 40d88e8..15e7c1e 100644
--- a/ext/hermes/Makefile.am
+++ b/ext/hermes/Makefile.am
@@ -8,10 +8,14 @@
 ARCHSRCS =
 endif
 
+if USE_HERMES
+PLUGIN_EXTRA_LIBS = $(HERMES_LIBS)
+else
+PLUGIN_EXTRA_LIBS =
+endif
+
 libgstcolorspace_la_SOURCES = gstcolorspace.c yuv2yuv.c yuv2rgb.c $(ARCHSRCS)
 libgstcolorspace_la_CFLAGS = $(GST_CFLAGS)
-if USE_HERMES
-libgstcolorspace_la_LIBADD = $(HERMES_LIBS)
-endif
+libgstcolorspace_la_LIBADD = $(GST_LIBS) $(PLUGIN_EXTRA_LIBS)
 
 noinst_HEADERS = gstcolorspace.h yuv2rgb.h
diff --git a/ext/ladspa/Makefile.am b/ext/ladspa/Makefile.am
index 5a7dcd1..9f986a4 100644
--- a/ext/ladspa/Makefile.am
+++ b/ext/ladspa/Makefile.am
@@ -4,5 +4,6 @@
 
 libgstladspa_la_SOURCES = gstladspa.c search.c load.c
 libgstladspa_la_CFLAGS = $(GST_CFLAGS)
+libgstladspa_la_LIBADD = $(GST_LIBS)
 
 noinst_HEADERS = gstladspa.h ladspa.h utils.h
diff --git a/ext/sdl/Makefile.am b/ext/sdl/Makefile.am
index 371ac78..0b03447 100644
--- a/ext/sdl/Makefile.am
+++ b/ext/sdl/Makefile.am
@@ -1,11 +1,10 @@
 plugindir = $(libdir)/gst
 
 plugin_LTLIBRARIES = libsdlvideosink.la
+
 libsdlvideosink_la_SOURCES =  sdlvideosink.c
-
-
 ## FIXME I have my doubts about these opti flags
-libsdlvideosink_la_CFLAGS = -ffast-math -finline-functions $(GST_CFLAGS) $(SDL_CFLAGS)
-libsdlvideosink_la_LIBADD = $(SDL_LIBS)
+libsdlvideosink_la_CFLAGS = $(GST_CFLAGS) $(SDL_CFLAGS) -ffast-math -finline-functions
+libsdlvideosink_la_LIBADD = $(GST_LIBS) $(SDL_LIBS)
 
 noinst_HEADERS = sdlvideosink.h
diff --git a/ext/shout/Makefile.am b/ext/shout/Makefile.am
index 762bedd..da20ef4 100644
--- a/ext/shout/Makefile.am
+++ b/ext/shout/Makefile.am
@@ -4,6 +4,6 @@
 
 libgstshout_la_SOURCES = gstshout.c 
 libgstshout_la_CFLAGS = $(GST_CFLAGS)
-libgstshout_la_LIBADD = $(SHOUT_LIBS)
+libgstshout_la_LIBADD = $(GST_LIBS) $(SHOUT_LIBS)
 
 noinst_HEADERS = gstshout.h
diff --git a/ext/smoothwave/Makefile.am b/ext/smoothwave/Makefile.am
index e46a957..d74c4a3 100644
--- a/ext/smoothwave/Makefile.am
+++ b/ext/smoothwave/Makefile.am
@@ -1,10 +1,10 @@
-filterdir = $(libdir)/gst
+plugindir = $(libdir)/gst
 
-filter_LTLIBRARIES = libgstsmoothwave.la
+plugin_LTLIBRARIES = libgstsmoothwave.la
 
 libgstsmoothwave_la_SOURCES = gstsmoothwave.c
 libgstsmoothwave_la_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS)
-libgstsmoothwave_la_LIBADD = $(GTK_LIBS)
+libgstsmoothwave_la_LIBADD = $(GST_LIBS) $(GTK_LIBS)
 
 noinst_HEADERS = gstsmoothwave.h
 
diff --git a/gst/chart/Makefile.am b/gst/chart/Makefile.am
index c85c60a..2b3e26e 100644
--- a/gst/chart/Makefile.am
+++ b/gst/chart/Makefile.am
@@ -1,4 +1,5 @@
-filterdir = $(libdir)/gst
-filter_LTLIBRARIES = libchart.la
+plugindir = $(libdir)/gst
+plugin_LTLIBRARIES = libchart.la
 libchart_la_SOURCES = gstchart.c
 libchart_la_CFLAGS = $(GST_CFLAGS)
+libchart_la_LIBADD = $(GST_LIBS)
diff --git a/gst/deinterlace/Makefile.am b/gst/deinterlace/Makefile.am
index eafa47d..0f34139 100644
--- a/gst/deinterlace/Makefile.am
+++ b/gst/deinterlace/Makefile.am
@@ -1,9 +1,10 @@
-filterdir = $(libdir)/gst
+plugindir = $(libdir)/gst
 
-filter_LTLIBRARIES = libgstdeinterlace.la
+plugin_LTLIBRARIES = libgstdeinterlace.la
 
 libgstdeinterlace_la_SOURCES = gstdeinterlace.c
 libgstdeinterlace_la_CFLAGS = $(GST_CFLAGS)
+libgstdeinterlace_la_LIBADD = $(GST_LIBS)
 
 noinst_HEADERS = gstdeinterlace.h 
 
diff --git a/gst/flx/Makefile.am b/gst/flx/Makefile.am
index 79a6fba..df0a688 100644
--- a/gst/flx/Makefile.am
+++ b/gst/flx/Makefile.am
@@ -1,9 +1,10 @@
-filterdir = $(libdir)/gst
+plugindir = $(libdir)/gst
 
-filter_LTLIBRARIES = libgstflxdec.la
+plugin_LTLIBRARIES = libgstflxdec.la
 
 libgstflxdec_la_SOURCES = gstflxdec.c flx_color.c
 libgstflxdec_la_CFLAGS = $(GST_CFLAGS)
+libgstflxdec_la_LIBADD = $(GST_LIBS)
 
 noinst_HEADERS = flx_fmt.h flx_color.h gstflxdec.h
 
diff --git a/gst/mpeg1sys/Makefile.am b/gst/mpeg1sys/Makefile.am
index 44c4946..97f27b2 100644
--- a/gst/mpeg1sys/Makefile.am
+++ b/gst/mpeg1sys/Makefile.am
@@ -1,13 +1,13 @@
-filterdir = $(libdir)/gst
+plugindir = $(libdir)/gst
 
-filter_LTLIBRARIES = libgstmpeg1systemencode.la
+plugin_LTLIBRARIES = libgstmpeg1systemencode.la
 
 libgstmpeg1systemencode_la_SOURCES = gstmpeg1systemencode.c \
 			 buffer.c \
 			 systems.c  
 libgstmpeg1systemencode_la_CFLAGS = -O2 $(FOMIT_FRAME_POINTER) -funroll-all-loops -finline-functions -ffast-math $(GST_CFLAGS)
+libgstmpeg1systemencode_la_LIBADD = $(GST_LIBS)
 
 noinst_HEADERS = gstmpeg1systemencode.h \
 		 main.h \
 		 buffer.h
-
diff --git a/gst/mpeg2sub/Makefile.am b/gst/mpeg2sub/Makefile.am
index d8bfe88..04d1996 100644
--- a/gst/mpeg2sub/Makefile.am
+++ b/gst/mpeg2sub/Makefile.am
@@ -1,6 +1,6 @@
-filterdir = $(libdir)/gst
+plugindir = $(libdir)/gst
 
-filter_LTLIBRARIES = libgstmpeg2subt.la
+plugin_LTLIBRARIES = libgstmpeg2subt.la
 
 libgstmpeg2subt_la_SOURCES = gstmpeg2subt.c  
 
@@ -11,8 +11,8 @@
 endif
 
 libgstmpeg2subt_la_CFLAGS = -O3 $(ARCHCFLAGS) -fschedule-insns2 $(FOMIT_FRAME_POINTER) -finline-functions -ffast-math $(GST_CFLAGS)
+libgstmpeg2subt_la_LIBADD = $(GST_LIBS)
 
 noinst_HEADERS = gstmpeg2subt.h 
 
 EXTRA_DIST = Notes.txt
-
diff --git a/gst/mpegaudioparse/Makefile.am b/gst/mpegaudioparse/Makefile.am
index 4823c99..e1c938f 100644
--- a/gst/mpegaudioparse/Makefile.am
+++ b/gst/mpegaudioparse/Makefile.am
@@ -1,14 +1,16 @@
 #FIXME clean me up a bit
 
-filterdir = $(libdir)/gst
-filter_LTLIBRARIES = libgstmpegaudioparse.la libgstmp3types.la
+plugindir = $(libdir)/gst
+plugin_LTLIBRARIES = libgstmpegaudioparse.la libgstmp3types.la
 
 libgstmpegaudioparse_la_SOURCES = gstmpegaudioparse.c
 # FIXME is this useful?
 libgstmpegaudioparse_la_CFLAGS = -O3 $(FOMIT_FRAME_POINTER) -ffast-math -finline-functions $(GST_CFLAGS)
+libgstmpegaudioparse_la_LIBADD = $(GST_LIBS)
 
 libgstmp3types_la_SOURCES = gstmp3types.c
 libgstmp3types_la_CFLAGS = -O3 $(FOMIT_FRAME_POINTER) -ffast-math -finline-functions $(GST_CFLAGS)
+libgstmp3types_la_LIBADD = $(GST_LIBS)
 
 noinst_HEADERS = gstmpegaudioparse.h
 EXTRA_DIST = README
diff --git a/gst/passthrough/Makefile.am b/gst/passthrough/Makefile.am
index 500d467..b8584d7 100644
--- a/gst/passthrough/Makefile.am
+++ b/gst/passthrough/Makefile.am
@@ -1,9 +1,10 @@
-filterdir = $(libdir)/gst
+plugindir = $(libdir)/gst
 
-filter_LTLIBRARIES = libgstpassthrough.la
+plugin_LTLIBRARIES = libgstpassthrough.la
 
 libgstpassthrough_la_SOURCES = gstpassthrough.c
 libgstpassthrough_la_CFLAGS = $(GST_CFLAGS)
+libgstpassthrough_la_LIBADD = $(GST_LIBS)
 
 noinst_HEADERS = gstpassthrough.h filter.func
 
diff --git a/gst/playondemand/Makefile.am b/gst/playondemand/Makefile.am
index 4a96570..39046de 100644
--- a/gst/playondemand/Makefile.am
+++ b/gst/playondemand/Makefile.am
@@ -1,9 +1,10 @@
-filterdir = $(libdir)/gst
+plugindir = $(libdir)/gst
 
-filter_LTLIBRARIES = libgstplayondemand.la
+plugin_LTLIBRARIES = libgstplayondemand.la
 
 libgstplayondemand_la_SOURCES = gstplayondemand.c
 libgstplayondemand_la_CFLAGS = $(GST_CFLAGS)
+libgstplayondemand_la_LIBADD = $(GST_LIBS)
 
 noinst_HEADERS = gstplayondemand.h filter.func
 
diff --git a/gst/rtjpeg/Makefile.am b/gst/rtjpeg/Makefile.am
index 8adeae0..86cc606 100644
--- a/gst/rtjpeg/Makefile.am
+++ b/gst/rtjpeg/Makefile.am
@@ -1,8 +1,9 @@
-filterdir = $(libdir)/gst
+plugindir = $(libdir)/gst
 
-filter_LTLIBRARIES = libgstrtjpeg.la
+plugin_LTLIBRARIES = libgstrtjpeg.la
 
 libgstrtjpeg_la_SOURCES = gstrtjpeg.c gstrtjpegenc.c gstrtjpegdec.c RTjpeg.c
 libgstrtjpeg_la_CFLAGS = $(GST_CFLAGS)
+libgstrtjpeg_la_LIBADD = $(GST_LIBS)
 
 noinst_HEADERS = gstrtjpegenc.h gstrtjpegdec.h RTjpeg.h
diff --git a/gst/smooth/Makefile.am b/gst/smooth/Makefile.am
index f4856a1..7031dce 100644
--- a/gst/smooth/Makefile.am
+++ b/gst/smooth/Makefile.am
@@ -1,8 +1,9 @@
-filterdir = $(libdir)/gst
+plugindir = $(libdir)/gst
 
-filter_LTLIBRARIES = libgstsmooth.la
+plugin_LTLIBRARIES = libgstsmooth.la
 
 libgstsmooth_la_SOURCES = gstsmooth.c
 libgstsmooth_la_CFLAGS = -O3 $(FOMIT_FRAME_POINTER) -funroll-all-loops -finline-functions -ffast-math $(GST_CFLAGS)
+libgstsmooth_la_LIBADD = $(GST_LIBS)
 
 noinst_HEADERS = gstsmooth.h
diff --git a/gst/smoothwave/Makefile.am b/gst/smoothwave/Makefile.am
index e46a957..d74c4a3 100644
--- a/gst/smoothwave/Makefile.am
+++ b/gst/smoothwave/Makefile.am
@@ -1,10 +1,10 @@
-filterdir = $(libdir)/gst
+plugindir = $(libdir)/gst
 
-filter_LTLIBRARIES = libgstsmoothwave.la
+plugin_LTLIBRARIES = libgstsmoothwave.la
 
 libgstsmoothwave_la_SOURCES = gstsmoothwave.c
 libgstsmoothwave_la_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS)
-libgstsmoothwave_la_LIBADD = $(GTK_LIBS)
+libgstsmoothwave_la_LIBADD = $(GST_LIBS) $(GTK_LIBS)
 
 noinst_HEADERS = gstsmoothwave.h
 
diff --git a/gst/spectrum/Makefile.am b/gst/spectrum/Makefile.am
index 65fefde..370478d 100644
--- a/gst/spectrum/Makefile.am
+++ b/gst/spectrum/Makefile.am
@@ -1,9 +1,10 @@
-filterdir = $(libdir)/gst
+plugindir = $(libdir)/gst
 
-filter_LTLIBRARIES = libgstspectrum.la
+plugin_LTLIBRARIES = libgstspectrum.la
 
 libgstspectrum_la_SOURCES = gstspectrum.c fix_fft.c
 libgstspectrum_la_CFLAGS = $(GST_CFLAGS)
+libgstspectrum_la_LIBADD = $(GST_LIBS)
 
 noinst_HEADERS = gstspectrum.h
 
diff --git a/gst/speed/Makefile.am b/gst/speed/Makefile.am
index c20b1d2..1111a30 100644
--- a/gst/speed/Makefile.am
+++ b/gst/speed/Makefile.am
@@ -1,9 +1,10 @@
-filterdir = $(libdir)/gst
+plugindir = $(libdir)/gst
 
-filter_LTLIBRARIES = libgstspeed.la
+plugin_LTLIBRARIES = libgstspeed.la
 
 libgstspeed_la_SOURCES = gstspeed.c
 libgstspeed_la_CFLAGS = $(GST_CFLAGS)
+libgstspeed_la_LIBADD = $(GST_LIBS)
 
 noinst_HEADERS = gstspeed.h filter.func
 
diff --git a/gst/stereo/Makefile.am b/gst/stereo/Makefile.am
index 69e18c7..1976eba 100644
--- a/gst/stereo/Makefile.am
+++ b/gst/stereo/Makefile.am
@@ -1,9 +1,10 @@
-filterdir = $(libdir)/gst
+plugindir = $(libdir)/gst
 
-filter_LTLIBRARIES = libgststereo.la
+plugin_LTLIBRARIES = libgststereo.la
 
 libgststereo_la_SOURCES = gststereo.c
 libgststereo_la_CFLAGS = $(GST_CFLAGS)
+libgststereo_la_LIBADD = $(GST_LIBS)
 
 noinst_HEADERS = gststereo.h
 
diff --git a/gst/y4m/Makefile.am b/gst/y4m/Makefile.am
index c1f1d34..5972955 100644
--- a/gst/y4m/Makefile.am
+++ b/gst/y4m/Makefile.am
@@ -4,5 +4,6 @@
 
 libgsty4mencode_la_SOURCES = gsty4mencode.c
 libgsty4mencode_la_CFLAGS = $(GST_CFLAGS)
+libgsty4mencode_la_LIBADD = $(GST_LIBS)
 
 noinst_HEADERS = gsty4mencode.h
diff --git a/sys/qcam/Makefile.am b/sys/qcam/Makefile.am
index 9d3430b..523f9ad 100644
--- a/sys/qcam/Makefile.am
+++ b/sys/qcam/Makefile.am
@@ -6,5 +6,6 @@
 
 libgstqcam_la_SOURCES =	gstqcamsrc.c qcam-lib.c exposure.c
 libgstqcam_la_CFLAGS = -O2 $(GST_CFLAGS)
+libgstqcam_la_LIBADD = $(GST_LIBS)
 
 noinst_HEADERS = gstqcamsrc.h qcam-os.h qcam.h qcamip.h qcam-Linux.h
diff --git a/sys/vcd/Makefile.am b/sys/vcd/Makefile.am
index d116c10..bad85a5 100644
--- a/sys/vcd/Makefile.am
+++ b/sys/vcd/Makefile.am
@@ -4,5 +4,6 @@
 
 libvcdsrc_la_SOURCES = vcdsrc.c
 libvcdsrc_la_CFLAGS = $(GST_CFLAGS)
+libvcdsrc_la_LIBADD = $(GST_LIBS)
 
 noinst_HEADERS = vcdsrc.h