From 40b8a57d69b4b85f207fb0408347c210e23202cc Mon Sep 17 00:00:00 2001
From: jcorgan
Date: Wed, 27 May 2009 01:54:41 +0000
Subject: Merged r11123:11148 from jcorgan/np into trunk.

Adds --enable-python option to configure (defaults to yes).

Using --disable-python or --enable-python=no will cause only
C++ API targets to be created and installed.

Several new shared libraries are now created.  Where in the past,
the C++ objects of the actual gnuradio blocks that were in a component
were hidden inside their corresponding Python extension modules, these
are now split out into a libgnuradio-foo.so library, and the _foo.so
Python module is linked to that.  This has been the way several top-
level components have operated for some time, such as gr-audio-alsa
and gr-usrp and gr-usrp2.  This changeset applies that pattern to all
components.

C++ API users can use pkg-config to discover the cflags and libs 
parameters needed to include and link against these libraries.

These components have not been tested:

gr-comedi
gr-audio-osx
gr-audio-windows

Passes distcheck.



git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11150 221aa14e-8319-0410-a670-987f0aec2ac5
---
 gr-audio-windows/src/Makefile.am | 36 ++++++++++++++++++++----------------
 1 file changed, 20 insertions(+), 16 deletions(-)

(limited to 'gr-audio-windows')

diff --git a/gr-audio-windows/src/Makefile.am b/gr-audio-windows/src/Makefile.am
index 1a8ededa6..dc91e140c 100644
--- a/gr-audio-windows/src/Makefile.am
+++ b/gr-audio-windows/src/Makefile.am
@@ -23,21 +23,34 @@ include $(top_srcdir)/Makefile.common
 
 EXTRA_DIST = run_tests.in
 
-TESTS = run_tests
-
-DISTCLEANFILES = run_tests
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
 noinst_PYTHON = qa_audio_windows.py
 
-AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
-
 # C/C++ headers get installed in ${prefix}/include/gnuradio
 grinclude_HEADERS =			\
 	audio_windows_sink.h		\
 	audio_windows_source.h
 
+lib_LTLIBRARIES = libgnuradio-audio-windows.la
+
+libgnuradio_audio_windows_la_SOURCES = 	\
+	audio_windows_sink.cc		\
+	audio_windows_source.cc		
+
+libgnuradio_audio_windows_la_LIBADD =	\
+	$(GNURADIO_CORE_LA)		\
+	$(WINAUDIO_LIBS)
+
+libgnuradio_audio_windows_la_LDFLAGS =	\
+	$(LIBGNURADIO_CORE_EXTRA_LDFLAGS) \
+	$(NO_UNDEFINED)
+
+if PYTHON
 ###################################
 # SWIG Python interface and library
+TESTS = run_tests
+DISTCLEANFILES = run_tests
 
 TOP_SWIG_IFILES = 			\
 	audio_windows.i
@@ -49,19 +62,9 @@ TOP_SWIG_IFILES = 			\
 audio_windows_pythondir_category =	\
 	gnuradio
 
-# additional sources for the SWIG-generated library
-audio_windows_la_swig_sources = 	\
-	audio_windows_sink.cc		\
-	audio_windows_source.cc		
-
 # additional libraries for linking with the SWIG-generated library
 audio_windows_la_swig_libadd =		\
-	$(GNURADIO_CORE_LA)		\
-	$(WINAUDIO_LIBS)
-
-# additional LD flags for linking the SWIG-generated library
-audio_windows_la_swig_ldflags =		\
-	$(LIBGNURADIO_CORE_EXTRA_LDFLAGS)
+	libgnuradio-audio-windows.la
 
 include $(top_srcdir)/Makefile.swig
 
@@ -70,3 +73,4 @@ BUILT_SOURCES = $(swig_built_sources)
 
 # Do not distribute the output of SWIG
 no_dist_files = $(swig_built_sources)
+endif
-- 
cgit