[farsight2/master] Use a convenience lib to avoid building everything twice

Olivier Crête olivier.crete at collabora.co.uk
Tue Apr 28 14:10:51 PDT 2009


---
 gst/fsrtpconference/Makefile.am |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/gst/fsrtpconference/Makefile.am b/gst/fsrtpconference/Makefile.am
index 278e2b2..4d61076 100644
--- a/gst/fsrtpconference/Makefile.am
+++ b/gst/fsrtpconference/Makefile.am
@@ -1,6 +1,10 @@
 plugin_LTLIBRARIES = libfsrtpconference.la
 
-common_SOURCES = \
+# First build a convenience lib with the common stuff so its not built twice
+
+noinst_LTLIBRARIES = libfsrtpconference-convenience.la
+
+libfsrtpconference_convenience_la_SOURCES = \
 	fs-rtp-conference.c \
 	fs-rtp-participant.c \
 	fs-rtp-session.c \
@@ -14,14 +18,15 @@ common_SOURCES = \
 	fs-rtp-dtmf-event-source.c \
 	fs-rtp-dtmf-sound-source.c
 
-libfsrtpconference_la_SOURCES = gstfsrtpconference.c $(common_SOURCES)
-
-nodist_libfsrtpconference_la_SOURCES = \
+nodist_libfsrtpconference_convenience_la_SOURCES = \
 	fs-rtp-marshal.c \
 	fs-rtp-marshal.h
 
+BUILT_SOURCES = $(nodist_libfsrtpconference_convenience_la_SOURCES)
 
-BUILT_SOURCES = $(nodist_libfsrtpconference_la_SOURCES)
+# Build the main plugin
+
+libfsrtpconference_la_SOURCES = gstfsrtpconference.c
 
 noinst_HEADERS = \
 	fs-rtp-conference.h \
@@ -39,13 +44,14 @@ noinst_HEADERS = \
 
 CLEANFILES = $(BUILT_SOURCES) fs-rtp-marshal.list
 
-libfsrtpconference_la_CFLAGS = \
+AM_CFLAGS = \
 	$(FS2_INTERNAL_CFLAGS) \
 	$(FS2_CFLAGS) \
 	$(GST_PLUGINS_BASE_CFLAGS) \
 	$(GST_CFLAGS)
-libfsrtpconference_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+
 libfsrtpconference_la_LIBADD = \
+	libfsrtpconference-convenience.la \
 	$(top_builddir)/gst-libs/gst/farsight/libgstfarsight-0.10.la \
 	$(FS2_LIBS) \
 	$(GST_PLUGINS_BASE_LIBS) \
@@ -53,14 +59,14 @@ libfsrtpconference_la_LIBADD = \
 	-lgstrtp- at GST_MAJORMINOR@
 
 
+# Optionally build a library to allow building the gtk-doc
+
 if ENABLE_GTK_DOC
-noinst_LTLIBRARIES = libfsrtpconference_doc.la
+noinst_LTLIBRARIES += libfsrtpconference_doc.la
 
 nodist_libfsrtpconference_doc_la_SOURCES = \
 	gstfsrtpconference_doc.c  \
-	$(common_SOURCES) \
 	$(nodist_libfsrtpconference_la_SOURCES)
-libfsrtpconference_doc_la_CFLAGS = $(libfsrtpconference_la_CFLAGS)
 libfsrtpconference_doc_la_LIBADD = $(libfsrtpconference_la_LIBADD)
 
 gstfsrtpconference_doc.c: gstfsrtpconference.c
@@ -73,7 +79,7 @@ endif
 fs-rtp-marshal.list: $(libfsrtpconference_la_SOURCES) Makefile.am
 	( cd $(srcdir) && \
 	sed -n -e 's/.*fs_rtp_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
-	$(libfsrtpconference_la_SOURCES) ) \
+	$(libfsrtpconference_convenience_la_SOURCES) ) \
 	| sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
 	if cmp -s $@.tmp $@; then \
 		rm $@.tmp; \
-- 
1.5.6.5



More information about the farsight-commits mailing list