summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2011-09-01 12:11:07 -0400
committerTom Rondeau <trondeau@vt.edu>2011-09-01 13:49:58 -0400
commit0e962fd8e859f313c9483d6c3444200977a70022 (patch)
tree1da196f2407d774b9eaab5a3302898983c011238
parente17dbbcda50bdb851227c67e68c9d3e2e7732468 (diff)
digital: adding CPM C++ hier block, which adds a hier directory to gr-digital. Reworked build system to include this in the libraries and modules built.
-rw-r--r--Makefile.common4
-rw-r--r--config/grc_gr_digital.m416
-rw-r--r--gr-digital/Makefile.am2
-rw-r--r--gr-digital/hier/Makefile.am14
-rw-r--r--gr-digital/hier/_digital_hier.i (renamed from gr-digital/hier/digital_hier.i)8
-rw-r--r--gr-digital/hier/digital_cpmmod_bc.cc (renamed from gr-digital/hier/gr_cpmmod_bc.cc)24
-rw-r--r--gr-digital/hier/digital_cpmmod_bc.h (renamed from gr-digital/hier/gr_cpmmod_bc.h)32
-rw-r--r--gr-digital/hier/digital_cpmmod_bc.i (renamed from gr-digital/hier/gr_cpmmod_bc.i)20
-rw-r--r--gr-digital/hier/digital_gmskmod_bc.cc (renamed from gr-digital/hier/gr_gmskmod_bc.cc)14
-rw-r--r--gr-digital/hier/digital_gmskmod_bc.h (renamed from gr-digital/hier/gr_gmskmod_bc.h)27
-rw-r--r--gr-digital/hier/digital_gmskmod_bc.i (renamed from gr-digital/hier/gr_gmskmod_bc.i)16
-rw-r--r--gr-digital/lib/Makefile.am3
-rw-r--r--gr-digital/python/Makefile.am1
-rwxr-xr-xgr-digital/python/qa_cpm.py (renamed from gnuradio-core/src/python/gnuradio/gr/qa_cpm.py)5
-rw-r--r--gr-digital/swig/Makefile.am10
-rw-r--r--gr-digital/swig/Makefile.swig.gen148
-rw-r--r--gr-digital/swig/digital_hier.i40
-rw-r--r--gr-digital/swig/digital_swig.i1
18 files changed, 299 insertions, 86 deletions
diff --git a/Makefile.common b/Makefile.common
index 20b8a78cf0..2a5addd65b 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -110,6 +110,10 @@ GCELL_SPU_LA = @gcell_spu_LA@
# libtool aware wrapper for ppu-embedspu
GCELL_EMBEDSPU_LIBTOOL = @abs_top_srcdir@/gcell/lib/runtime/gcell-embedspu-libtool
+# GR-DIGITAL includes and libraries
+GR_DIGITAL_INCLUDES = @gr_digital_INCLUDES@
+GR_DIGITAL_LA = @gr_digital_LA@
+
# Fix for BSD make not defining $(RM). We define it now in configure.ac
# using AM_PATH_PROG, but now here have to add a -f to be like GNU make
RM=$(RM_PROG) -f
diff --git a/config/grc_gr_digital.m4 b/config/grc_gr_digital.m4
index bde4a30873..d7c1d605f8 100644
--- a/config/grc_gr_digital.m4
+++ b/config/grc_gr_digital.m4
@@ -23,6 +23,22 @@ AC_DEFUN([GRC_GR_DIGITAL],[
dnl Don't do gr-digital if gnuradio-core skipped
GRC_CHECK_DEPENDENCY(gr-digital, gnuradio-core)
+ if test $passed != with; then
+ dnl how and where to find INCLUDES and LA and such
+ gr_digital_INCLUDES="\
+-I\${abs_top_srcdir}/gr-digital/lib \
+-I\${abs_top_srcdir}/gr-digital/hier \
+-I\${abs_top_srcdir}/gr-digital/swig"
+ gr_digital_LA="\${abs_top_builddir}/gr-digital/lib/libgnuradio-core.la"
+ gr_digital_LIBDIRPATH="\${abs_top_builddir}/gr-digital/lib:\${abs_top_builddir}/gr-digital/lib/.libs"
+ gr_digital_SWIGDIRPATH="\${abs_top_builddir}/gr-digtial/lib/swig:\${abs_top_builddir}/gr-digital/swig/.libs:\${abs_top_srcdir}/gr-digital/swig"
+ gr_digital_PYDIRPATH="\${abs_top_srcdir}/gr-digital/python"
+ fi
+
+ AC_SUBST(gr_digital_I)
+ AC_SUBST(gr_digital_SWIGDIRPATH)
+ AC_SUBST(gr_digital_PYDIRPATH)
+
AC_CONFIG_FILES([\
gr-digital/Makefile \
gr-digital/gnuradio-digital.pc \
diff --git a/gr-digital/Makefile.am b/gr-digital/Makefile.am
index 57bfb1e0d8..346db120f5 100644
--- a/gr-digital/Makefile.am
+++ b/gr-digital/Makefile.am
@@ -21,7 +21,7 @@
include $(top_srcdir)/Makefile.common
-SUBDIRS = lib hier
+SUBDIRS = hier lib
if PYTHON
SUBDIRS += swig python apps grc examples
diff --git a/gr-digital/hier/Makefile.am b/gr-digital/hier/Makefile.am
index a51689ed6a..b11b85f77c 100644
--- a/gr-digital/hier/Makefile.am
+++ b/gr-digital/hier/Makefile.am
@@ -26,15 +26,15 @@ AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(WITH_INCLUDES)
noinst_LTLIBRARIES = libdigital_hier.la
libdigital_hier_la_SOURCES = \
- gr_gmskmod_bc.cc \
- gr_cpmmod_bc.cc
+ digital_gmskmod_bc.cc \
+ digital_cpmmod_bc.cc
grinclude_HEADERS = \
- gr_gmskmod_bc.h \
- gr_cpmmod_bc.h
+ digital_gmskmod_bc.h \
+ digital_cpmmod_bc.h
swiginclude_HEADERS = \
- digital_hier.i \
- gr_gmskmod_bc.i \
- gr_cpmmod_bc.i
+ _digital_hier.i \
+ digital_gmskmod_bc.i \
+ digital_cpmmod_bc.i
diff --git a/gr-digital/hier/digital_hier.i b/gr-digital/hier/_digital_hier.i
index c24d0f7777..022e38644b 100644
--- a/gr-digital/hier/digital_hier.i
+++ b/gr-digital/hier/_digital_hier.i
@@ -25,9 +25,9 @@
#include "config.h"
#endif
-#include <gr_cpmmod_bc.h>
-#include <gr_gmskmod_bc.h>
+#include <digital_cpmmod_bc.h>
+#include <digital_gmskmod_bc.h>
%}
-%include "gr_cpmmod_bc.i"
-%include "gr_gmskmod_bc.i"
+%include "digital_cpmmod_bc.i"
+%include "digital_gmskmod_bc.i"
diff --git a/gr-digital/hier/gr_cpmmod_bc.cc b/gr-digital/hier/digital_cpmmod_bc.cc
index e0e39f0dcf..a95b604d14 100644
--- a/gr-digital/hier/gr_cpmmod_bc.cc
+++ b/gr-digital/hier/digital_cpmmod_bc.cc
@@ -22,26 +22,26 @@
#include "config.h"
#endif
-#include <gr_cpmmod_bc.h>
+#include <digital_cpmmod_bc.h>
#include <gr_io_signature.h>
// Shared pointer constructor
-gr_cpmmod_bc_sptr
-gr_make_cpmmod_bc(int type, float h,
- unsigned samples_per_sym,
- unsigned L, double beta)
+digital_cpmmod_bc_sptr
+digital_make_cpmmod_bc(int type, float h,
+ unsigned samples_per_sym,
+ unsigned L, double beta)
{
- return gnuradio::get_initial_sptr(new gr_cpmmod_bc((gr_cpm::cpm_type)type,
- h, samples_per_sym,
- L, beta));
+ return gnuradio::get_initial_sptr(new digital_cpmmod_bc((gr_cpm::cpm_type)type,
+ h, samples_per_sym,
+ L, beta));
}
-gr_cpmmod_bc::gr_cpmmod_bc(gr_cpm::cpm_type type, float h,
- unsigned samples_per_sym,
- unsigned L, double beta)
- : gr_hier_block2("gr_cpmmod_bc",
+digital_cpmmod_bc::digital_cpmmod_bc(gr_cpm::cpm_type type, float h,
+ unsigned samples_per_sym,
+ unsigned L, double beta)
+ : gr_hier_block2("digital_cpmmod_bc",
gr_make_io_signature(1, 1, sizeof(char)),
gr_make_io_signature2(1, 1, sizeof(gr_complex), sizeof(float))),
d_taps(gr_cpm::phase_response(type, samples_per_sym, L, beta)),
diff --git a/gr-digital/hier/gr_cpmmod_bc.h b/gr-digital/hier/digital_cpmmod_bc.h
index 55ea6edd17..6212fc777b 100644
--- a/gr-digital/hier/gr_cpmmod_bc.h
+++ b/gr-digital/hier/digital_cpmmod_bc.h
@@ -20,8 +20,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef INCLUDED_GR_CPMMOD_BC_H
-#define INCLUDED_GR_CPMMOD_BC_H
+#ifndef INCLUDED_DIGITAL_CPMMOD_BC_H
+#define INCLUDED_DIGITAL_CPMMOD_BC_H
#include <gr_hier_block2.h>
#include <gr_char_to_float.h>
@@ -30,14 +30,14 @@
#include <gr_cpm.h>
-class gr_cpmmod_bc;
-typedef boost::shared_ptr<gr_cpmmod_bc> gr_cpmmod_bc_sptr;
+class digital_cpmmod_bc;
+typedef boost::shared_ptr<digital_cpmmod_bc> digital_cpmmod_bc_sptr;
-gr_cpmmod_bc_sptr
-gr_make_cpmmod_bc(int type, float h,
- unsigned samples_per_sym,
- unsigned L, double beta=0.3);
+digital_cpmmod_bc_sptr
+digital_make_cpmmod_bc(int type, float h,
+ unsigned samples_per_sym,
+ unsigned L, double beta=0.3);
/*!
* \brief Generic CPM modulator
@@ -70,11 +70,11 @@ gr_make_cpmmod_bc(int type, float h,
* The modulator will silently accept any other inputs, though.
* The output is the phase-modulated signal.
*/
-class gr_cpmmod_bc : public gr_hier_block2
+class digital_cpmmod_bc : public gr_hier_block2
{
- friend gr_cpmmod_bc_sptr gr_make_cpmmod_bc(int type, float h,
- unsigned samples_per_sym,
- unsigned L, double beta);
+ friend digital_cpmmod_bc_sptr digital_make_cpmmod_bc(int type, float h,
+ unsigned samples_per_sym,
+ unsigned L, double beta);
std::vector<float> d_taps;
gr_char_to_float_sptr d_char_to_float;
@@ -82,14 +82,14 @@ class gr_cpmmod_bc : public gr_hier_block2
gr_frequency_modulator_fc_sptr d_fm;
protected:
- gr_cpmmod_bc(gr_cpm::cpm_type type, float h,
- unsigned samples_per_sym,
- unsigned L, double beta);
+ digital_cpmmod_bc(gr_cpm::cpm_type type, float h,
+ unsigned samples_per_sym,
+ unsigned L, double beta);
public:
//! Return the phase response FIR taps
std::vector<float> get_taps() { return d_taps; };
};
-#endif /* INCLUDED_GR_CPMMOD_BC_H */
+#endif /* INCLUDED_DIGITAL_CPMMOD_BC_H */
diff --git a/gr-digital/hier/gr_cpmmod_bc.i b/gr-digital/hier/digital_cpmmod_bc.i
index dc38fea175..fa7c50da75 100644
--- a/gr-digital/hier/gr_cpmmod_bc.i
+++ b/gr-digital/hier/digital_cpmmod_bc.i
@@ -20,20 +20,20 @@
* Boston, MA 02110-1301, USA.
*/
-GR_SWIG_BLOCK_MAGIC(gr, cpmmod_bc)
+GR_SWIG_BLOCK_MAGIC(digital, cpmmod_bc)
-gr_cpmmod_bc_sptr
-gr_make_cpmmod_bc(int type, float h,
- unsigned samples_per_sym,
- unsigned L, double beta=0.3);
+digital_cpmmod_bc_sptr
+digital_make_cpmmod_bc(int type, float h,
+ unsigned samples_per_sym,
+ unsigned L, double beta=0.3);
-class gr_cpmmod_bc : public gr_hier_block2
+class digital_cpmmod_bc : public gr_hier_block2
{
private:
- gr_cpmmod_bc(int type, float h,
- unsigned samples_per_sym,
- unsigned L, double beta);
-
+ digital_cpmmod_bc(int type, float h,
+ unsigned samples_per_sym,
+ unsigned L, double beta);
+
public:
std::vector<float> get_taps();
};
diff --git a/gr-digital/hier/gr_gmskmod_bc.cc b/gr-digital/hier/digital_gmskmod_bc.cc
index 22287d014e..e53e900370 100644
--- a/gr-digital/hier/gr_gmskmod_bc.cc
+++ b/gr-digital/hier/digital_gmskmod_bc.cc
@@ -24,19 +24,21 @@
#include "config.h"
#endif
-#include <gr_gmskmod_bc.h>
+#include <digital_gmskmod_bc.h>
#include <gr_io_signature.h>
// Shared pointer constructor
-gr_gmskmod_bc_sptr
-gr_make_gmskmod_bc(unsigned samples_per_sym, double bt, unsigned L)
+digital_gmskmod_bc_sptr
+digital_make_gmskmod_bc(unsigned samples_per_sym,
+ double bt, unsigned L)
{
- return gnuradio::get_initial_sptr(new gr_gmskmod_bc(samples_per_sym, bt, L));
+ return gnuradio::get_initial_sptr(new digital_gmskmod_bc(samples_per_sym, bt, L));
}
-gr_gmskmod_bc::gr_gmskmod_bc(unsigned samples_per_sym, double bt, unsigned L)
- : gr_cpmmod_bc(gr_cpm::GAUSSIAN, 0.5, samples_per_sym, L, bt)
+digital_gmskmod_bc::digital_gmskmod_bc(unsigned samples_per_sym,
+ double bt, unsigned L)
+ : digital_cpmmod_bc(gr_cpm::GAUSSIAN, 0.5, samples_per_sym, L, bt)
{
}
diff --git a/gr-digital/hier/gr_gmskmod_bc.h b/gr-digital/hier/digital_gmskmod_bc.h
index c3d2c8194a..92b53cd4b3 100644
--- a/gr-digital/hier/gr_gmskmod_bc.h
+++ b/gr-digital/hier/digital_gmskmod_bc.h
@@ -20,18 +20,18 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef INCLUDED_GR_GMSKMOD_BC_H
-#define INCLUDED_GR_GMSKMOD_BC_H
+#ifndef INCLUDED_DIGITAL_GMSKMOD_BC_H
+#define INCLUDED_DIGITAL_GMSKMOD_BC_H
-#include <gr_cpmmod_bc.h>
+#include <digital_cpmmod_bc.h>
-class gr_gmskmod_bc;
-typedef boost::shared_ptr<gr_gmskmod_bc> gr_gmskmod_bc_sptr;
+class digital_gmskmod_bc;
+typedef boost::shared_ptr<digital_gmskmod_bc> digital_gmskmod_bc_sptr;
-gr_gmskmod_bc_sptr
-gr_make_gmskmod_bc(unsigned samples_per_sym=2,
- double bt=0.3, unsigned L=4);
+digital_gmskmod_bc_sptr
+digital_make_gmskmod_bc(unsigned samples_per_sym=2,
+ double bt=0.3, unsigned L=4);
/*!
* \brief GMSK modulator
@@ -49,12 +49,13 @@ gr_make_gmskmod_bc(unsigned samples_per_sym=2,
* The modulator will silently accept any other inputs, though.
* The output is the phase-modulated signal.
*/
-class gr_gmskmod_bc : public gr_cpmmod_bc
+class digital_gmskmod_bc : public digital_cpmmod_bc
{
- friend gr_gmskmod_bc_sptr gr_make_gmskmod_bc(unsigned samples_per_sym,
- double bt, unsigned L);
- gr_gmskmod_bc(unsigned samples_per_sym, double bt, unsigned L);
+ friend digital_gmskmod_bc_sptr digital_make_gmskmod_bc(unsigned samples_per_sym,
+ double bt, unsigned L);
+ digital_gmskmod_bc(unsigned samples_per_sym,
+ double bt, unsigned L);
};
-#endif /* INCLUDED_GR_GMSKMOD_BC_H */
+#endif /* INCLUDED_DIGITAL_GMSKMOD_BC_H */
diff --git a/gr-digital/hier/gr_gmskmod_bc.i b/gr-digital/hier/digital_gmskmod_bc.i
index 9e59b279b2..ad7b82237e 100644
--- a/gr-digital/hier/gr_gmskmod_bc.i
+++ b/gr-digital/hier/digital_gmskmod_bc.i
@@ -20,18 +20,18 @@
* Boston, MA 02110-1301, USA.
*/
-GR_SWIG_BLOCK_MAGIC(gr, gmskmod_bc)
+GR_SWIG_BLOCK_MAGIC(digital, gmskmod_bc)
-gr_gmskmod_bc_sptr
-gr_make_gmskmod_bc(unsigned samples_per_sym=2,
- double bt=0.3, unsigned L=4);
+digital_gmskmod_bc_sptr
+digital_make_gmskmod_bc(unsigned samples_per_sym=2,
+ double bt=0.3, unsigned L=4);
-class gr_gmskmod_bc : public gr_hier_block2
+class digital_gmskmod_bc : public gr_hier_block2
{
private:
- gr_cpmmod_bc(int type, float h,
- unsigned samples_per_sym,
- double beta, unsigned L);
+ digital_cpmmod_bc(int type, float h,
+ unsigned samples_per_sym,
+ double beta, unsigned L);
public:
std::vector<float> get_taps();
diff --git a/gr-digital/lib/Makefile.am b/gr-digital/lib/Makefile.am
index 34988d9a2e..60db19821c 100644
--- a/gr-digital/lib/Makefile.am
+++ b/gr-digital/lib/Makefile.am
@@ -60,6 +60,7 @@ libgnuradio_digital_la_SOURCES = \
digital_mpsk_receiver_cc.cc
libgnuradio_digital_la_LIBADD = \
- $(GNURADIO_CORE_LA)
+ $(GNURADIO_CORE_LA) \
+ $(abs_top_builddir)/gr-digital/hier/libdigital_hier.la
libgnuradio_digital_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS)
diff --git a/gr-digital/python/Makefile.am b/gr-digital/python/Makefile.am
index 6c61002f16..a33e4963d6 100644
--- a/gr-digital/python/Makefile.am
+++ b/gr-digital/python/Makefile.am
@@ -35,6 +35,7 @@ noinst_PYTHON = \
qa_binary_slicer_fb.py \
qa_clock_recovery_mm.py \
qa_cma_equalizer.py \
+ qa_cpm.py \
qa_constellation.py \
qa_constellation_receiver.py \
qa_constellation_decoder_cb.py \
diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_cpm.py b/gr-digital/python/qa_cpm.py
index 776173466c..12a84c76c2 100755
--- a/gnuradio-core/src/python/gnuradio/gr/qa_cpm.py
+++ b/gr-digital/python/qa_cpm.py
@@ -21,6 +21,7 @@
#
from gnuradio import gr, gr_unittest
+import digital_swig
import numpy
class test_cpm(gr_unittest.TestCase):
@@ -36,7 +37,7 @@ class test_cpm(gr_unittest.TestCase):
L = 1
in_bits = (1,) * 20
src = gr.vector_source_b(in_bits, False)
- cpm = gr.cpmmod_bc(type, 0.5, sps, L)
+ cpm = digital_swig.cpmmod_bc(type, 0.5, sps, L)
arg = gr.complex_to_arg()
sink = gr.vector_sink_f()
@@ -67,7 +68,7 @@ class test_cpm(gr_unittest.TestCase):
bt = 0.3
in_bits = (1,) * 20
src = gr.vector_source_b(in_bits, False)
- gmsk = gr.gmskmod_bc(sps, bt, L)
+ gmsk = digital_swig.gmskmod_bc(sps, bt, L)
arg = gr.complex_to_arg()
sink = gr.vector_sink_f()
diff --git a/gr-digital/swig/Makefile.am b/gr-digital/swig/Makefile.am
index c0d28c24c6..6604665b0f 100644
--- a/gr-digital/swig/Makefile.am
+++ b/gr-digital/swig/Makefile.am
@@ -26,8 +26,7 @@ TESTS =
EXTRA_DIST += $(nobase_guile_DATA)
AM_CPPFLAGS = \
- -I$(abs_top_srcdir)/gr-digital/lib \
- -I$(abs_top_builddir)/gr-digital/lib \
+ $(GR_DIGITAL_INCLUDES) \
$(STD_DEFINES_AND_INCLUDES) \
$(PYTHON_CPPFLAGS) \
$(WITH_INCLUDES)
@@ -43,6 +42,7 @@ noinst_GUILE = digital.test
##############################
# SWIG interface and library
TOP_SWIG_IFILES = \
+ digital_hier.i \
digital_swig.i
# Install so that they end up available as:
@@ -73,9 +73,11 @@ digital_swig_swiginclude_headers = \
digital_kurtotic_equalizer_cc.i \
digital_mpsk_receiver_cc.i
+digital_hier_swig_args = \
+ $(GR_DIGITAL_INCLUDES)
+
digital_swig_swig_args = \
- -I$(abs_top_srcdir)/gr-digital/lib \
- -I$(abs_top_builddir)/gr-digital/lib
+ $(GR_DIGITAL_INCLUDES)
if GUILE
TESTS += run_guile_tests
diff --git a/gr-digital/swig/Makefile.swig.gen b/gr-digital/swig/Makefile.swig.gen
index bd9aabcea1..95d6aea899 100644
--- a/gr-digital/swig/Makefile.swig.gen
+++ b/gr-digital/swig/Makefile.swig.gen
@@ -101,8 +101,7 @@ _digital_swig_la_LDFLAGS = \
_digital_swig_la_CXXFLAGS = \
$(STD_SWIG_CXX_FLAGS) \
- -I$(top_builddir) \
- $(digital_swig_la_swig_cxxflags)
+ -I$(top_builddir)
python/digital_swig.cc: digital_swig.py
digital_swig.py: digital_swig.i
@@ -143,3 +142,148 @@ gnuradio/digital_swig-primitive.scm: gnuradio/digital_swig.scm
endif # end of GUILE
+# -*- Makefile -*-
+#
+# Copyright 2009,2011 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+# Makefile.swig.gen for digital_hier.i
+
+## Default install locations for these files:
+##
+## Default location for the Python directory is:
+## ${prefix}/lib/python${python_version}/site-packages/[category]/digital_hier
+## Default location for the Python exec directory is:
+## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/digital_hier
+##
+## The following can be overloaded to change the install location, but
+## this has to be done in the including Makefile.am -before-
+## Makefile.swig is included.
+
+digital_hier_pythondir_category ?= gnuradio/digital_hier
+digital_hier_pylibdir_category ?= $(digital_hier_pythondir_category)
+digital_hier_pythondir = $(pythondir)/$(digital_hier_pythondir_category)
+digital_hier_pylibdir = $(pyexecdir)/$(digital_hier_pylibdir_category)
+
+# The .so libraries for the guile modules get installed whereever guile
+# is installed, usually /usr/lib/guile/gnuradio/
+# FIXME: determince whether these should be installed with gnuradio.
+digital_hier_scmlibdir = $(libdir)
+
+# The scm files for the guile modules get installed where ever guile
+# is installed, usually /usr/share/guile/site/digital_hier
+# FIXME: determince whether these should be installed with gnuradio.
+digital_hier_scmdir = $(guiledir)
+
+## SWIG headers are always installed into the same directory.
+
+digital_hier_swigincludedir = $(swigincludedir)
+
+## This is a template file for a "generated" Makefile addition (in
+## this case, "Makefile.swig.gen"). By including the top-level
+## Makefile.swig, this file will be used to generate the SWIG
+## dependencies. Assign the variable TOP_SWIG_FILES to be the list of
+## SWIG .i files to generated wrappings for; there can be more than 1
+## so long as the names are unique (no sorting is done on the
+## TOP_SWIG_FILES list). This file explicitly assumes that a SWIG .i
+## file will generate .cc, .py, and possibly .h files -- meaning that
+## all of these files will have the same base name (that provided for
+## the SWIG .i file).
+##
+## This code is setup to ensure parallel MAKE ("-j" or "-jN") does the
+## right thing. For more info, see <
+## http://sources.redhat.com/automake/automake.html#Multiple-Outputs >
+
+## Other cleaned files: dependency files generated by SWIG or this Makefile
+
+MOSTLYCLEANFILES += $(DEPDIR)/*.S*
+
+## Various SWIG variables. These can be overloaded in the including
+## Makefile.am by setting the variable value there, then including
+## Makefile.swig .
+
+digital_hier_swiginclude_HEADERS = \
+ digital_hier.i \
+ $(digital_hier_swiginclude_headers)
+
+if PYTHON
+digital_hier_pylib_LTLIBRARIES = \
+ _digital_hier.la
+
+_digital_hier_la_SOURCES = \
+ python/digital_hier.cc \
+ $(digital_hier_la_swig_sources)
+
+digital_hier_python_PYTHON = \
+ digital_hier.py \
+ $(digital_hier_python)
+
+_digital_hier_la_LIBADD = \
+ $(STD_SWIG_LA_LIB_ADD) \
+ $(digital_hier_la_swig_libadd)
+
+_digital_hier_la_LDFLAGS = \
+ $(STD_SWIG_LA_LD_FLAGS) \
+ $(digital_hier_la_swig_ldflags)
+
+_digital_hier_la_CXXFLAGS = \
+ $(STD_SWIG_CXX_FLAGS) \
+ -I$(top_builddir) \
+ $(digital_hier_la_swig_cxxflags)
+
+python/digital_hier.cc: digital_hier.py
+digital_hier.py: digital_hier.i
+
+# Include the python dependencies for this file
+-include python/digital_hier.d
+
+endif # end of if python
+
+if GUILE
+
+digital_hier_scmlib_LTLIBRARIES = \
+ libguile-gnuradio-digital_hier.la
+libguile_gnuradio_digital_hier_la_SOURCES = \
+ guile/digital_hier.cc \
+ $(digital_hier_la_swig_sources)
+nobase_digital_hier_scm_DATA = \
+ gnuradio/digital_hier.scm \
+ gnuradio/digital_hier-primitive.scm
+libguile_gnuradio_digital_hier_la_LIBADD = \
+ $(STD_SWIG_LA_LIB_ADD) \
+ $(digital_hier_la_swig_libadd)
+libguile_gnuradio_digital_hier_la_LDFLAGS = \
+ $(STD_SWIG_LA_LD_FLAGS) \
+ $(digital_hier_la_swig_ldflags)
+libguile_gnuradio_digital_hier_la_CXXFLAGS = \
+ $(STD_SWIG_CXX_FLAGS) \
+ -I$(top_builddir) \
+ $(digital_hier_la_swig_cxxflags)
+
+guile/digital_hier.cc: gnuradio/digital_hier.scm
+gnuradio/digital_hier.scm: digital_hier.i
+gnuradio/digital_hier-primitive.scm: gnuradio/digital_hier.scm
+
+# Include the guile dependencies for this file
+-include guile/digital_hier.d
+
+endif # end of GUILE
+
+
diff --git a/gr-digital/swig/digital_hier.i b/gr-digital/swig/digital_hier.i
new file mode 100644
index 0000000000..e004461d26
--- /dev/null
+++ b/gr-digital/swig/digital_hier.i
@@ -0,0 +1,40 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009,2010 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef SWIGIMPORTED
+%module(directors="1") digital_hier
+#endif
+
+ //%feature("autodoc", "1"); // generate python docstrings
+
+%include "gnuradio.i" // the common stuff
+
+%include "_digital_hier.i"
+
+#if SWIGGUILE
+%scheme %{
+(load-extension-global "libguile-gnuradio-digital_hier" "scm_init_gnuradio_digital_hier_module")
+%}
+
+%goops %{
+ (use-modules (gnuradio gnuradio_core_runtime))
+%}
+#endif
diff --git a/gr-digital/swig/digital_swig.i b/gr-digital/swig/digital_swig.i
index 0328ca2fcc..ca50f9c501 100644
--- a/gr-digital/swig/digital_swig.i
+++ b/gr-digital/swig/digital_swig.i
@@ -40,6 +40,7 @@
#include "digital_mpsk_receiver_cc.h"
%}
+%include "digital_hier.i"
%include "digital_binary_slicer_fb.i"
%include "digital_clock_recovery_mm_cc.i"
%include "digital_clock_recovery_mm_ff.i"