-if USE_GCONF
-GCONF_DIR=gconf
-else
-GCONF_DIR=
-endif
-
-if USE_X
-X_DIR=xwindowlistener
-else
-X_DIR=
-endif
-
-SUBDIRS = audio colorbalance floatcast \
- $(GCONF_DIR) idct media-info \
- mixer navigation play propertyprobe \
- resample riff tuner video \
- xoverlay $(X_DIR)
-
-DIST_SUBDIRS = audio colorbalance floatcast \
- gconf idct media-info \
- mixer navigation play propertyprobe \
- resample riff tuner video \
- xoverlay xwindowlistener
-
-
-lib_LTLIBRARIES = libgstinterfaces-@GST_MAJORMINOR@.la
-
-libgstinterfaces_@GST_MAJORMINOR@_la_SOURCES =
-
-libgstinterfaces_@GST_MAJORMINOR@_la_LIBADD = \
- colorbalance/libgstcolorbalance.la \
- mixer/libgstmixer.la \
- navigation/libgstnavigation.la \
- propertyprobe/libgstpropertyprobe.la \
- tuner/libgsttuner.la \
- xoverlay/libgstxoverlay.la \
- $(GST_LIBS)
-
-libgstinterfaces_@GST_MAJORMINOR@_la_LDFLAGS = @GST_PLUGINS_LT_LDFLAGS@ -version-info @GST_PLUGINS_LIBVERSION@
+# The interfaces directory has to be built before the others,
+# otherwise some generated header files will be missing for the
+# plugins in the other directories.
+SUBDIRS = \
+ interfaces \
+ tag \
+ fft \
+ rtp \
+ sdp \
+ rtsp \
+ video \
+ audio \
+ pbutils \
+ riff \
+ app
+noinst_HEADERS = gettext.h gst-i18n-plugin.h glib-compat-private.h
+
+# dependencies:
+audio: interfaces tag
+
+riff: tag audio
+
+rtsp: sdp
+
+pbutils: video audio
+
+INDEPENDENT_SUBDIRS = \
+ interfaces tag audio fft rtp sdp video app
+
+.PHONY: independent-subdirs $(INDEPENDENT_SUBDIRS)
+
+independent-subdirs: $(INDEPENDENT_SUBDIRS)
+
+$(INDEPENDENT_SUBDIRS):
+ $(MAKE) -C $@
+
+all-recursive: independent-subdirs