summaryrefslogtreecommitdiff
path: root/gnuradio-core
diff options
context:
space:
mode:
authorjcorgan2009-05-27 01:54:41 +0000
committerjcorgan2009-05-27 01:54:41 +0000
commit40b8a57d69b4b85f207fb0408347c210e23202cc (patch)
tree8d1e3bbc9159bdd0de98bb897432abd81563dbca /gnuradio-core
parente3cd8f7d59aad0ffd51c417b2623ab02588fdb08 (diff)
downloadgnuradio-40b8a57d69b4b85f207fb0408347c210e23202cc.tar.gz
gnuradio-40b8a57d69b4b85f207fb0408347c210e23202cc.tar.bz2
gnuradio-40b8a57d69b4b85f207fb0408347c210e23202cc.zip
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
Diffstat (limited to 'gnuradio-core')
-rw-r--r--gnuradio-core/gnuradio-core.pc.in5
-rw-r--r--gnuradio-core/src/Makefile.am7
-rw-r--r--gnuradio-core/src/lib/Makefile.am7
-rw-r--r--gnuradio-core/src/lib/filter/Makefile.am3
-rw-r--r--gnuradio-core/src/lib/general/Makefile.am2
-rw-r--r--gnuradio-core/src/lib/gengen/Makefile.am2
-rw-r--r--gnuradio-core/src/lib/hier/Makefile.am2
-rw-r--r--gnuradio-core/src/lib/io/Makefile.am6
-rw-r--r--gnuradio-core/src/lib/runtime/Makefile.am2
-rw-r--r--gnuradio-core/src/lib/swig/Makefile.am2
-rw-r--r--gnuradio-core/src/python/gnuradio/Makefile.am2
11 files changed, 29 insertions, 11 deletions
diff --git a/gnuradio-core/gnuradio-core.pc.in b/gnuradio-core/gnuradio-core.pc.in
index 2c507fa22..dc06fcf89 100644
--- a/gnuradio-core/gnuradio-core.pc.in
+++ b/gnuradio-core/gnuradio-core.pc.in
@@ -7,5 +7,6 @@ Name: gnuradio-core
Description: GNU Software Radio toolkit
Requires: gruel fftw3f gsl gnuradio-omnithread
Version: @VERSION@
-Libs: -L${libdir} -lgnuradio-core @BOOST_LDFLAGS@ @BOOST_THREAD_LIB@ @BOOST_DATE_TIME_LIB@
-Cflags: @BOOST_CPPFLAGS@ @BOOST_CXXFLAGS@ -I${includedir} @DEFINES@
+Libs.private: @BOOST_LDFLAGS@ @BOOST_THREAD_LIB@ @BOOST_DATE_TIME_LIB@
+Libs: -L${libdir} -lgnuradio-core
+Cflags: @BOOST_CPPFLAGS@ @BOOST_CXXFLAGS@ -I${includedir}
diff --git a/gnuradio-core/src/Makefile.am b/gnuradio-core/src/Makefile.am
index 7b325974a..eb979fe58 100644
--- a/gnuradio-core/src/Makefile.am
+++ b/gnuradio-core/src/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2001,2004 Free Software Foundation, Inc.
+# Copyright 2001,2004,2009 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -21,6 +21,9 @@
include $(top_srcdir)/Makefile.common
-SUBDIRS = gen_interpolator_taps lib tests python
+SUBDIRS = gen_interpolator_taps lib tests
+if PYTHON
+SUBDIRS += python
+endif
DIST_SUBDIRS = gen_interpolator_taps lib tests python utils
diff --git a/gnuradio-core/src/lib/Makefile.am b/gnuradio-core/src/lib/Makefile.am
index fcb4d4ea5..ef2b17f5a 100644
--- a/gnuradio-core/src/lib/Makefile.am
+++ b/gnuradio-core/src/lib/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2001,2004 Free Software Foundation, Inc.
+# Copyright 2001,2004,2009 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -24,7 +24,10 @@ include $(top_srcdir)/Makefile.common
## Process this file with automake to produce Makefile.in
# We've got to build . before swig
-SUBDIRS = missing runtime filter viterbi general gengen g72x reed-solomon io hier . swig
+SUBDIRS = missing runtime filter viterbi general gengen g72x reed-solomon io hier .
+if PYTHON
+SUBDIRS += swig
+endif
# generate libgnuradio-core.la from the convenience libraries in subdirs
diff --git a/gnuradio-core/src/lib/filter/Makefile.am b/gnuradio-core/src/lib/filter/Makefile.am
index b7fd0f58a..f46956745 100644
--- a/gnuradio-core/src/lib/filter/Makefile.am
+++ b/gnuradio-core/src/lib/filter/Makefile.am
@@ -293,7 +293,7 @@ noinst_HEADERS = \
qa_gri_mmse_fir_interpolator_cc.h
-
+if PYTHON
swiginclude_HEADERS = \
filter.i \
filter_generated.i \
@@ -310,6 +310,7 @@ swiginclude_HEADERS = \
gr_single_pole_iir_filter_ff.i \
gr_single_pole_iir_filter_cc.i \
$(GENERATED_I)
+endif
# Do creation and inclusion of other Makefiles last
diff --git a/gnuradio-core/src/lib/general/Makefile.am b/gnuradio-core/src/lib/general/Makefile.am
index 4ceb72486..5564ee3d4 100644
--- a/gnuradio-core/src/lib/general/Makefile.am
+++ b/gnuradio-core/src/lib/general/Makefile.am
@@ -353,6 +353,7 @@ noinst_HEADERS = \
sine_table.h \
qa_gr_math.h
+if PYTHON
swiginclude_HEADERS = \
general.i \
gr_agc_cc.i \
@@ -478,3 +479,4 @@ swiginclude_HEADERS = \
gr_scrambler_bb.i \
gr_probe_mpsk_snr_c.i \
gr_probe_density_b.i
+endif
diff --git a/gnuradio-core/src/lib/gengen/Makefile.am b/gnuradio-core/src/lib/gengen/Makefile.am
index db7bee02f..4978ad1c5 100644
--- a/gnuradio-core/src/lib/gengen/Makefile.am
+++ b/gnuradio-core/src/lib/gengen/Makefile.am
@@ -135,11 +135,13 @@ grinclude_HEADERS = \
gr_noise_type.h \
gr_sig_source_waveform.h
+if PYTHON
swiginclude_HEADERS = \
$(GENERATED_I) \
gr_endianness.i \
gengen.i \
gengen_generated.i
+endif
# Do creation and inclusion of other Makefiles last
diff --git a/gnuradio-core/src/lib/hier/Makefile.am b/gnuradio-core/src/lib/hier/Makefile.am
index b525d19b4..e2e7fe886 100644
--- a/gnuradio-core/src/lib/hier/Makefile.am
+++ b/gnuradio-core/src/lib/hier/Makefile.am
@@ -32,6 +32,8 @@ libhier_la_SOURCES = \
grinclude_HEADERS = \
gr_channel_model.h
+if PYTHON
swiginclude_HEADERS = \
hier.i \
gr_channel_model.i
+endif
diff --git a/gnuradio-core/src/lib/io/Makefile.am b/gnuradio-core/src/lib/io/Makefile.am
index 4583a033c..9eacd137d 100644
--- a/gnuradio-core/src/lib/io/Makefile.am
+++ b/gnuradio-core/src/lib/io/Makefile.am
@@ -93,9 +93,7 @@ grinclude_HEADERS = \
gr_wavfile_sink.h \
gri_wavfile.h
-
-
-
+if PYTHON
swiginclude_HEADERS = \
io.i \
gr_file_sink.i \
@@ -116,4 +114,4 @@ swiginclude_HEADERS = \
gr_udp_source.i \
gr_wavfile_source.i \
gr_wavfile_sink.i
-
+endif
diff --git a/gnuradio-core/src/lib/runtime/Makefile.am b/gnuradio-core/src/lib/runtime/Makefile.am
index af5e4980d..14ab464ad 100644
--- a/gnuradio-core/src/lib/runtime/Makefile.am
+++ b/gnuradio-core/src/lib/runtime/Makefile.am
@@ -135,6 +135,7 @@ noinst_HEADERS = \
qa_gr_vmcircbuf.h \
qa_runtime.h
+if PYTHON
swiginclude_HEADERS = \
gr_basic_block.i \
gr_block.i \
@@ -154,3 +155,4 @@ swiginclude_HEADERS = \
gr_sync_interpolator.i \
gr_top_block.i \
runtime.i
+endif
diff --git a/gnuradio-core/src/lib/swig/Makefile.am b/gnuradio-core/src/lib/swig/Makefile.am
index 75b152dc0..242f27d9c 100644
--- a/gnuradio-core/src/lib/swig/Makefile.am
+++ b/gnuradio-core/src/lib/swig/Makefile.am
@@ -21,6 +21,7 @@
include $(top_srcdir)/Makefile.common
+if PYTHON
AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) -I$(srcdir) \
$(WITH_INCLUDES)
@@ -99,3 +100,4 @@ BUILT_SOURCES = \
# Do not distribute the output of SWIG
no_dist_files = $(swig_built_sources)
+endif
diff --git a/gnuradio-core/src/python/gnuradio/Makefile.am b/gnuradio-core/src/python/gnuradio/Makefile.am
index 5cc0824b3..ed36bbae7 100644
--- a/gnuradio-core/src/python/gnuradio/Makefile.am
+++ b/gnuradio-core/src/python/gnuradio/Makefile.am
@@ -21,6 +21,7 @@
include $(top_srcdir)/Makefile.common
+if PYTHON
SUBDIRS = gr gru gruimpl blks2 blks2impl vocoder
grpython_PYTHON = \
@@ -34,3 +35,4 @@ grpython_PYTHON = \
gr_unittest.py \
optfir.py \
window.py
+endif