commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10435 - in gnuradio/branches/developers/michaelld/am_


From: michaelld
Subject: [Commit-gnuradio] r10435 - in gnuradio/branches/developers/michaelld/am_swig: . config gnuradio-core/src/lib/filter gnuradio-core/src/lib/general gnuradio-core/src/lib/gengen gnuradio-core/src/lib/io gnuradio-core/src/lib/runtime gnuradio-core/src/lib/swig gr-atsc/src/lib gr-audio-alsa/src gr-audio-jack/src gr-audio-oss/src gr-audio-osx/src gr-audio-portaudio/src gr-audio-windows/src gr-comedi/src gr-cvsd-vocoder/src/lib gr-gcell/src gr-gpio/src/lib gr-gsm-fr-vocoder/src/lib gr-howto-write-a-block/doc gr-howto-write-a-block/src/lib gr-msdd6000/src gr-pager/src gr-qtgui/src/lib gr-radio-astronomy/src/lib gr-trellis/src/lib gr-usrp/src gr-usrp2/src gr-video-sdl/src usrp/host/lib/legacy usrp/host/swig
Date: Tue, 10 Feb 2009 20:27:15 -0700 (MST)

Author: michaelld
Date: 2009-02-10 20:27:14 -0700 (Tue, 10 Feb 2009)
New Revision: 10435

Added:
   gnuradio/branches/developers/michaelld/am_swig/Makefile.swig
   
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_filter.i
   
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_general.i
   
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_gengen.i
   
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_io.i
   
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_runtime.i
   gnuradio/branches/developers/michaelld/am_swig/gr-pager/src/pager_swig.i
   gnuradio/branches/developers/michaelld/am_swig/gr-usrp/src/usrp_swig.i
   gnuradio/branches/developers/michaelld/am_swig/usrp/host/swig/usrp_prims.i
Removed:
   
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/sw_filter.i
   
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/sw_general.i
   
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/sw_gengen.i
   
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/sw_io.i
   
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/sw_runtime.i
   gnuradio/branches/developers/michaelld/am_swig/gr-pager/src/pager.i
   gnuradio/branches/developers/michaelld/am_swig/gr-usrp/src/usrp.i
   gnuradio/branches/developers/michaelld/am_swig/usrp/host/swig/prims.i
Modified:
   gnuradio/branches/developers/michaelld/am_swig/Makefile.common
   gnuradio/branches/developers/michaelld/am_swig/config/grc_gnuradio_core.m4
   
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/filter/Makefile.am
   
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/general/Makefile.am
   
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/gengen/Makefile.am
   
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/io/Makefile.am
   
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/runtime/Makefile.am
   
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/Makefile.am
   gnuradio/branches/developers/michaelld/am_swig/gr-atsc/src/lib/Makefile.am
   gnuradio/branches/developers/michaelld/am_swig/gr-audio-alsa/src/Makefile.am
   gnuradio/branches/developers/michaelld/am_swig/gr-audio-jack/src/Makefile.am
   gnuradio/branches/developers/michaelld/am_swig/gr-audio-oss/src/Makefile.am
   gnuradio/branches/developers/michaelld/am_swig/gr-audio-osx/src/Makefile.am
   
gnuradio/branches/developers/michaelld/am_swig/gr-audio-portaudio/src/Makefile.am
   
gnuradio/branches/developers/michaelld/am_swig/gr-audio-windows/src/Makefile.am
   gnuradio/branches/developers/michaelld/am_swig/gr-comedi/src/Makefile.am
   
gnuradio/branches/developers/michaelld/am_swig/gr-cvsd-vocoder/src/lib/Makefile.am
   gnuradio/branches/developers/michaelld/am_swig/gr-gcell/src/Makefile.am
   gnuradio/branches/developers/michaelld/am_swig/gr-gpio/src/lib/Makefile.am
   
gnuradio/branches/developers/michaelld/am_swig/gr-gsm-fr-vocoder/src/lib/Makefile.am
   
gnuradio/branches/developers/michaelld/am_swig/gr-howto-write-a-block/doc/src_lib_Makefile_2.am
   
gnuradio/branches/developers/michaelld/am_swig/gr-howto-write-a-block/src/lib/Makefile.am
   gnuradio/branches/developers/michaelld/am_swig/gr-msdd6000/src/Makefile.am
   gnuradio/branches/developers/michaelld/am_swig/gr-pager/src/Makefile.am
   gnuradio/branches/developers/michaelld/am_swig/gr-qtgui/src/lib/Makefile.am
   
gnuradio/branches/developers/michaelld/am_swig/gr-radio-astronomy/src/lib/Makefile.am
   gnuradio/branches/developers/michaelld/am_swig/gr-trellis/src/lib/Makefile.am
   gnuradio/branches/developers/michaelld/am_swig/gr-usrp/src/Makefile.am
   gnuradio/branches/developers/michaelld/am_swig/gr-usrp2/src/Makefile.am
   gnuradio/branches/developers/michaelld/am_swig/gr-video-sdl/src/Makefile.am
   
gnuradio/branches/developers/michaelld/am_swig/usrp/host/lib/legacy/Makefile.am
   gnuradio/branches/developers/michaelld/am_swig/usrp/host/swig/Makefile.am
Log:
WIP.  Needs some clean-up and more testing, but seems to work in
initial testing.



Modified: gnuradio/branches/developers/michaelld/am_swig/Makefile.common
===================================================================
--- gnuradio/branches/developers/michaelld/am_swig/Makefile.common      
2009-02-10 23:30:55 UTC (rev 10434)
+++ gnuradio/branches/developers/michaelld/am_swig/Makefile.common      
2009-02-11 03:27:14 UTC (rev 10435)
@@ -59,21 +59,6 @@
 WITH_INCLUDES = @with_INCLUDES@
 WITH_SWIG_INCLUDES = @with_SWIG_INCLUDES@
 
-# swig flags
-# -w511 turns off keyword argument warning
-# "-outdir $(builddir)" writes all generated output files to
-#   the local builddir (which should always be '.')
-SWIG_PYTHON_FLAGS = -fvirtual -python -modern -keyword \
-       -w511 -outdir .
-
-# standard swig flags used by most components
-STD_SWIG_PYTHON_ARGS = \
-       $(SWIG_PYTHON_FLAGS) \
-       $(STD_DEFINES_AND_INCLUDES) \
-       $(LOCAL_SWIG_DEFINES_AND_INCLUDES) \
-       $(WITH_SWIG_INCLUDES) \
-       $(WITH_INCLUDES)
-
 # How to link in the top-level omnithreads library from inside the tree
 OMNITHREAD_INCLUDES = @omnithread_INCLUDES@
 OMNITHREAD_LA = @omnithread_LA@
@@ -85,9 +70,6 @@
 # How to link in GNU Radio core library from inside the tree
 GNURADIO_CORE_LA = @gnuradio_core_LA@
 
-# This is a dependency for many swig operations
-GNURADIO_I = @gnuradio_core_I@
-
 # How to link in the USRP library from inside the tree
 GRUEL_INCLUDES = @gruel_INCLUDES@
 GRUEL_LA = @gruel_LA@

Added: gnuradio/branches/developers/michaelld/am_swig/Makefile.swig
===================================================================
--- gnuradio/branches/developers/michaelld/am_swig/Makefile.swig                
                (rev 0)
+++ gnuradio/branches/developers/michaelld/am_swig/Makefile.swig        
2009-02-11 03:27:14 UTC (rev 10435)
@@ -0,0 +1,98 @@
+# -*- Makefile -*-
+#
+# Copyright 2009 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.
+# 
+
+# This makefile should be included using 
+#     include $(top_srcdir)/Makefile.swig
+# in Makefile.am's which require SWIG wrapping / compilation.
+# For just installing .i files, this Makefile is not required.
+
+# swig flags
+# -w511 turns off keyword argument warning
+# "-outdir $(builddir)" writes all generated output files to
+#   the local builddir (which should always be '.')
+#   In some older autotools, $(builddir) is not defined, so
+#   just use '.' instead.
+
+SWIG_PYTHON_FLAGS = -fvirtual -python -modern -keyword -w511 -outdir .
+
+# standard swig flags used by most components
+STD_SWIG_PYTHON_ARGS =                         \
+       $(SWIG_PYTHON_FLAGS)                    \
+       $(STD_DEFINES_AND_INCLUDES)             \
+       $(LOCAL_SWIG_DEFINES_AND_INCLUDES)      \
+       $(WITH_SWIG_INCLUDES)                   \
+       $(WITH_INCLUDES)
+
+# standard SWIG LD flags for library creation (LA)
+
+STD_SWIG_LA_LD_FLAGS = -module -avoid-version $(NO_UNDEFINED)
+
+# standard SWIG library additions for library creation (LA)
+
+STD_SWIG_LA_LIB_ADD =                  \
+       $(GNURADIO_CORE_LA)     \
+       $(PYTHON_LDFLAGS)       \
+       -lstdc++
+
+# SWIG suffix for automake to know about
+
+SUFFIXES = .i
+
+# how to convert from .i to .cc (and also .py, .h)
+
+.i.cc:
+       if $(SWIG) $(STD_SWIG_PYTHON_ARGS) -MD -MF $(DEPDIR)/$*.Std \
+               -module $* -o $*.cc $<; then \
+           if test $(host_os) = mingw32; then \
+               $(RM) $(DEPDIR)/$*.Sd; \
+               $(SED) 's,\\\\,/,g' < $(DEPDIR)/$*.Std > $(DEPDIR)/$*.Sd; \
+               $(RM) $(DEPDIR)/$*.Std; \
+               $(MV) $(DEPDIR)/$*.Sd $(DEPDIR)/$*.Std; \
+           fi; \
+       else \
+           $(RM) $(DEPDIR)/$*.S*; exit 1; \
+       fi;
+# mess with the output .Std file, to create a dependecy file
+# valid for the input .i file .. basically, simulate the dependency
+# file created for libraries by GNU's libtool for C++, where all of the
+# dependencies for the target are first listed, then each individual
+# dependency is listed as a target with no further dependencies.
+#
+# (1) remove the current dependency file
+       $(RM) $(DEPDIR)/$*.d
+# (2) Copy the whole SWIG file:
+       cp $(DEPDIR)/$*.Std $(DEPDIR)/$*.d
+# (3) all a carriage return to the end of the dependency file.
+       echo "" >> $(DEPDIR)/$*.d
+# (4) from the SWIG file, remove the first line (the target)
+#     as well as the onefor the current .i file;
+#     remove trailing " \" and " " from each line.
+#     Append ":" to each line, followed by 2 carriage returns, then
+#     append this to the end of the dependency file.
+       $(SED) -e '1d;/$*.i/d;s, \\,,g;s, ,,g' < $(DEPDIR)/$*.Std | \
+               awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/$*.d
+# (5) add in dependencies for the .h and .py files, to the .i file,
+#     which just removes the .cc file so-as to regenerate everything.
+       echo "$*.h $*.py: $*.i" >> $(DEPDIR)/$*.d
+       echo "  $(RM) $*.cc" >> $(DEPDIR)/$*.d
+# (6) remove the SWIG-generated file
+       $(RM) $(DEPDIR)/$*.Std

Modified: 
gnuradio/branches/developers/michaelld/am_swig/config/grc_gnuradio_core.m4
===================================================================
--- gnuradio/branches/developers/michaelld/am_swig/config/grc_gnuradio_core.m4  
2009-02-10 23:30:55 UTC (rev 10434)
+++ gnuradio/branches/developers/michaelld/am_swig/config/grc_gnuradio_core.m4  
2009-02-11 03:27:14 UTC (rev 10435)
@@ -70,14 +70,16 @@
        
gnuradio_core_SWIGDIRPATH="\${abs_top_builddir}/gnuradio-core/src/lib/swig:\${abs_top_builddir}/gnuradio-core/src/lib/swig/.libs:\${abs_top_srcdir}/gnuradio-core/src/lib/swig"
        gnuradio_core_PYDIRPATH="\${abs_top_srcdir}/gnuradio-core/src/python"
 
-        dnl kludge up initial swig dependency files
-        AC_CONFIG_COMMANDS([swig_deps], [
-            touch gnuradio-core/src/lib/swig/gnuradio_swig_py_runtime.d
-            touch gnuradio-core/src/lib/swig/gnuradio_swig_py_general.d
-            touch gnuradio-core/src/lib/swig/gnuradio_swig_py_gengen.d
-            touch gnuradio-core/src/lib/swig/gnuradio_swig_py_filter.d
-            touch gnuradio-core/src/lib/swig/gnuradio_swig_py_io.d
-        ])
+        dnl kludge up initial swig dependency files by
+       dnl Making sure the files exist.
+#        AC_CONFIG_COMMANDS([swig_deps], [
+#          mkdir -p gnuradio-core/src/lib/swig/${DEPDIR}
+#          pushd gnuradio-core/src/lib/swig/${DEPDIR} 2>&1 > /dev/null
+#           touch gnuradio_swig_py_runtime.d gnuradio_swig_py_general.d
+#            touch gnuradio_swig_py_gengen.d gnuradio_swig_py_filter.d
+#            touch gnuradio_swig_py_io.d
+#          popd 2>&1 > /dev/null
+#        ])
     fi
 
     dnl other externally-required gnuradio-core variables

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/filter/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/filter/Makefile.am
     2009-02-10 23:30:55 UTC (rev 10434)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/filter/Makefile.am
     2009-02-11 03:27:14 UTC (rev 10435)
@@ -325,21 +325,21 @@
 
 
 
-swiginclude_HEADERS =                  \
-       filter.i                        \
-       filter_generated.i              \
-       gr_adaptive_fir_ccf.i           \
-       gr_cma_equalizer_cc.i           \
-       gr_fft_filter_ccc.i             \
-       gr_fft_filter_fff.i             \
-       gr_filter_delay_fc.i            \
-       gr_fractional_interpolator_ff.i \
-       gr_fractional_interpolator_cc.i \
-       gr_goertzel_fc.i                \
-       gr_hilbert_fc.i                 \
-       gr_iir_filter_ffd.i             \
-       gr_single_pole_iir_filter_ff.i  \
-       gr_single_pole_iir_filter_cc.i  \
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                                  \
+       $(srcdir)/filter.i                              \
+       $(srcdir)/gr_adaptive_fir_ccf.i                 \
+       $(srcdir)/gr_cma_equalizer_cc.i                 \
+       $(srcdir)/gr_fft_filter_ccc.i                   \
+       $(srcdir)/gr_fft_filter_fff.i                   \
+       $(srcdir)/gr_filter_delay_fc.i                  \
+       $(srcdir)/gr_fractional_interpolator_ff.i       \
+       $(srcdir)/gr_fractional_interpolator_cc.i       \
+       $(srcdir)/gr_goertzel_fc.i                      \
+       $(srcdir)/gr_hilbert_fc.i                       \
+       $(srcdir)/gr_iir_filter_ffd.i                   \
+       $(srcdir)/gr_single_pole_iir_filter_ff.i        \
+       $(srcdir)/gr_single_pole_iir_filter_cc.i        \
        $(GENERATED_I)
 
 

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/general/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/general/Makefile.am
    2009-02-10 23:30:55 UTC (rev 10434)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/general/Makefile.am
    2009-02-11 03:27:14 UTC (rev 10435)
@@ -351,130 +351,131 @@
        sine_table.h                    \
        qa_gr_math.h
 
-swiginclude_HEADERS =                  \
-       general.i                       \
-       gr_agc_cc.i                     \
-       gr_agc_ff.i                     \
-       gr_agc2_cc.i                    \
-       gr_agc2_ff.i                    \
-       gr_align_on_samplenumbers_ss.i  \
-       gr_bin_statistics_f.i           \
-       gr_binary_slicer_fb.i           \
-       gr_bytes_to_syms.i              \
-       gr_char_to_float.i              \
-       gr_check_counting_s.i           \
-       gr_check_lfsr_32k_s.i           \
-       gr_clock_recovery_mm_cc.i       \
-       gr_clock_recovery_mm_ff.i       \
-       gr_complex_to_interleaved_short.i \
-       gr_complex_to_xxx.i             \
-       gr_conjugate_cc.i               \
-       gr_constellation_decoder_cb.i   \
-       gr_correlate_access_code_bb.i   \
-       gr_costas_loop_cc.i             \
-       gr_cpfsk_bc.i                   \
-       gr_crc32.i                      \
-       gr_ctcss_squelch_ff.i           \
-       gr_dd_mpsk_sync_cc.i            \
-       gr_decode_ccsds_27_fb.i         \
-       gr_diff_decoder_bb.i            \
-       gr_diff_encoder_bb.i            \
-       gr_diff_phasor_cc.i             \
-       gr_dpll_bb.i                    \
-       gr_deinterleave.i               \
-       gr_delay.i                      \
-       gr_encode_ccsds_27_bb.i         \
-       gr_fake_channel_coder_pp.i      \
-       gr_feedforward_agc_cc.i         \
-       gr_feval.i                      \
-       gr_fft_vcc.i                    \
-       gr_fft_vfc.i                    \
-       gr_firdes.i                     \
-       gr_float_to_char.i              \
-       gr_float_to_complex.i           \
-       gr_float_to_short.i             \
-       gr_float_to_uchar.i             \
-       gr_frequency_modulator_fc.i     \
-       gr_framer_sink_1.i              \
-       gr_glfsr_source_b.i             \
-       gr_glfsr_source_f.i             \
-       gr_head.i                       \
-       gr_interleave.i                 \
-       gr_interleaved_short_to_complex.i \
-       gr_iqcomp_cc.i                  \
-       gr_keep_one_in_n.i              \
-       gr_kludge_copy.i                \
-       gr_lfsr_32k_source_s.i          \
-       gr_lms_dfe_cc.i                 \
-       gr_lms_dfe_ff.i                 \
-       gr_map_bb.i                     \
-       gr_mpsk_receiver_cc.i           \
-       gr_nlog10_ff.i                  \
-       gr_nop.i                        \
-       gr_null_sink.i                  \
-       gr_null_source.i                \
-       gr_ofdm_frame_acquisition.i     \
-        gr_ofdm_cyclic_prefixer.i       \
-        gr_ofdm_demapper_vcb.i          \
-        gr_ofdm_mapper_bcv.i            \
-        gr_ofdm_frame_sink.i           \
-       gr_ofdm_insert_preamble.i       \
-       gr_ofdm_sampler.i               \
-       gr_pa_2x2_phase_combiner.i      \
-       gr_packet_sink.i                \
-       gr_peak_detector2_fb.i          \
-       gr_phase_modulator_fc.i         \
-       gr_pll_carriertracking_cc.i     \
-       gr_pll_freqdet_cf.i             \
-       gr_pll_refout_cc.i              \
-       gr_pn_correlator_cc.i           \
-       gr_prefix.i                     \
-       gr_prefs.i                      \
-       gr_probe_avg_mag_sqrd_c.i       \
-       gr_probe_avg_mag_sqrd_cf.i      \
-       gr_probe_avg_mag_sqrd_f.i       \
-       gr_probe_signal_f.i             \
-       gr_pwr_squelch_cc.i             \
-       gr_pwr_squelch_ff.i             \
-       gr_quadrature_demod_cf.i        \
-       gr_rail_ff.i                    \
-       gr_regenerate_bb.i              \
-       gr_remez.i                      \
-       gr_rms_cf.i                     \
-       gr_rms_ff.i                     \
-       gr_repeat.i                     \
-       gr_short_to_float.i             \
-       gr_simple_correlator.i          \
-       gr_simple_framer.i              \
-       gr_simple_squelch_cc.i          \
-       gr_skiphead.i                   \
-       gr_squash_ff.i                  \
-       gr_squelch_base_cc.i            \
-       gr_squelch_base_ff.i            \
-       gr_stream_mux.i                 \
-       gr_stream_to_streams.i          \
-       gr_stream_to_vector.i           \
-       gr_streams_to_stream.i          \
-       gr_streams_to_vector.i          \
-       gr_stretch_ff.i                 \
-        gr_test.i                      \
-       gr_threshold_ff.i               \
-       gr_throttle.i                   \
-       gr_uchar_to_float.i             \
-       gr_vco_f.i                      \
-       gr_vector_to_stream.i           \
-       gr_vector_to_streams.i          \
-       gr_unpack_k_bits_bb.i           \
-       gr_wavelet_ff.i                 \
-       gr_wvps_ff.i                    \
-       gri_agc_cc.i                    \
-       gri_agc_ff.i                    \
-       gri_agc2_cc.i                   \
-       gri_agc2_ff.i                   \
-       gr_descrambler_bb.i             \
-       gr_scrambler_bb.i               \
-       gr_probe_mpsk_snr_c.i           \
-       gr_probe_density_b.i
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                                  \
+       $(srcdir)/general.i                             \
+       $(srcdir)/gr_agc_cc.i                           \
+       $(srcdir)/gr_agc_ff.i                           \
+       $(srcdir)/gr_agc2_cc.i                          \
+       $(srcdir)/gr_agc2_ff.i                          \
+       $(srcdir)/gr_align_on_samplenumbers_ss.i        \
+       $(srcdir)/gr_bin_statistics_f.i                 \
+       $(srcdir)/gr_binary_slicer_fb.i                 \
+       $(srcdir)/gr_bytes_to_syms.i                    \
+       $(srcdir)/gr_char_to_float.i                    \
+       $(srcdir)/gr_check_counting_s.i                 \
+       $(srcdir)/gr_check_lfsr_32k_s.i                 \
+       $(srcdir)/gr_clock_recovery_mm_cc.i             \
+       $(srcdir)/gr_clock_recovery_mm_ff.i             \
+       $(srcdir)/gr_complex_to_interleaved_short.i     \
+       $(srcdir)/gr_complex_to_xxx.i                   \
+       $(srcdir)/gr_conjugate_cc.i                     \
+       $(srcdir)/gr_constellation_decoder_cb.i         \
+       $(srcdir)/gr_correlate_access_code_bb.i         \
+       $(srcdir)/gr_costas_loop_cc.i                   \
+       $(srcdir)/gr_cpfsk_bc.i                         \
+       $(srcdir)/gr_crc32.i                            \
+       $(srcdir)/gr_ctcss_squelch_ff.i                 \
+       $(srcdir)/gr_dd_mpsk_sync_cc.i                  \
+       $(srcdir)/gr_decode_ccsds_27_fb.i               \
+       $(srcdir)/gr_diff_decoder_bb.i                  \
+       $(srcdir)/gr_diff_encoder_bb.i                  \
+       $(srcdir)/gr_diff_phasor_cc.i                   \
+       $(srcdir)/gr_dpll_bb.i                          \
+       $(srcdir)/gr_deinterleave.i                     \
+       $(srcdir)/gr_delay.i                            \
+       $(srcdir)/gr_encode_ccsds_27_bb.i               \
+       $(srcdir)/gr_fake_channel_coder_pp.i            \
+       $(srcdir)/gr_feedforward_agc_cc.i               \
+       $(srcdir)/gr_feval.i                            \
+       $(srcdir)/gr_fft_vcc.i                          \
+       $(srcdir)/gr_fft_vfc.i                          \
+       $(srcdir)/gr_firdes.i                           \
+       $(srcdir)/gr_float_to_char.i                    \
+       $(srcdir)/gr_float_to_complex.i                 \
+       $(srcdir)/gr_float_to_short.i                   \
+       $(srcdir)/gr_float_to_uchar.i                   \
+       $(srcdir)/gr_frequency_modulator_fc.i           \
+       $(srcdir)/gr_framer_sink_1.i                    \
+       $(srcdir)/gr_glfsr_source_b.i                   \
+       $(srcdir)/gr_glfsr_source_f.i                   \
+       $(srcdir)/gr_head.i                             \
+       $(srcdir)/gr_interleave.i                       \
+       $(srcdir)/gr_interleaved_short_to_complex.i     \
+       $(srcdir)/gr_iqcomp_cc.i                        \
+       $(srcdir)/gr_keep_one_in_n.i                    \
+       $(srcdir)/gr_kludge_copy.i                      \
+       $(srcdir)/gr_lfsr_32k_source_s.i                \
+       $(srcdir)/gr_lms_dfe_cc.i                       \
+       $(srcdir)/gr_lms_dfe_ff.i                       \
+       $(srcdir)/gr_map_bb.i                           \
+       $(srcdir)/gr_mpsk_receiver_cc.i                 \
+       $(srcdir)/gr_nlog10_ff.i                        \
+       $(srcdir)/gr_nop.i                              \
+       $(srcdir)/gr_null_sink.i                        \
+       $(srcdir)/gr_null_source.i                      \
+       $(srcdir)/gr_ofdm_frame_acquisition.i           \
+       $(srcdir)/gr_ofdm_cyclic_prefixer.i             \
+       $(srcdir)/gr_ofdm_demapper_vcb.i                \
+       $(srcdir)/gr_ofdm_mapper_bcv.i                  \
+       $(srcdir)/gr_ofdm_frame_sink.i                  \
+       $(srcdir)/gr_ofdm_insert_preamble.i             \
+       $(srcdir)/gr_ofdm_sampler.i                     \
+       $(srcdir)/gr_pa_2x2_phase_combiner.i            \
+       $(srcdir)/gr_packet_sink.i                      \
+       $(srcdir)/gr_peak_detector2_fb.i                \
+       $(srcdir)/gr_phase_modulator_fc.i               \
+       $(srcdir)/gr_pll_carriertracking_cc.i           \
+       $(srcdir)/gr_pll_freqdet_cf.i                   \
+       $(srcdir)/gr_pll_refout_cc.i                    \
+       $(srcdir)/gr_pn_correlator_cc.i                 \
+       $(srcdir)/gr_prefix.i                           \
+       $(srcdir)/gr_prefs.i                            \
+       $(srcdir)/gr_probe_avg_mag_sqrd_c.i             \
+       $(srcdir)/gr_probe_avg_mag_sqrd_cf.i            \
+       $(srcdir)/gr_probe_avg_mag_sqrd_f.i             \
+       $(srcdir)/gr_probe_signal_f.i                   \
+       $(srcdir)/gr_pwr_squelch_cc.i                   \
+       $(srcdir)/gr_pwr_squelch_ff.i                   \
+       $(srcdir)/gr_quadrature_demod_cf.i              \
+       $(srcdir)/gr_rail_ff.i                          \
+       $(srcdir)/gr_regenerate_bb.i                    \
+       $(srcdir)/gr_remez.i                            \
+       $(srcdir)/gr_rms_cf.i                           \
+       $(srcdir)/gr_rms_ff.i                           \
+       $(srcdir)/gr_repeat.i                           \
+       $(srcdir)/gr_short_to_float.i                   \
+       $(srcdir)/gr_simple_correlator.i                \
+       $(srcdir)/gr_simple_framer.i                    \
+       $(srcdir)/gr_simple_squelch_cc.i                \
+       $(srcdir)/gr_skiphead.i                         \
+       $(srcdir)/gr_squash_ff.i                        \
+       $(srcdir)/gr_squelch_base_cc.i                  \
+       $(srcdir)/gr_squelch_base_ff.i                  \
+       $(srcdir)/gr_stream_mux.i                       \
+       $(srcdir)/gr_stream_to_streams.i                \
+       $(srcdir)/gr_stream_to_vector.i                 \
+       $(srcdir)/gr_streams_to_stream.i                \
+       $(srcdir)/gr_streams_to_vector.i                \
+       $(srcdir)/gr_stretch_ff.i                       \
+       $(srcdir)/gr_test.i                             \
+       $(srcdir)/gr_threshold_ff.i                     \
+       $(srcdir)/gr_throttle.i                         \
+       $(srcdir)/gr_uchar_to_float.i                   \
+       $(srcdir)/gr_vco_f.i                            \
+       $(srcdir)/gr_vector_to_stream.i                 \
+       $(srcdir)/gr_vector_to_streams.i                \
+       $(srcdir)/gr_unpack_k_bits_bb.i                 \
+       $(srcdir)/gr_wavelet_ff.i                       \
+       $(srcdir)/gr_wvps_ff.i                          \
+       $(srcdir)/gri_agc_cc.i                          \
+       $(srcdir)/gri_agc_ff.i                          \
+       $(srcdir)/gri_agc2_cc.i                         \
+       $(srcdir)/gri_agc2_ff.i                         \
+       $(srcdir)/gr_descrambler_bb.i                   \
+       $(srcdir)/gr_scrambler_bb.i                     \
+       $(srcdir)/gr_probe_mpsk_snr_c.i                 \
+       $(srcdir)/gr_probe_density_b.i
 
 
 CLEANFILES = $(BUILT_SOURCES) *.pyc

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/gengen/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/gengen/Makefile.am
     2009-02-10 23:30:55 UTC (rev 10434)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/gengen/Makefile.am
     2009-02-11 03:27:14 UTC (rev 10435)
@@ -171,10 +171,11 @@
 
 noinst_HEADERS =                       
 
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
 swiginclude_HEADERS =                  \
        $(GENERATED_I)                  \
-       gr_endianness.i                 \
-       gengen.i                        \
-       gengen_generated.i              
+       $(srcdir)/gr_endianness.i       \
+       $(srcdir)/gengen.i              \
+       $(srcdir)/gengen_generated.i
 
 CLEANFILES = $(BUILT_SOURCES) $(STAMPS) *.pyc

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/io/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/io/Makefile.am
 2009-02-10 23:30:55 UTC (rev 10434)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/io/Makefile.am
 2009-02-11 03:27:14 UTC (rev 10435)
@@ -94,23 +94,23 @@
 
 
 
-swiginclude_HEADERS =                  \
-       io.i                            \
-       gr_file_sink.i                  \
-       gr_file_sink_base.i             \
-       gr_file_source.i                \
-       gr_file_descriptor_sink.i       \
-       gr_file_descriptor_source.i     \
-       gr_message_sink.i               \
-       gr_message_source.i             \
-       gr_oscope_sink.i                \
-       microtune_xxxx_eval_board.i     \
-       microtune_4702_eval_board.i     \
-       microtune_4937_eval_board.i     \
-       ppio.i                          \
-       sdr_1000.i                      \
-       gr_udp_sink.i                   \
-       gr_udp_source.i                 \
-       gr_wavfile_source.i             \
-       gr_wavfile_sink.i
-
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                          \
+       $(srcdir)/io.i                          \
+       $(srcdir)/gr_file_sink.i                \
+       $(srcdir)/gr_file_sink_base.i           \
+       $(srcdir)/gr_file_source.i              \
+       $(srcdir)/gr_file_descriptor_sink.i     \
+       $(srcdir)/gr_file_descriptor_source.i   \
+       $(srcdir)/gr_message_sink.i             \
+       $(srcdir)/gr_message_source.i           \
+       $(srcdir)/gr_oscope_sink.i              \
+       $(srcdir)/microtune_xxxx_eval_board.i   \
+       $(srcdir)/microtune_4702_eval_board.i   \
+       $(srcdir)/microtune_4937_eval_board.i   \
+       $(srcdir)/ppio.i                        \
+       $(srcdir)/sdr_1000.i                    \
+       $(srcdir)/gr_udp_sink.i                 \
+       $(srcdir)/gr_udp_source.i               \
+       $(srcdir)/gr_wavfile_source.i           \
+       $(srcdir)/gr_wavfile_sink.i

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/runtime/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/runtime/Makefile.am
    2009-02-10 23:30:55 UTC (rev 10434)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/runtime/Makefile.am
    2009-02-11 03:27:14 UTC (rev 10435)
@@ -135,24 +135,25 @@
        qa_gr_vmcircbuf.h                       \
        qa_runtime.h                            
 
-swiginclude_HEADERS =                  \
-       gr_basic_block.i                \
-       gr_block.i                      \
-       gr_block_detail.i               \
-       gr_hier_block2.i                \
-       gr_buffer.i                     \
-       gr_dispatcher.i                 \
-       gr_error_handler.i              \
-       gr_io_signature.i               \
-       gr_message.i                    \
-       gr_msg_handler.i                \
-       gr_msg_queue.i                  \
-       gr_realtime.i                   \
-       gr_single_threaded_scheduler.i  \
-       gr_sync_block.i                 \
-       gr_sync_decimator.i             \
-       gr_sync_interpolator.i          \
-       gr_top_block.i                  \
-       runtime.i
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                                  \
+       $(srcdir)/gr_basic_block.i                      \
+       $(srcdir)/gr_block.i                            \
+       $(srcdir)/gr_block_detail.i                     \
+       $(srcdir)/gr_hier_block2.i                      \
+       $(srcdir)/gr_buffer.i                           \
+       $(srcdir)/gr_dispatcher.i                       \
+       $(srcdir)/gr_error_handler.i                    \
+       $(srcdir)/gr_io_signature.i                     \
+       $(srcdir)/gr_message.i                          \
+       $(srcdir)/gr_msg_handler.i                      \
+       $(srcdir)/gr_msg_queue.i                        \
+       $(srcdir)/gr_realtime.i                         \
+       $(srcdir)/gr_single_threaded_scheduler.i        \
+       $(srcdir)/gr_sync_block.i                       \
+       $(srcdir)/gr_sync_decimator.i                   \
+       $(srcdir)/gr_sync_interpolator.i                \
+       $(srcdir)/gr_top_block.i                        \
+       $(srcdir)/runtime.i
 
 MOSTLYCLEANFILES = *~ *.loT

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/Makefile.am
       2009-02-10 23:30:55 UTC (rev 10434)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/Makefile.am
       2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 # Install this stuff in the gr subdirectory of the python pkg dir.
 # This usually ends up at:
@@ -31,258 +32,129 @@
 AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) -I$(srcdir) \
         $(WITH_INCLUDES)
 
-EXTRA_DIST = gen-swig-bug-fix
-
-LOCAL_IFILES =                         \
-       gnuradio.i                      \
-       gr_swig_block_magic.i           \
-       gr_shared_ptr.i                 \
-       sw_general.i                    \
-       sw_gengen.i                     \
-       sw_filter.i                     \
-       sw_io.i                         \
-       sw_runtime.i
-
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)
-
 # ----------------------------------------------------------------
-# We've split the previously monstrous gnuradio_swig_python into
-# 5 smaller pieces.  This reduces compile time coupling and
-# creates smaller pieces for the compiler to digest.
-# prior to this change, on X86_64, g++'s resident set size was
-# 650MB!
-
-BUILT_SOURCES =                                \
-       gnuradio_swig_py_runtime.cc     \
-       gnuradio_swig_py_runtime.py     \
-       gnuradio_swig_py_runtime.h      \
-       gnuradio_swig_py_general.cc     \
-       gnuradio_swig_py_general.py     \
-       gnuradio_swig_py_general.h      \
-       gnuradio_swig_py_gengen.cc      \
-       gnuradio_swig_py_gengen.py      \
-       gnuradio_swig_py_gengen.h       \
-       gnuradio_swig_py_filter.cc      \
-       gnuradio_swig_py_filter.py      \
-       gnuradio_swig_py_filter.h       \
-       gnuradio_swig_py_io.cc          \
-       gnuradio_swig_py_io.py          \
-       gnuradio_swig_py_io.h           \
-       gnuradio_swig_bug_workaround.h  
-
+# We've split the previously monstrous gnuradio_swig_python into 5
+# smaller pieces.  This reduces compile time coupling and creates
+# smaller pieces for the compiler to digest.  prior to this change, on
+# X86_64, g++'s resident set size was 650MB!
 # ----------------------------------------------------------------
-# We break this up into 5 libraries...
 
-grgrlib_LTLIBRARIES =                          \
-       _gnuradio_swig_py_runtime.la            \
-       _gnuradio_swig_py_general.la            \
-       _gnuradio_swig_py_gengen.la             \
-       _gnuradio_swig_py_filter.la             \
-       _gnuradio_swig_py_io.la                 
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
 
+swiginclude_HEADERS =                          \
+       $(srcdir)/gnuradio.i                    \
+       $(srcdir)/gr_swig_block_magic.i         \
+       $(srcdir)/gr_shared_ptr.i
 
-grgrpython_PYTHON =                    \
-       gnuradio_swig_python.py         \
+# Just the built Python sources, since they're used multiple times.
+
+BUILT_PYTHON_SRCS =                    \
        gnuradio_swig_py_runtime.py     \
        gnuradio_swig_py_general.py     \
        gnuradio_swig_py_gengen.py      \
        gnuradio_swig_py_filter.py      \
-       gnuradio_swig_py_io.py          
+       gnuradio_swig_py_io.py
 
+# just the built SWIG sources.  When creating SWIG_BUILT_SRCS, the
+# .cc files must come first.
 
-# This results in the code being compiled with -O1 instead of -g -O2
+SWIG_BUILT_SRCS =                      \
+       gnuradio_swig_py_runtime.cc     \
+       gnuradio_swig_py_general.cc     \
+       gnuradio_swig_py_gengen.cc      \
+       gnuradio_swig_py_filter.cc      \
+       gnuradio_swig_py_io.cc          \
+       gnuradio_swig_py_runtime.h      \
+       gnuradio_swig_py_general.h      \
+       gnuradio_swig_py_gengen.h       \
+       gnuradio_swig_py_filter.h       \
+       gnuradio_swig_py_io.h           \
+       $(BUILT_PYTHON_SRCS)
 
-_gnuradio_swig_py_runtime_la_CXXFLAGS = @swig_CXXFLAGS@
-_gnuradio_swig_py_general_la_CXXFLAGS = @swig_CXXFLAGS@
-_gnuradio_swig_py_gengen_la_CXXFLAGS  = @swig_CXXFLAGS@
-_gnuradio_swig_py_filter_la_CXXFLAGS  = @swig_CXXFLAGS@
-_gnuradio_swig_py_io_la_CXXFLAGS      = @swig_CXXFLAGS@
+# Sources built by MAKE: these will be created first if they do not
+# exist.  if they do exist, they require dependency rules to determine
+# if they need to be remade.  The dependency rules are created by the
+# .i.cc rule in Makefile.swig; this rule also does the initial file
+# creation of all of these built sources.
 
+BUILT_SOURCES = $(SWIG_BUILT_SRCS)     \
+       gnuradio_swig_bug_workaround.h
 
-# ----------------------------------------------------------------
-# Part 1: sw_runtime.i -> gnuradio_swig_py_runtime
-#
-# We continue to call this gnuradio.i to avoid having to touch
-# lots of code in other modules
+# files which are cleaned
 
-_gnuradio_swig_py_runtime_la_SOURCES =                 \
-       gnuradio_swig_py_runtime.cc             
+LOCAL_BUILT_SRCS = $(BUILT_SOURCES)
 
+# Python files; either built or part of the distro
 
-_gnuradio_swig_py_runtime_la_LIBADD  =                 \
-       $(GNURADIO_CORE_LA)                     \
-       $(PYTHON_LDFLAGS)                       \
-       -lstdc++
+grgrpython_PYTHON =                    \
+       gnuradio_swig_python.py         \
+       $(BUILT_PYTHON_SRCS)
 
-_gnuradio_swig_py_runtime_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
-
-
-# KLUDGE: Force runtime include of gnuradio_swig_py_runtime.d dependency file.
-# This is not guaranteed to be portable, but will probably work.
-# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/address@hidden@
-
-gnuradio_swig_py_runtime.py gnuradio_swig_py_runtime.h: 
gnuradio_swig_py_runtime.cc
-
-gnuradio_swig_py_runtime.cc : $(srcdir)/sw_runtime.i
-       if $(SWIG) $(STD_SWIG_PYTHON_ARGS) -MMD -MF gnuradio_swig_py_runtime.Td 
-module gnuradio_swig_py_runtime -o gnuradio_swig_py_runtime.cc 
$(srcdir)/sw_runtime.i ;\
-       then if test $(host_os) = mingw32; \
-            then sed 's,\\\\,/,g' <gnuradio_swig_py_runtime.Td 
>gnuradio_swig_py_runtime.d; rm -f gnuradio_swig_py_runtime.Td; \
-            else mv -f gnuradio_swig_py_runtime.Td gnuradio_swig_py_runtime.d; 
fi \
-       else rm -f gnuradio_swig_py_runtime.Td; exit 1; fi 
-
-
 # ----------------------------------------------------------------
-# Part 2: sw_general.i -> gnuradio_swig_py_general
-#
+# FIXME: For SWIG 1.3.22 through (at least) 38, there is a bug in .cc
+# wrapper code generation where unused classes still generate code and
+# hence those classes are required to be declared for compilation.
+# This file is a work-around to this SWIG issue.
 
-_gnuradio_swig_py_general_la_SOURCES =                 \
-       gnuradio_swig_py_general.cc             
+gnuradio_swig_bug_workaround.h : gnuradio_swig_py_runtime.cc 
$(srcdir)/gen-swig-bug-fix
+       $(PYTHON) $(srcdir)/gen-swig-bug-fix gnuradio_swig_py_runtime.cc $@
 
+EXTRA_DIST = gen-swig-bug-fix
 
-_gnuradio_swig_py_general_la_LIBADD  =                 \
-       $(GNURADIO_CORE_LA)                     \
-       $(PYTHON_LDFLAGS)                       \
-       -lstdc++
+grinclude_HEADERS = gnuradio_swig_bug_workaround.h
 
-_gnuradio_swig_py_general_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
-
-
-# KLUDGE: Force general include of gnuradio_swig_py_general.d dependency file.
-# This is not guaranteed to be portable, but will probably work.
-# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/address@hidden@
-
-gnuradio_swig_py_general.py gnuradio_swig_py_general.h: 
gnuradio_swig_py_general.cc
-
-gnuradio_swig_py_general.cc : $(srcdir)/sw_general.i
-       if $(SWIG) $(STD_SWIG_PYTHON_ARGS) -MMD -MF gnuradio_swig_py_general.Td 
-module gnuradio_swig_py_general -o gnuradio_swig_py_general.cc 
$(srcdir)/sw_general.i ;\
-       then if test $(host_os) = mingw32; \
-            then sed 's,\\\\,/,g' <gnuradio_swig_py_general.Td 
>gnuradio_swig_py_general.d; rm -f gnuradio_swig_py_general.Td; \
-            else mv -f gnuradio_swig_py_general.Td gnuradio_swig_py_general.d; 
fi \
-       else rm -f gnuradio_swig_py_general.Td; exit 1; fi 
-
-
 # ----------------------------------------------------------------
-# Part 3: sw_gengen.i -> gnuradio_swig_py_gengen
-#
+# We break this up into 5 libraries:
+#    runtime, general, gengen, filter, and io.
 
-_gnuradio_swig_py_gengen_la_SOURCES =          \
-       gnuradio_swig_py_gengen.cc              
+grgrlib_LTLIBRARIES =                          \
+       _gnuradio_swig_py_runtime.la            \
+       _gnuradio_swig_py_general.la            \
+       _gnuradio_swig_py_gengen.la             \
+       _gnuradio_swig_py_filter.la             \
+       _gnuradio_swig_py_io.la                 
 
+# Allow configure to determine the CXXFLAGS.  Default is '-g -O2' but
+# that doesn't work on all systems, so will use '-O1' on those systems.
 
-_gnuradio_swig_py_gengen_la_LIBADD  =          \
-       $(GNURADIO_CORE_LA)                     \
-       $(PYTHON_LDFLAGS)                       \
-       -lstdc++
+_gnuradio_swig_py_runtime_la_CXXFLAGS = @swig_CXXFLAGS@
+_gnuradio_swig_py_general_la_CXXFLAGS = @swig_CXXFLAGS@
+_gnuradio_swig_py_gengen_la_CXXFLAGS  = @swig_CXXFLAGS@
+_gnuradio_swig_py_filter_la_CXXFLAGS  = @swig_CXXFLAGS@
+_gnuradio_swig_py_io_la_CXXFLAGS      = @swig_CXXFLAGS@
 
-_gnuradio_swig_py_gengen_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+# SOURCES: because MAKE knows how to create dependencies and do
+# compilation of .cc files, and in this case the .cc file has the same
+# dependencies as the .i file, they can be used synonymously.
 
+_gnuradio_swig_py_runtime_la_SOURCES = gnuradio_swig_py_runtime.cc             
+_gnuradio_swig_py_general_la_SOURCES = gnuradio_swig_py_general.cc
+_gnuradio_swig_py_gengen_la_SOURCES  = gnuradio_swig_py_gengen.cc
+_gnuradio_swig_py_filter_la_SOURCES  = gnuradio_swig_py_filter.cc
+_gnuradio_swig_py_io_la_SOURCES      = gnuradio_swig_py_io.cc
 
-# KLUDGE: Force gengen include of gnuradio_swig_py_gengen.d dependency file.
-# This is not guaranteed to be portable, but will probably work.
-# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/address@hidden@
+# LIBADD: all of these libraries use the standard SWIG LA LIBADD
 
-gnuradio_swig_py_gengen.py gnuradio_swig_py_gengen.h: 
gnuradio_swig_py_gengen.cc
+_gnuradio_swig_py_runtime_la_LIBADD = $(STD_SWIG_LA_LIB_ADD)
+_gnuradio_swig_py_general_la_LIBADD = $(STD_SWIG_LA_LIB_ADD)
+_gnuradio_swig_py_gengen_la_LIBADD  = $(STD_SWIG_LA_LIB_ADD)
+_gnuradio_swig_py_filter_la_LIBADD  = $(STD_SWIG_LA_LIB_ADD)
+_gnuradio_swig_py_io_la_LIBADD      = $(STD_SWIG_LA_LIB_ADD)
 
-gnuradio_swig_py_gengen.cc : $(srcdir)/sw_gengen.i
-       if $(SWIG) $(STD_SWIG_PYTHON_ARGS) -MMD -MF gnuradio_swig_py_gengen.Td 
-module gnuradio_swig_py_gengen -o gnuradio_swig_py_gengen.cc 
$(srcdir)/sw_gengen.i ;\
-       then if test $(host_os) = mingw32; \
-            then sed 's,\\\\,/,g' <gnuradio_swig_py_gengen.Td 
>gnuradio_swig_py_gengen.d; rm -f gnuradio_swig_py_gengen.Td; \
-            else mv -f gnuradio_swig_py_gengen.Td gnuradio_swig_py_gengen.d; 
fi \
-       else rm -f gnuradio_swig_py_gengen.Td; exit 1; fi 
+# LDFLAGS: all of these libraries use the standard SWIG LA LDLFAGS
 
+_gnuradio_swig_py_runtime_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
+_gnuradio_swig_py_general_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
+_gnuradio_swig_py_gengen_la_LDFLAGS  = $(STD_SWIG_LA_LD_FLAGS)
+_gnuradio_swig_py_filter_la_LDFLAGS  = $(STD_SWIG_LA_LD_FLAGS)
+_gnuradio_swig_py_io_la_LDFLAGS      = $(STD_SWIG_LA_LD_FLAGS)
 
-# ----------------------------------------------------------------
-# Part 4: sw_filter.i -> gnuradio_swig_py_filter
-#
-
-_gnuradio_swig_py_filter_la_SOURCES =          \
-       gnuradio_swig_py_filter.cc              
-
-
-_gnuradio_swig_py_filter_la_LIBADD  =          \
-       $(GNURADIO_CORE_LA)                     \
-       $(PYTHON_LDFLAGS)                       \
-       -lstdc++
-
-_gnuradio_swig_py_filter_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
-
-
-# KLUDGE: Force filter include of gnuradio_swig_py_filter.d dependency file.
+# KLUDGE: Force runtime include of SWIG dependency files.
 # This is not guaranteed to be portable, but will probably work.
 # If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/address@hidden@
 
-gnuradio_swig_py_filter.py gnuradio_swig_py_filter.h: 
gnuradio_swig_py_filter.cc
-
-gnuradio_swig_py_filter.cc : $(srcdir)/sw_filter.i
-       if $(SWIG) $(STD_SWIG_PYTHON_ARGS) -MMD -MF gnuradio_swig_py_filter.Td 
-module gnuradio_swig_py_filter -o gnuradio_swig_py_filter.cc 
$(srcdir)/sw_filter.i ;\
-       then if test $(host_os) = mingw32; \
-            then sed 's,\\\\,/,g' <gnuradio_swig_py_filter.Td 
>gnuradio_swig_py_filter.d; rm -f gnuradio_swig_py_filter.Td; \
-            else mv -f gnuradio_swig_py_filter.Td gnuradio_swig_py_filter.d; 
fi \
-       else rm -f gnuradio_swig_py_filter.Td; exit 1; fi 
-
-
-# ----------------------------------------------------------------
-# Part 5: sw_io.i -> gnuradio_swig_py_io
-#
-
-_gnuradio_swig_py_io_la_SOURCES =              \
-       gnuradio_swig_py_io.cc          
-
-
-_gnuradio_swig_py_io_la_LIBADD  =              \
-       $(GNURADIO_CORE_LA)                     \
-       $(PYTHON_LDFLAGS)                       \
-       -lstdc++
-
-_gnuradio_swig_py_io_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
-
-
-# KLUDGE: Force io include of gnuradio_swig_py_io.d dependency file.
-# This is not guaranteed to be portable, but will probably work.
-# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/address@hidden@
-
-gnuradio_swig_py_io.py gnuradio_swig_py_io.h: gnuradio_swig_py_io.cc
-
-gnuradio_swig_py_io.cc : $(srcdir)/sw_io.i
-       if $(SWIG) $(STD_SWIG_PYTHON_ARGS) -MMD -MF gnuradio_swig_py_io.Td 
-module gnuradio_swig_py_io -o gnuradio_swig_py_io.cc $(srcdir)/sw_io.i ;\
-       then if test $(host_os) = mingw32; \
-            then sed 's,\\\\,/,g' <gnuradio_swig_py_io.Td 
>gnuradio_swig_py_io.d; rm -f gnuradio_swig_py_io.Td; \
-            else mv -f gnuradio_swig_py_io.Td gnuradio_swig_py_io.d; fi \
-       else rm -f gnuradio_swig_py_io.Td; exit 1; fi 
-
-
-# ----------------------------------------------------------------
-# FIXME As of swig 1.3.31, this still seems to be required...
-
-gnuradio_swig_bug_workaround.h : gnuradio_swig_py_runtime.cc 
$(srcdir)/gen-swig-bug-fix
-       $(PYTHON) $(srcdir)/gen-swig-bug-fix gnuradio_swig_py_runtime.cc $@
-
-# ----------------------------------------------------------------
-
-# Don't distribute output of swig
-dist-hook:
-       @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done
-       @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
-
-
-grinclude_HEADERS =                            \
-       gnuradio_swig_bug_workaround.h
-
-swiginclude_HEADERS =                          \
-       $(LOCAL_IFILES)                 
-
-MOSTLYCLEANFILES = \
-       $(BUILT_SOURCES) *~ *.pyc 
-
-DISTCLEANFILES =                       \
-       gnuradio_swig_py_runtime.d      \
-       gnuradio_swig_py_general.d      \
-       gnuradio_swig_py_gengen.d       \
-       gnuradio_swig_py_filter.d       \
-       gnuradio_swig_py_io.d           
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@

Added: 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_filter.i
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_filter.i
                         (rev 0)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_filter.i
 2009-02-11 03:27:14 UTC (rev 10435)
@@ -0,0 +1,30 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2009 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") gnuradio_swig_py_filter
+#endif
+
+ //%feature("autodoc", "1");           // generate python docstrings
+
+%include "gnuradio.i"                          // the common stuff
+
+%include "filter.i"

Added: 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_general.i
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_general.i
                                (rev 0)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_general.i
        2009-02-11 03:27:14 UTC (rev 10435)
@@ -0,0 +1,30 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2009 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") gnuradio_swig_py_general
+#endif
+
+ //%feature("autodoc", "1");           // generate python docstrings
+
+%include "gnuradio.i"                          // the common stuff
+
+%include "general.i"

Added: 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_gengen.i
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_gengen.i
                         (rev 0)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_gengen.i
 2009-02-11 03:27:14 UTC (rev 10435)
@@ -0,0 +1,30 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2009 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") gnuradio_swig_py_gengen
+#endif
+
+ //%feature("autodoc", "1");           // generate python docstrings
+
+%include "gnuradio.i"                          // the common stuff
+
+%include "gengen.i"

Added: 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_io.i
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_io.i
                             (rev 0)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_io.i
     2009-02-11 03:27:14 UTC (rev 10435)
@@ -0,0 +1,30 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2009 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") gnuradio_swig_py_io
+#endif
+
+ //%feature("autodoc", "1");           // generate python docstrings
+
+%include "gnuradio.i"                          // the common stuff
+
+%include "io.i"

Added: 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_runtime.i
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_runtime.i
                                (rev 0)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/gnuradio_swig_py_runtime.i
        2009-02-11 03:27:14 UTC (rev 10435)
@@ -0,0 +1,32 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009 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.
+ */
+
+#ifndef SWIGIMPORTED
+%module(directors="1") gnuradio_swig_py_runtime
+#endif
+
+ //%feature("autodoc", "1");           // generate python docstrings
+
+#define SW_RUNTIME
+%include "gnuradio.i"                          // the common stuff
+
+%include "runtime.i"

Deleted: 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/sw_filter.i

Deleted: 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/sw_general.i

Deleted: 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/sw_gengen.i

Deleted: 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/sw_io.i

Deleted: 
gnuradio/branches/developers/michaelld/am_swig/gnuradio-core/src/lib/swig/sw_runtime.i

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-atsc/src/lib/Makefile.am
===================================================================
--- gnuradio/branches/developers/michaelld/am_swig/gr-atsc/src/lib/Makefile.am  
2009-02-10 23:30:55 UTC (rev 10434)
+++ gnuradio/branches/developers/michaelld/am_swig/gr-atsc/src/lib/Makefile.am  
2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 # Install this stuff so that it ends up as the gnuradio.atsc module
 # This usually ends up at:
@@ -214,23 +215,17 @@
 #  It builds the atsc module which we'll load into python
 # ------------------------------------------------------------------------
 
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 \
-       $(NON_LOCAL_IFILES)             
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                  \
+       $(srcdir)/atsc.i
 
-NON_LOCAL_IFILES =                     \
-       $(GNURADIO_I)
-
-LOCAL_IFILES =                                 \
-       $(srcdir)/atsc.i                                
-
 # These files are built by SWIG.  The first is the C++ glue.
 # The second is the python wrapper that loads the _atsc shared library
 # and knows how to call our extensions.
 
 swig_built_sources =                   \
        atsc.cc                         \
-       atsc.py                         
+       atsc.py
 
 # This gets atsc.py installed in the right place
 ourpython_PYTHON =                     \
@@ -240,27 +235,22 @@
 
 # These are the source files that go into the shared library
 _atsc_la_SOURCES =                     \
-       atsc.cc                 
+       atsc.cc
 
 # magic flags
-_atsc_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+_atsc_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
 
 # link the library against some comon swig runtime code and the 
 # c++ standard library
 _atsc_la_LIBADD =                      \
-       $(GNURADIO_CORE_LA)             \
-       $(PYTHON_LDFLAGS)               \
        libatsc.la                      \
-       -lstdc++                        
+       $(STD_SWIG_LA_LIB_ADD)
 
-atsc.cc atsc.py: $(ALL_IFILES)
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module atsc \
-               -o atsc.cc $(LOCAL_IFILES)
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
-# These swig headers get installed in ${prefix}/include/gnuradio/swig
-swiginclude_HEADERS =                  \
-       $(LOCAL_IFILES)                 
-
 # Don't distribute output of swig
 dist-hook:
        @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done
@@ -272,4 +262,3 @@
 
 CLEANFILES =      atsci_viterbi_mux.cc atsci_viterbi_gen
 MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc
-

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-audio-alsa/src/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gr-audio-alsa/src/Makefile.am    
    2009-02-10 23:30:55 UTC (rev 10434)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gr-audio-alsa/src/Makefile.am    
    2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 # Install this stuff so that it ends up as the gnuradio.audio_alsa module
 # This usually ends up at:
@@ -32,16 +33,10 @@
 
 TESTS = run_tests
 
-LOCAL_IFILES =                                 \
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                  \
        $(srcdir)/audio_alsa.i                          
 
-NON_LOCAL_IFILES =                     \
-       $(GNURADIO_I)
-
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 \
-       $(NON_LOCAL_IFILES)             
-
 BUILT_SOURCES =                        \
        audio_alsa.cc                   \
        audio_alsa.py                           
@@ -70,31 +65,27 @@
 noinst_HEADERS =                       \
        gri_alsa.h
 
-swiginclude_HEADERS =                  \
-       $(LOCAL_IFILES)
-
 _audio_alsa_la_LIBADD =                \
-       $(PYTHON_LDFLAGS)               \
-       $(GNURADIO_CORE_LA)             \
        $(ALSA_LIBS)                    \
        libgnuradio-audio-alsa.la       \
-       -lstdc++
+       $(STD_SWIG_LA_LIB_ADD)
 
 libgnuradio_audio_alsa_la_LIBADD =     \
        $(ALSA_LIBS)
 
-_audio_alsa_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+_audio_alsa_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
 
 libgnuradio_audio_alsa_la_LDFLAGS = $(NO_UNDEFINED)
 
 _audio_alsa_la_CXXFLAGS = @swig_CXXFLAGS@
 
-audio_alsa.cc audio_alsa.py: $(ALL_IFILES)
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module audio_alsa \
-               -o audio_alsa.cc $(LOCAL_IFILES)
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
 noinst_PYTHON =                        \
-       qa_alsa.py                      
+       qa_alsa.py
 
 MOSTLYCLEANFILES = \
        $(BUILT_SOURCES) *~ *.pyc

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-audio-jack/src/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gr-audio-jack/src/Makefile.am    
    2009-02-10 23:30:55 UTC (rev 10434)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gr-audio-jack/src/Makefile.am    
    2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 # Install this stuff so that it ends up as the gnuradio.audio_jack module
 # This usually ends up at:
@@ -32,19 +33,13 @@
 
 TESTS = run_tests
 
-LOCAL_IFILES =                                 \
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                  \
        $(srcdir)/audio_jack.i                          
 
-NON_LOCAL_IFILES =                     \
-       $(GNURADIO_I)
-
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 \
-       $(NON_LOCAL_IFILES)             
-
 BUILT_SOURCES =                        \
        audio_jack.cc                   \
-       audio_jack.py                           
+       audio_jack.py
 
 ourpython_PYTHON =                     \
        audio_jack.py
@@ -66,22 +61,18 @@
 noinst_HEADERS =                       \
        gri_jack.h
 
-swiginclude_HEADERS =                  \
-       $(LOCAL_IFILES)
-
 _audio_jack_la_LIBADD =                \
-       $(PYTHON_LDFLAGS)               \
-       $(GNURADIO_CORE_LA)             \
        $(JACK_LIBS)                    \
-       -lstdc++
+       $(STD_SWIG_LA_LIB_ADD)
 
-_audio_jack_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+_audio_jack_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
 
 _audio_jack_la_CXXFLAGS = @swig_CXXFLAGS@
 
-audio_jack.cc audio_jack.py: $(ALL_IFILES)
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module audio_jack \
-               -o audio_jack.cc $(LOCAL_IFILES)
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
 noinst_PYTHON =                        \
        qa_jack.py

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-audio-oss/src/Makefile.am
===================================================================
--- gnuradio/branches/developers/michaelld/am_swig/gr-audio-oss/src/Makefile.am 
2009-02-10 23:30:55 UTC (rev 10434)
+++ gnuradio/branches/developers/michaelld/am_swig/gr-audio-oss/src/Makefile.am 
2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 # Install this stuff so that it ends up as the gnuradio.audio_oss module
 # This usually ends up at:
@@ -31,19 +32,13 @@
 EXTRA_DIST = run_tests.in
 TESTS = run_tests
 
-LOCAL_IFILES =                                 \
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                  \
        $(srcdir)/audio_oss.i
 
-NON_LOCAL_IFILES =                     \
-       $(GNURADIO_I)
-
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 \
-       $(NON_LOCAL_IFILES)             
-
 BUILT_SOURCES =                        \
        audio_oss.cc                    \
-       audio_oss.py                    
+       audio_oss.py
 
 ourpython_PYTHON =                     \
        audio_oss.py
@@ -59,24 +54,20 @@
 
 grinclude_HEADERS =                    \
        audio_oss_sink.h                \
-       audio_oss_source.h      
+       audio_oss_source.h
 
-swiginclude_HEADERS =                  \
-       $(LOCAL_IFILES)
-
 _audio_oss_la_LIBADD =                         \
-       $(PYTHON_LDFLAGS)               \
-       $(GNURADIO_CORE_LA)             \
        $(OSS_LIBS)                     \
-       -lstdc++
+       $(STD_SWIG_LA_LIB_ADD)
 
 _audio_oss_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
 
 _audio_oss_la_CXXFLAGS = @swig_CXXFLAGS@
 
-audio_oss.cc audio_oss.py: $(ALL_IFILES)
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module audio_oss \
-               -o audio_oss.cc $(LOCAL_IFILES)
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
 # Don't distribute output of swig
 dist-hook:
@@ -87,4 +78,3 @@
 
 MOSTLYCLEANFILES = \
        $(BUILT_SOURCES) *~ *.pyc
-

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-audio-osx/src/Makefile.am
===================================================================
--- gnuradio/branches/developers/michaelld/am_swig/gr-audio-osx/src/Makefile.am 
2009-02-10 23:30:55 UTC (rev 10434)
+++ gnuradio/branches/developers/michaelld/am_swig/gr-audio-osx/src/Makefile.am 
2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 # Install this stuff so that it ends up as the gnuradio.audio_osx module
 # This usually ends up at:
@@ -31,19 +32,13 @@
 EXTRA_DIST = run_tests.in
 TESTS = run_tests
 
-LOCAL_IFILES =                                 \
-       $(srcdir)/audio_osx.i                           
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                  \
+       $(srcdir)/audio_osx.i
 
-NON_LOCAL_IFILES =                     \
-       $(GNURADIO_I)
-
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 \
-       $(NON_LOCAL_IFILES)             
-
 BUILT_SOURCES =                        \
        audio_osx.cc                    \
-       audio_osx.py                            
+       audio_osx.py
 
 ourpython_PYTHON =                     \
        audio_osx.py
@@ -55,7 +50,7 @@
 _audio_osx_la_SOURCES =                \
        audio_osx.cc                    \
        audio_osx_sink.cc               \
-       audio_osx_source.cc                     
+       audio_osx_source.cc
 
 noinst_HEADERS =                       \
        audio_osx.h                     \
@@ -64,23 +59,20 @@
 
 grinclude_HEADERS =                    \
        audio_osx_sink.h                \
-       audio_osx_source.h                      
+       audio_osx_source.h
 
-swiginclude_HEADERS =                  \
-       $(LOCAL_IFILES)
-
 _audio_osx_la_LIBADD =                         \
-       $(PYTHON_LDFLAGS)               \
-       $(GNURADIO_CORE_LA)             \
-       -lstdc++                                
+       $(STD_SWIG_LA_LIB_ADD)
 
-_audio_osx_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version -framework 
AudioUnit -framework CoreAudio -framework AudioToolbox
+_audio_osx_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS) -framework AudioUnit \
+       -framework CoreAudio -framework AudioToolbox
 
 _audio_osx_la_CXXFLAGS = @swig_CXXFLAGS@
 
-audio_osx.cc audio_osx.py: $(ALL_IFILES)
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module audio_osx \
-               -o audio_osx.cc $(LOCAL_IFILES)
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
 noinst_PYTHON = qa_osx.py test_audio_loop.py
 

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-audio-portaudio/src/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gr-audio-portaudio/src/Makefile.am
   2009-02-10 23:30:55 UTC (rev 10434)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gr-audio-portaudio/src/Makefile.am
   2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 # Install this stuff so that it ends up as the gnuradio.audio_portaudio module
 # This usually ends up at:
@@ -32,19 +33,13 @@
 
 TESTS = run_tests
 
-LOCAL_IFILES =                                 \
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                  \
        $(srcdir)/audio_portaudio.i
 
-NON_LOCAL_IFILES =                     \
-       $(GNURADIO_I)
-
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 \
-       $(NON_LOCAL_IFILES)             
-
 BUILT_SOURCES =                        \
        audio_portaudio.cc              \
-       audio_portaudio.py                              
+       audio_portaudio.py
 
 ourpython_PYTHON =                     \
        audio_portaudio.py
@@ -62,27 +57,23 @@
 
 grinclude_HEADERS =                    \
        audio_portaudio_sink.h          \
-       audio_portaudio_source.h                
+       audio_portaudio_source.h
 
 noinst_HEADERS =                       \
        gri_portaudio.h
 
-swiginclude_HEADERS =                  \
-       $(LOCAL_IFILES)
-
 _audio_portaudio_la_LIBADD =           \
-       $(PYTHON_LDFLAGS)               \
-       $(GNURADIO_CORE_LA)             \
        $(PORTAUDIO_LIBS)               \
-       -lstdc++
+       $(STD_SWIG_LA_LIB_ADD)
 
-_audio_portaudio_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+_audio_portaudio_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
 
 _audio_portaudio_la_CXXFLAGS = @swig_CXXFLAGS@
 
-audio_portaudio.cc audio_portaudio.py: $(ALL_IFILES) audio_portaudio_sink.h 
audio_portaudio_source.h
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module audio_portaudio \
-               -o audio_portaudio.cc $(LOCAL_IFILES)
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
 noinst_PYTHON =                        \
        qa_portaudio.py

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-audio-windows/src/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gr-audio-windows/src/Makefile.am 
    2009-02-10 23:30:55 UTC (rev 10434)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gr-audio-windows/src/Makefile.am 
    2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 # Install this stuff so that it ends up as the gnuradio.audio_windows module
 # This usually ends up at:
@@ -31,19 +32,13 @@
 EXTRA_DIST = run_tests.in
 TESTS = run_tests
 
-LOCAL_IFILES =                                 \
-       $(srcdir)/audio_windows.i                               
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                  \
+       $(srcdir)/audio_windows.i
 
-NON_LOCAL_IFILES =                     \
-       $(GNURADIO_I)
-
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 \
-       $(NON_LOCAL_IFILES)             
-
 BUILT_SOURCES =                        \
-       audio_windows.cc                        \
-       audio_windows.py                                
+       audio_windows.cc                \
+       audio_windows.py
 
 ourpython_PYTHON =                     \
        audio_windows.py
@@ -53,32 +48,28 @@
 ourlib_LTLIBRARIES = _audio_windows.la
 
 _audio_windows_la_SOURCES =            \
-       audio_windows.cc                        \
+       audio_windows.cc                \
        audio_windows_sink.cc           \
-       audio_windows_source.cc                 
+       audio_windows_source.cc
 
-
 grinclude_HEADERS =                    \
        audio_windows_sink.h            \
-       audio_windows_source.h                  
+       audio_windows_source.h
 
-swiginclude_HEADERS =                  \
-       $(LOCAL_IFILES)
-
 _audio_windows_la_LIBADD =             \
-       $(PYTHON_LDFLAGS)               \
-       $(GNURADIO_CORE_LA)             \
        $(WINAUDIO_LIBS)                \
-       -lstdc++                                
+       $(STD_SWIG_LA_LIB_ADD)
 
-_audio_windows_la_LDFLAGS = -no-undefined -module -avoid-version \
-                            $(LIBGNURADIO_CORE_EXTRA_LDFLAGS)
+_audio_windows_la_LDFLAGS =                    \
+       $(STD_SWIG_LA_LD_FLAGS)                 \
+       $(LIBGNURADIO_CORE_EXTRA_LDFLAGS)
 
 _audio_windows_la_CXXFLAGS = @swig_CXXFLAGS@
 
-audio_windows.cc audio_windows.py: $(ALL_IFILES)
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module audio_windows \
-               -o audio_windows.cc $(LOCAL_IFILES)
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
 noinst_PYTHON = qa_audio_windows.py
 

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-comedi/src/Makefile.am
===================================================================
--- gnuradio/branches/developers/michaelld/am_swig/gr-comedi/src/Makefile.am    
2009-02-10 23:30:55 UTC (rev 10434)
+++ gnuradio/branches/developers/michaelld/am_swig/gr-comedi/src/Makefile.am    
2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 # Install this stuff so that it ends up as the gnuradio.comedi module
 # This usually ends up at:
@@ -32,19 +33,13 @@
 
 TESTS = run_tests
 
-LOCAL_IFILES =                                 \
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                  \
        $(srcdir)/comedi.i                              
 
-NON_LOCAL_IFILES =                     \
-       $(GNURADIO_I)
-
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 \
-       $(NON_LOCAL_IFILES)             
-
 BUILT_SOURCES =                        \
        comedi.cc                       \
-       comedi.py                               
+       comedi.py
 
 ourpython_PYTHON =                     \
        comedi.py
@@ -66,26 +61,21 @@
 noinst_HEADERS =               \
        gri_comedi.h                    
 
-
-swiginclude_HEADERS =          \
-       $(LOCAL_IFILES)
-
 _comedi_la_LIBADD =            \
-       $(PYTHON_LDFLAGS)       \
-       $(GNURADIO_CORE_LA)     \
        $(COMEDI_LIBS)          \
-       -lstdc++                                
+       $(STD_SWIG_LA_LIB_ADD)
 
-_comedi_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+_comedi_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
 
 _comedi_la_CXXFLAGS = @swig_CXXFLAGS@
 
-comedi.cc comedi.py: $(ALL_IFILES)
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module comedi \
-               -o comedi.cc $(LOCAL_IFILES)
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
 noinst_PYTHON =                \
-       qa_comedi.py                    
+       qa_comedi.py
 
 # Don't distribute output of swig
 dist-hook:
@@ -94,4 +84,3 @@
 
 MOSTLYCLEANFILES = \
        $(BUILT_SOURCES) *~ *.pyc
-

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-cvsd-vocoder/src/lib/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gr-cvsd-vocoder/src/lib/Makefile.am
  2009-02-10 23:30:55 UTC (rev 10434)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gr-cvsd-vocoder/src/lib/Makefile.am
  2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 # Install this stuff so that it ends up as the gnuradio.vocoder module
 # This usually ends up at:
@@ -30,14 +31,8 @@
 
 AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 \
-       $(NON_LOCAL_IFILES)             
-
-NON_LOCAL_IFILES =                     \
-       $(GNURADIO_I)
-
-LOCAL_IFILES =                                 \
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                  \
        $(srcdir)/cvsd_vocoder.i
 
 # These files are built by SWIG.  The first is the C++ glue.
@@ -45,8 +40,8 @@
 # and knows how to call our extensions.
 
 BUILT_SOURCES =                        \
-       cvsd_vocoder.cc         \
-       cvsd_vocoder.py                         
+       cvsd_vocoder.cc                 \
+       cvsd_vocoder.py
 
 # This gets cvsd_vocoder.py installed in the right place
 ourpython_PYTHON =                     \
@@ -58,38 +53,30 @@
 _cvsd_vocoder_la_SOURCES =             \
        cvsd_decode_bs.cc               \
        cvsd_encode_sb.cc               \
-       cvsd_vocoder.cc         
+       cvsd_vocoder.cc
 
-
 # magic flags
-_cvsd_vocoder_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+_cvsd_vocoder_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
 
 # link the library against the c++ standard library
 _cvsd_vocoder_la_LIBADD =      \
-       $(PYTHON_LDFLAGS)       \
-       $(GNURADIO_CORE_LA)     \
-       -lstdc++                        
+       $(STD_SWIG_LA_LIB_ADD)
 
 _cvsd_vocoder_la_CXXFLAGS = @swig_CXXFLAGS@
 
-cvsd_vocoder.cc cvsd_vocoder.py: $(ALL_IFILES)
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module cvsd_vocoder \
-               -o cvsd_vocoder.cc $(LOCAL_IFILES)
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
 # These headers get installed in ${prefix}/include/gnuradio
 grinclude_HEADERS =                    \
        cvsd_decode_bs.h                \
-       cvsd_encode_sb.h                
+       cvsd_encode_sb.h
 
-# These swig headers get installed in ${prefix}/include/gnuradio/swig
-swiginclude_HEADERS =                  \
-       $(LOCAL_IFILES)
-
-
 MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc
 
 # Don't distribute output of swig
 dist-hook:
        @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done
        @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
-

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-gcell/src/Makefile.am
===================================================================
--- gnuradio/branches/developers/michaelld/am_swig/gr-gcell/src/Makefile.am     
2009-02-10 23:30:55 UTC (rev 10434)
+++ gnuradio/branches/developers/michaelld/am_swig/gr-gcell/src/Makefile.am     
2009-02-11 03:27:14 UTC (rev 10435)
@@ -19,6 +19,7 @@
 #
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 SUBDIRS = . examples
 
@@ -65,19 +66,13 @@
 # the library for the swig interface
 ourlib_LTLIBRARIES = _gcell.la
 
-LOCAL_IFILES = \
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS = \
        $(srcdir)/gc_job_manager.i \
        $(srcdir)/gcell.i \
        $(srcdir)/gcell_fft_vcc.i
 
-NON_LOCAL_IFILES = \
-       $(GNURADIO_I)
-
-ALL_IFILES = \
-       $(LOCAL_IFILES) \
-       $(NON_LOCAL_IFILES)
-
-swig_built_sources = \
+BUILT_SOURCES = \
        gcell.cc \
        gcell.py
 
@@ -92,45 +87,28 @@
        libgr_gcell.la \
        -lstdc++
 
-_gcell_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+_gcell_la_LDFLAGS = \
+       $(STD_SWIG_LA_LD_FLAGS)
 
 _gcell_la_CXXFLAGS = @swig_CXXFLAGS@
 
-swiginclude_HEADERS = \
-       $(LOCAL_IFILES)
-
-#gcell.cc gcell.py: $(ALL_IFILES)
-#      $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module gcell \
-#              -o gcell.cc $(LOCAL_IFILES)
-
 # KLUDGE: Force runtime include of gcell.d dependency file.
 # This is not guaranteed to be portable, but will probably work.
 # If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/address@hidden@
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
-gcell.py gcell.h: gcell.cc
-
-gcell.cc : $(srcdir)/gcell.i $(GNURADIO_I)
-       if $(SWIG) $(STD_SWIG_PYTHON_ARGS) -MMD -MF gcell.Td -module gcell \
-               -o gcell.cc $(srcdir)/gcell.i ;\
-       then if test $(host_os) = mingw32; \
-            then sed 's,\\\\,/,g' <gcell.Td >gcell.d; rm -f gcell.Td; \
-            else mv -f gcell.Td gcell.d; fi \
-       else rm -f gcell.Td; exit 1; fi 
-
-
 noinst_PYTHON =  \
        qa_fft.py
 
 # ----------------------------------------------------------------
 
 MOSTLYCLEANFILES =  \
-       $(swig_built_sources) *~ *.pyc
+       $(BUILT_SOURCES) *~ *.pyc
 
 # Don't distribute output of swig
 dist-hook:
-       @for file in $(swig_built_sources); do echo $(RM) $(distdir)/$$file; 
done
-       @for file in $(swig_built_sources); do $(RM) $(distdir)/$$file; done
+       @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done
+       @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
 
 DISTCLEANFILES = \
        gcell.d

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-gpio/src/lib/Makefile.am
===================================================================
--- gnuradio/branches/developers/michaelld/am_swig/gr-gpio/src/lib/Makefile.am  
2009-02-10 23:30:55 UTC (rev 10434)
+++ gnuradio/branches/developers/michaelld/am_swig/gr-gpio/src/lib/Makefile.am  
2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,19 +20,15 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 ourpythondir = $(grpythondir)/gpio
 ourlibdir    = $(grpyexecdir)/gpio
 
 AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 \
-       $(NON_LOCAL_IFILES)             
-
-NON_LOCAL_IFILES = $(GNURADIO_I)
-
-LOCAL_IFILES =                                 \
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                  \
        $(srcdir)/gpio.i                                
 
 # These files are built by SWIG.  The first is the C++ glue.
@@ -55,28 +51,21 @@
        gpio_and_const_ss.cc            
 
 # magic flags
-_gpio_swig_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+_gpio_swig_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
 
 # link the library against some comon swig runtime code and the 
 # c++ standard library
-_gpio_swig_la_LIBADD =                 \
-       $(PYTHON_LDFLAGS)               \
-       $(GNURADIO_CORE_LA)             \
-       -lstdc++                        
+_gpio_swig_la_LIBADD = $(STD_SWIG_LA_LIB_ADD)
 
-gpio_swig.cc gpio_swig.py: $(ALL_IFILES)
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module gpio_swig \
-               -o gpio_swig.cc $(LOCAL_IFILES)
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
 # These headers get installed in ${prefix}/include/gnuradio
 grinclude_HEADERS =                    \
        gpio_and_const_ss.h             
 
-# These swig headers get installed in ${prefix}/include/gnuradio/swig
-swiginclude_HEADERS =                  \
-       $(LOCAL_IFILES)
-
-
 # Don't distribute output of swig
 dist-hook:
        @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-gsm-fr-vocoder/src/lib/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gr-gsm-fr-vocoder/src/lib/Makefile.am
        2009-02-10 23:30:55 UTC (rev 10434)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gr-gsm-fr-vocoder/src/lib/Makefile.am
        2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 SUBDIRS = gsm .
 
@@ -32,14 +33,8 @@
 
 AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 \
-       $(NON_LOCAL_IFILES)             
-
-NON_LOCAL_IFILES =                     \
-       $(GNURADIO_I)
-
-LOCAL_IFILES =                                 \
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                  \
        $(srcdir)/gsm_full_rate.i
 
 # These files are built by SWIG.  The first is the C++ glue.
@@ -60,38 +55,30 @@
 _gsm_full_rate_la_SOURCES =            \
        gsm_fr_decode_ps.cc             \
        gsm_fr_encode_sp.cc             \
-       gsm_full_rate.cc                
+       gsm_full_rate.cc
 
-
 # magic flags
-_gsm_full_rate_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+_gsm_full_rate_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
 
 # link the library against the gsm library and the
 # c++ standard library
 _gsm_full_rate_la_LIBADD =     \
        gsm/libgsm.la           \
-       $(PYTHON_LDFLAGS)       \
-       $(GNURADIO_CORE_LA)     \
-       -lstdc++                        
+       $(STD_SWIG_LA_LIB_ADD)
 
-gsm_full_rate.cc gsm_full_rate.py: $(ALL_IFILES)
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module gsm_full_rate \
-               -o gsm_full_rate.cc $(LOCAL_IFILES)
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
 # These headers get installed in ${prefix}/include/gnuradio
 grinclude_HEADERS =                    \
        gsm_fr_decode_ps.h              \
-       gsm_fr_encode_sp.h              
+       gsm_fr_encode_sp.h
 
-# These swig headers get installed in ${prefix}/include/gnuradio/swig
-swiginclude_HEADERS =                  \
-       $(LOCAL_IFILES)
-
-
 MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc
 
 # Don't distribute output of swig
 dist-hook:
        @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done
        @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
-

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-howto-write-a-block/doc/src_lib_Makefile_2.am
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gr-howto-write-a-block/doc/src_lib_Makefile_2.am
     2009-02-10 23:30:55 UTC (rev 10434)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gr-howto-write-a-block/doc/src_lib_Makefile_2.am
     2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 # Install this stuff so that it ends up as the gnuradio.howto module
 # This usually ends up at:
@@ -33,24 +34,17 @@
 SWIGCPPPYTHONARGS = -noruntime -c++ -python $(PYTHON_CPPFLAGS) \
        -I$(swigincludedir) -I$(grincludedir) $(WITH_SWIG_INCLUDES)
 
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 \
-       $(NON_LOCAL_IFILES)             
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                  \
+       $(srcdir)/howto.i
 
-NON_LOCAL_IFILES =                     \
-       $(GNURADIO_CORE_INCLUDEDIR)/swig/gnuradio.i
-
-
-LOCAL_IFILES =                                 \
-       howto.i                         
-
 # These files are built by SWIG.  The first is the C++ glue.
 # The second is the python wrapper that loads the _howto shared library
 # and knows how to call our extensions.
 
 BUILT_SOURCES =                        \
        howto.cc                        \
-       howto.py                                
+       howto.py
 
 # This gets howto.py installed in the right place
 ourpython_PYTHON =                     \
@@ -61,26 +55,19 @@
 # These are the source files that go into the shared library
 _howto_la_SOURCES =                    \
        howto.cc                        \
-       howto_square_ff.cc              
+       howto_square_ff.cc
 
 # magic flags
-_howto_la_LDFLAGS = -module -avoid-version
+_howto_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
 
 # link the library against some comon swig runtime code and the 
 # c++ standard library
 _howto_la_LIBADD =                     \
        -lgrswigrunpy                   \
-       -lstdc++                        
+       -lstdc++
 
-howto.cc howto.py: howto.i $(ALL_IFILES)
-       $(SWIG) $(SWIGCPPPYTHONARGS) -module howto -o howto.cc $<
-
 # These headers get installed in ${prefix}/include/gnuradio
 grinclude_HEADERS =                    \
        howto_square_ff.h               
 
-# These swig headers get installed in ${prefix}/include/gnuradio/swig
-swiginclude_HEADERS =                  \
-       $(LOCAL_IFILES)
-
 MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-howto-write-a-block/src/lib/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gr-howto-write-a-block/src/lib/Makefile.am
   2009-02-10 23:30:55 UTC (rev 10434)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gr-howto-write-a-block/src/lib/Makefile.am
   2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 # Install this stuff so that it ends up as the gnuradio.howto module
 # This usually ends up at:
@@ -32,24 +33,17 @@
 
 SWIG_PYTHON_ARGS = $(SWIG_PYTHON_FLAGS) $(SWIGGRFLAGS)
 
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 \
-       $(NON_LOCAL_IFILES)             
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                  \
+       $(srcdir)/howto.i       
 
-NON_LOCAL_IFILES =                     \
-       $(GNURADIO_CORE_INCLUDEDIR)/swig/gnuradio.i
-
-
-LOCAL_IFILES =                                 \
-       $(srcdir)/howto.i                               
-
 # These files are built by SWIG.  The first is the C++ glue.
 # The second is the python wrapper that loads the _howto shared library
 # and knows how to call our extensions.
 
 BUILT_SOURCES =                        \
        howto.cc                        \
-       howto.py                                
+       howto.py
 
 # This gets howto.py installed in the right place
 ourpython_PYTHON =                     \
@@ -61,32 +55,25 @@
 _howto_la_SOURCES =                    \
        howto.cc                        \
        howto_square_ff.cc              \
-       howto_square2_ff.cc             
+       howto_square2_ff.cc
 
 # magic flags
-_howto_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+_howto_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
 
 # link the library against some comon swig runtime code and the 
 # c++ standard library
-_howto_la_LIBADD =                     \
-       $(PYTHON_LDFLAGS)               \
-       -lstdc++                        
+_howto_la_LIBADD = $(STD_SWIG_LA_LIB_ADD)                      
 
-howto.cc howto.py: $(ALL_IFILES)
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module howto \
-               -o howto.cc $(LOCAL_IFILES)
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
 # These headers get installed in ${prefix}/include/gnuradio
 grinclude_HEADERS =                    \
        howto_square_ff.h               \
-       howto_square2_ff.h              
+       howto_square2_ff.h
 
-
-# These swig headers get installed in ${prefix}/include/gnuradio/swig
-swiginclude_HEADERS =                  \
-       $(LOCAL_IFILES)
-
-
 MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc
 
 # Don't distribute output of swig

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-msdd6000/src/Makefile.am
===================================================================
--- gnuradio/branches/developers/michaelld/am_swig/gr-msdd6000/src/Makefile.am  
2009-02-10 23:30:55 UTC (rev 10434)
+++ gnuradio/branches/developers/michaelld/am_swig/gr-msdd6000/src/Makefile.am  
2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 # Install this stuff so that it ends up as the gnuradio.howto module
 # This usually ends up at:
@@ -39,24 +40,17 @@
 AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \
        $(WITH_INCLUDES)
 
-NON_LOCAL_IFILES =                     \
-       $(GNURADIO_I)
-
-LOCAL_IFILES =                                 \
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                  \
        $(srcdir)/msdd.i
 
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 \
-       $(NON_LOCAL_IFILES)             
-
-
 # These files are built by SWIG.  The first is the C++ glue.
 # The second is the python wrapper that loads the _howto shared library
 # and knows how to call our extensions.
 
 BUILT_SOURCES =                        \
-       msdd.cc                 \
-       msdd.py                         
+       msdd.cc                         \
+       msdd.py
 
 # This gets howto.py installed in the right place
 ourpython_PYTHON =                     \
@@ -71,33 +65,23 @@
        msdd6000.cc
 
 # magic flag
-_msdd_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version 
-#-lfftw3 -lfftw3f -lfann 
+_msdd_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
 
 # link the library against some comon swig runtime code and the 
 # c++ standard library
-_msdd_la_LIBADD =                      \
-       $(GNURADIO_CORE_LA)             \
-       $(PYTHON_LDFLAGS)               \
-       -lstdc++
+_msdd_la_LIBADD = $(STD_SWIG_LA_LIB_ADD)
 
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
-msdd.cc msdd.py: $(ALL_IFILES) 
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module msdd \
-               -o msdd.cc $(LOCAL_IFILES)
-
 # These headers get installed in ${prefix}/include/gnuradio
 grinclude_HEADERS =                    \
        msdd_source_simple.h                    \
        msdd_buffer_copy_behaviors.h \
        msdd6000.h
 
-
-# These swig headers get installed in ${prefix}/include/gnuradio/swig
-swiginclude_HEADERS =                  \
-       $(LOCAL_IFILES)
-
-
 MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc
 
 # Don't distribute output of swig

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-pager/src/Makefile.am
===================================================================
--- gnuradio/branches/developers/michaelld/am_swig/gr-pager/src/Makefile.am     
2009-02-10 23:30:55 UTC (rev 10434)
+++ gnuradio/branches/developers/michaelld/am_swig/gr-pager/src/Makefile.am     
2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 EXTRA_DIST = \
     run_tests.in \
@@ -45,24 +46,18 @@
 
 AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
-ALL_IFILES = \
-    $(LOCAL_IFILES) \
-    $(NON_LOCAL_IFILES)        \
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                  \
+    $(srcdir)/pager_swig.i             \
     $(srcdir)/pager_flex_frame.i
 
-NON_LOCAL_IFILES = \
-    $(GNURADIO_I)
-
-LOCAL_IFILES = \
-    $(srcdir)/pager.i
-
 # These files are built by SWIG.  The first is the C++ glue.
 # The second is the python wrapper that loads the _howto shared library
 # and knows how to call our extensions.
 
-BUILT_SOURCES = \
-    pager_swig.cc \
-    pager_swig.py                              
+BUILT_SOURCES =        \
+    pager_swig.cc      \
+    pager_swig.py      
 
 # This gets imported Python objects installed in the right place
 ourpython_PYTHON = \
@@ -87,17 +82,15 @@
     # Additional source modules here
 
 # magic flags
-_pager_swig_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+_pager_swig_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
 
 # link the library against the c++ standard library
-_pager_swig_la_LIBADD = \
-    $(PYTHON_LDFLAGS) \
-    $(GNURADIO_CORE_LA) \
-    -lstdc++                   
+_pager_swig_la_LIBADD = $(STD_SWIG_LA_LIB_ADD)                 
 
-pager_swig.cc pager_swig.py: $(ALL_IFILES)
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module pager_swig \
-               -o pager_swig.cc $(LOCAL_IFILES)
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
 # These headers get installed in ${prefix}/include/gnuradio
 grinclude_HEADERS = \
@@ -111,11 +104,6 @@
     pageri_util.h
     # Additional header files here
 
-# These swig headers get installed in ${prefix}/include/gnuradio/swig
-swiginclude_HEADERS = \
-    $(LOCAL_IFILES) \
-    pager_flex_frame.i
-
 MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc *~ *.tmp
 
 # Don't distribute output of swig

Deleted: gnuradio/branches/developers/michaelld/am_swig/gr-pager/src/pager.i

Added: gnuradio/branches/developers/michaelld/am_swig/gr-pager/src/pager_swig.i
===================================================================
--- gnuradio/branches/developers/michaelld/am_swig/gr-pager/src/pager_swig.i    
                        (rev 0)
+++ gnuradio/branches/developers/michaelld/am_swig/gr-pager/src/pager_swig.i    
2009-02-11 03:27:14 UTC (rev 10435)
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2005,2006,2009 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.
+ */
+
+%include "gnuradio.i"
+
+%{
+#include "pager_flex_frame.h"
+#include "pager_slicer_fb.h"
+#include "pager_flex_sync.h"
+#include "pager_flex_deinterleave.h"
+#include "pager_flex_parse.h"
+%}
+
+%include "pager_flex_frame.i"
+
+// ----------------------------------------------------------------
+
+GR_SWIG_BLOCK_MAGIC(pager,slicer_fb);
+
+pager_slicer_fb_sptr pager_make_slicer_fb(float alpha);
+
+class pager_slicer_fb : public gr_sync_block
+{
+private:
+    pager_slicer_fb(float alpha);
+
+public:
+    float dc_offset() const { return d_avg; }
+};
+
+// ----------------------------------------------------------------
+
+GR_SWIG_BLOCK_MAGIC(pager,flex_sync);
+
+pager_flex_sync_sptr pager_make_flex_sync();
+
+class pager_flex_sync : public gr_block
+{
+private:
+    pager_flex_sync();
+
+public:
+};
+
+// ----------------------------------------------------------------
+
+GR_SWIG_BLOCK_MAGIC(pager,flex_deinterleave);
+
+pager_flex_deinterleave_sptr pager_make_flex_deinterleave();
+
+class pager_flex_deinterleave : public gr_sync_decimator
+{
+private:
+    pager_flex_deinterleave();
+
+public:
+};
+
+// ----------------------------------------------------------------
+
+GR_SWIG_BLOCK_MAGIC(pager,flex_parse);
+
+pager_flex_parse_sptr pager_make_flex_parse(gr_msg_queue_sptr queue, float 
freq);
+
+class pager_flex_parse : public gr_block
+{
+private:
+    pager_flex_parse(gr_msg_queue_sptr queue, float freq);
+
+public:
+};

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-qtgui/src/lib/Makefile.am
===================================================================
--- gnuradio/branches/developers/michaelld/am_swig/gr-qtgui/src/lib/Makefile.am 
2009-02-10 23:30:55 UTC (rev 10434)
+++ gnuradio/branches/developers/michaelld/am_swig/gr-qtgui/src/lib/Makefile.am 
2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 # Install this stuff so that it ends up as the gnuradio.qtgui module
 # This usually ends up at:
@@ -31,20 +32,10 @@
 AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \
               $(QT_INCLUDES) -I. $(WITH_INCLUDES)
 
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 \
-       $(NON_LOCAL_IFILES)             
-
-NON_LOCAL_IFILES =                     \
-       $(GNURADIO_I)
-
-LOCAL_IFILES =                                 \
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                          \
        $(srcdir)/qtgui.i
 
-# These files are built by SWIG.  The first is the C++ glue.
-# The second is the python wrapper that loads the shared library
-# and knows how to call our extensions.
-
 # Only include these files in the build if qtgui passes configure checks
 # This is mostly to help make distcheck pass
 if BUILD_QT
@@ -124,31 +115,24 @@
 endif
 
 # magic flags
-_qtgui_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+_qtgui_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
 libqtgui_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0
 
 # link the library against the c++ standard library
 _qtgui_la_LIBADD =             \
-       $(PYTHON_LDFLAGS)       \
-       $(GNURADIO_CORE_LA)     \
-       -lstdc++                \
-       $(QT_LIBS)
+       $(QT_LIBS)              \
+       $(STD_SWIG_LA_LIB_ADD)
 
-
 libqtgui_la_LIBADD =           \
        $(GNURADIO_CORE_LA)     \
        -lstdc++                \
        $(QT_LIBS)
 
-qtgui.cc qtgui.py: $(ALL_IFILES)
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module qtgui \
-               -o qtgui.cc $(LOCAL_IFILES)
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
-# These swig headers get installed in ${prefix}/include/gnuradio/swig
-swiginclude_HEADERS =                  \
-       $(LOCAL_IFILES)
-
-
 MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc
 
 # Don't distribute output of swig

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-radio-astronomy/src/lib/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gr-radio-astronomy/src/lib/Makefile.am
       2009-02-10 23:30:55 UTC (rev 10434)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gr-radio-astronomy/src/lib/Makefile.am
       2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 # Install this stuff so that it ends up as the gnuradio.ra module
 # This usually ends up at:
@@ -30,55 +31,40 @@
 
 AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 \
-       $(NON_LOCAL_IFILES)             
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =          \
+       $(srcdir)/ra.i
 
-NON_LOCAL_IFILES =                     \
-       $(GNURADIO_I)
-
-LOCAL_IFILES =                                 \
-       $(srcdir)/ra.i                          
-
 # These files are built by SWIG.  The first is the C++ glue.
 # The second is the python wrapper that loads the _howto shared library
 # and knows how to call our extensions.
 
 BUILT_SOURCES =                \
        ra.cc                   \
-       ra.py                           
+       ra.py
 
 # This gets ra.py installed in the right place
-ourpython_PYTHON =                     \
+ourpython_PYTHON =             \
        ra.py
 
 ourlib_LTLIBRARIES = _ra.la
 
 # These are the source files that go into the shared library
 _ra_la_SOURCES =               \
-       ra.cc                   
+       ra.cc
 
 # magic flags
-_ra_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+_ra_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
 
 # link the library against some comon swig runtime code and the 
 # c++ standard library
-_ra_la_LIBADD =                \
-       $(PYTHON_LDFLAGS)       \
-       $(GNURADIO_CORE_LA)     \
-       -lstdc++                        
+_ra_la_LIBADD = $(STD_SWIG_LA_LIB_ADD)                 
 
-ra.cc ra.py: $(ALL_IFILES)
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module ra -o ra.cc $(LOCAL_IFILES)
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
-# These headers get installed in ${prefix}/include/gnuradio
-grinclude_HEADERS =
-
-# These swig headers get installed in ${prefix}/include/gnuradio/swig
-swiginclude_HEADERS =                  \
-       $(LOCAL_IFILES)
-
-
 MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc
 
 # Don't distribute output of swig

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-trellis/src/lib/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/gr-trellis/src/lib/Makefile.am   
    2009-02-10 23:30:55 UTC (rev 10434)
+++ 
gnuradio/branches/developers/michaelld/am_swig/gr-trellis/src/lib/Makefile.am   
    2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 # Install this stuff so that it ends up as the gnuradio.trellis module
 # This usually ends up at:
@@ -96,21 +97,21 @@
        $(GENERATED_CC)         \
        $(swig_built_sources)   
 
-ALL_IFILES =                   \
-       $(LOCAL_IFILES)         \
-       $(NON_LOCAL_IFILES)     
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                          \
+       $(srcdir)/trellis.i                     \
+       $(GENERATED_I)                          \
+       $(srcdir)/fsm.i                         \
+       $(srcdir)/interleaver.i                 \
+       $(srcdir)/trellis_permutation.i         \
+       $(srcdir)/trellis_siso_f.i              \
+       $(srcdir)/trellis_siso_combined_f.i     \
+       $(srcdir)/trellis_generated.i
 
-NON_LOCAL_IFILES =             \
-       $(GNURADIO_I)   
-
-LOCAL_IFILES =                         \
-       $(srcdir)/trellis.i                     
-
 EXTRA_DIST =                   \
        $(CODE_GENERATOR)       \
        $(STAMPS)
 
-
 # This gets trellis.py installed in the right place
 ourpython_PYTHON =             \
        trellis.py
@@ -131,20 +132,18 @@
        $(GENERATED_CC)                 
 
 # magic flags
-_trellis_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+_trellis_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
 
 # link the library against some comon swig runtime code and the 
 # c++ standard library
-_trellis_la_LIBADD =                   \
-       $(PYTHON_LDFLAGS)               \
-       $(GNURADIO_CORE_LA)             \
-       -lstdc++
+_trellis_la_LIBADD = $(STD_SWIG_LA_LIB_ADD)
 
 _trellis_la_CXXFLAGS = @swig_CXXFLAGS@
 
-trellis.cc trellis.py: $(ALL_IFILES) $(grinclude_HEADERS)
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module trellis \
-               -o trellis.cc $(LOCAL_IFILES)
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
 # These headers get installed in ${prefix}/include/gnuradio
 grinclude_HEADERS =                    \
@@ -160,17 +159,6 @@
        trellis_siso_combined_f.h       \
        $(GENERATED_H)
 
-# These swig headers get installed in ${prefix}/include/gnuradio/swig
-swiginclude_HEADERS =                  \
-       $(LOCAL_IFILES)                 \
-       $(GENERATED_I)                  \
-       fsm.i                           \
-       interleaver.i                   \
-       trellis_permutation.i           \
-       trellis_siso_f.i                \
-       trellis_siso_combined_f.i       \
-       trellis_generated.i
-
 CLEANFILES = $(BUILT_SOURCES) $(STAMPS) *.pyc
 
 # Don't distribute output of swig

Modified: gnuradio/branches/developers/michaelld/am_swig/gr-usrp/src/Makefile.am
===================================================================
--- gnuradio/branches/developers/michaelld/am_swig/gr-usrp/src/Makefile.am      
2009-02-10 23:30:55 UTC (rev 10434)
+++ gnuradio/branches/developers/michaelld/am_swig/gr-usrp/src/Makefile.am      
2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 # ----------------------------------------------------------------
 # The straight C++ library
@@ -71,8 +72,9 @@
        usrp_swig.cc \
        usrp_swig.py            
 
-LOCAL_IFILES = \
-       $(srcdir)/usrp.i \
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS = \
+       $(srcdir)/usrp_swig.i \
        $(srcdir)/usrp_base.i \
        $(srcdir)/usrp_source_base.i \
        $(srcdir)/usrp_source_c.i \
@@ -82,13 +84,6 @@
        $(srcdir)/usrp_sink_s.i \
        $(srcdir)/usrp_standard.i
 
-NON_LOCAL_IFILES = \
-       $(GNURADIO_I)
-
-ALL_IFILES = \
-       $(LOCAL_IFILES) \
-       $(NON_LOCAL_IFILES)             
-
 ourlib_LTLIBRARIES = \
        _usrp_swig.la
 
@@ -103,23 +98,21 @@
        $(PYTHON_LDFLAGS) \
        libgnuradio-usrp.la
 
-_usrp_swig_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+_usrp_swig_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
 
 _usrp_swig_la_CXXFLAGS = @swig_CXXFLAGS@
 
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
+
 # Special swig arguments
 LOCAL_SWIG_DEFINES_AND_INCLUDES = $(USRP_INCLUDES)
 
-usrp_swig.cc usrp_swig.py: $(ALL_IFILES)
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module usrp_swig \
-               -o usrp_swig.cc $(srcdir)/usrp.i
-
 noinst_PYTHON =        \
        qa_usrp.py                      
 
-swiginclude_HEADERS = \
-       $(LOCAL_IFILES)
-
 # Don't distribute output of swig
 dist-hook:
        @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done

Deleted: gnuradio/branches/developers/michaelld/am_swig/gr-usrp/src/usrp.i

Added: gnuradio/branches/developers/michaelld/am_swig/gr-usrp/src/usrp_swig.i
===================================================================
--- gnuradio/branches/developers/michaelld/am_swig/gr-usrp/src/usrp_swig.i      
                        (rev 0)
+++ gnuradio/branches/developers/michaelld/am_swig/gr-usrp/src/usrp_swig.i      
2009-02-11 03:27:14 UTC (rev 10435)
@@ -0,0 +1,139 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008,2009 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.
+ */
+
+%include "gnuradio.i"  // the common stuff
+
+%{
+#include <vector>
+%}
+
+%include <usrp_subdev_spec.h>
+%include <db_base.i>
+%include <fpga_regs_common.h>
+%include <fpga_regs_standard.h>
+%include "usrp_standard.i"
+%include "usrp_base.i"
+%include "usrp_source_base.i"
+%include "usrp_source_c.i"
+%include "usrp_source_s.i"
+%include "usrp_sink_base.i"
+%include "usrp_sink_c.i"
+%include "usrp_sink_s.i"
+
+//---Allow a more Pythonic interface
+%pythoncode %{
+
+# Allow subdev_spec to be tuple
+def __selected_subdev(self, subdev_spec):
+  ss = usrp_subdev_spec(subdev_spec[0], subdev_spec[1])
+  return self._real_selected_subdev(ss)
+
+# Allow subdev_spec to be tuple
+def __determine_tx_mux_value(self, subdev_spec):
+    ss = usrp_subdev_spec(subdev_spec[0], subdev_spec[1])
+    return self._real_determine_tx_mux_value(ss)
+
+# Allow subdev_spec to be tuple
+def __determine_rx_mux_value(self, subdev_spec):
+    ss = usrp_subdev_spec(subdev_spec[0], subdev_spec[1])
+    return self._real_determine_rx_mux_value(ss)
+
+# Allow subdev_spec to be tuple
+def __pick_subdev(self, candidates=[]):
+    ss = self._real_pick_subdev(candidates)
+    return (ss.side, ss.subdev)
+
+# Allow subdev_spec to be tuple
+def __pick_tx_subdevice(self):
+    ss = self._real_pick_tx_subdevice()
+    return (ss.side, ss.subdev)
+
+# Allow subdev_spec to be tuple
+def __pick_rx_subdevice(self):
+    ss = self._real_pick_rx_subdevice()
+    return (ss.side, ss.subdev)
+
+# Make return tune_result or None on failure
+def __tune(self, chan, db, target_freq):
+    tr = usrp_tune_result()
+    r = self._real_tune(chan, db, target_freq, tr)
+    if r:
+        return tr
+    else:
+        return None
+
+# Allow to be called as a free function
+def tune(u, chan, subdev, target_freq):
+    return u.tune(chan, subdev, target_freq)
+
+# Allow to be called as free function
+def determine_tx_mux_value(u, subdev_spec):
+    return u.determine_tx_mux_value(subdev_spec)
+
+# Allow to be called as free function
+def determine_rx_mux_value(u, subdev_spec):
+    return u.determine_rx_mux_value(subdev_spec)
+
+# Allow to be called as free function
+def selected_subdev(u, subdev_spec):
+    return u.selected_subdev(subdev_spec)
+
+# Allow to be called as free function
+def pick_subdev(u, candidates=[]):
+    return u.pick_subdev(candidates);
+
+# Allow to be called as free function
+def pick_tx_subdevice(u):
+    return u.pick_tx_subdevice();
+
+# Allow to be called as free function
+def pick_rx_subdevice(u):
+    return u.pick_rx_subdevice();
+
+# Jam into Python objects
+usrp_sink_c_sptr.determine_tx_mux_value   = __determine_tx_mux_value
+usrp_sink_s_sptr.determine_tx_mux_value   = __determine_tx_mux_value
+
+usrp_source_c_sptr.determine_rx_mux_value = __determine_rx_mux_value
+usrp_source_s_sptr.determine_rx_mux_value = __determine_rx_mux_value
+
+usrp_sink_c_sptr.selected_subdev          = __selected_subdev
+usrp_sink_s_sptr.selected_subdev          = __selected_subdev
+usrp_source_c_sptr.selected_subdev        = __selected_subdev
+usrp_source_s_sptr.selected_subdev        = __selected_subdev
+
+usrp_sink_c_sptr.tune                     = __tune
+usrp_sink_s_sptr.tune                     = __tune
+usrp_source_c_sptr.tune                   = __tune
+usrp_source_s_sptr.tune                   = __tune
+
+usrp_sink_c_sptr.pick_subdev              = __pick_subdev
+usrp_sink_s_sptr.pick_subdev              = __pick_subdev
+usrp_source_c_sptr.pick_subdev            = __pick_subdev
+usrp_source_s_sptr.pick_subdev            = __pick_subdev
+
+usrp_sink_c_sptr.pick_tx_subdevice        = __pick_tx_subdevice
+usrp_sink_s_sptr.pick_tx_subdevice        = __pick_tx_subdevice
+usrp_source_c_sptr.pick_rx_subdevice      = __pick_rx_subdevice
+usrp_source_s_sptr.pick_rx_subdevice      = __pick_rx_subdevice
+
+%}

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-usrp2/src/Makefile.am
===================================================================
--- gnuradio/branches/developers/michaelld/am_swig/gr-usrp2/src/Makefile.am     
2009-02-10 23:30:55 UTC (rev 10434)
+++ gnuradio/branches/developers/michaelld/am_swig/gr-usrp2/src/Makefile.am     
2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 # ----------------------------------------------------------------------
 # C++ block API interface librar(ies)
@@ -74,14 +75,10 @@
 ourpythondir = $(grpythondir)
 ourlibdir    = $(grpyexecdir)
 
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
 # SWIG interface files
-LOCAL_IFILES = $(srcdir)/usrp2.i
-NON_LOCAL_IFILES = $(GNURADIO_I)
-ALL_IFILES = $(LOCAL_IFILES) $(NON_LOCAL_IFILES)               
+swiginclude_HEADERS = $(srcdir)/usrp2.i
 
-# Install the SWIG interface files
-swiginclude_HEADERS = $(LOCAL_IFILES)
-
 # Generated by SWIG wrapper generator
 BUILT_SOURCES = usrp2.cc usrp2.py                      
 
@@ -91,25 +88,23 @@
 # Special swig arguments
 LOCAL_SWIG_DEFINES_AND_INCLUDES = $(USRP2_INCLUDES)
 
-# Invoke SWIG wrapper generator
-usrp2.cc usrp2.py: $(ALL_IFILES)
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module usrp2 \
-               -o usrp2.cc $(LOCAL_IFILES)
-
 # Create the Python shared library
 ourlib_LTLIBRARIES = _usrp2.la
 _usrp2_la_SOURCES = usrp2.cc
 _usrp2_la_CXXFLAGS = @swig_CXXFLAGS@
-_usrp2_la_LDFLAGS = $(swig_CXXFLAGS) $(NO_UNDEFINED) -module -avoid-version
+_usrp2_la_LDFLAGS = $(swig_CXXFLAGS) $(STD_SWIG_LA_LD_FLAGS)
 
 # Link the library as needed
 _usrp2_la_LIBADD = \
-       $(PYTHON_LDFLAGS) \
        libgr-usrp2.la \
-       $(GNURADIO_CORE_LA) \
        $(USRP2_LIBS) \
-       -lstdc++
+       $(STD_SWIG_LA_LIB_ADD)
 
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
+
 # Don't distribute output of swig
 dist-hook:
        @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done
@@ -123,7 +118,6 @@
 
 noinst_PYTHON = qa_usrp2.py                    
 
-
 # ----------------------------------------------------------------------
 # Miscellaneous build operations
 # ----------------------------------------------------------------------

Modified: 
gnuradio/branches/developers/michaelld/am_swig/gr-video-sdl/src/Makefile.am
===================================================================
--- gnuradio/branches/developers/michaelld/am_swig/gr-video-sdl/src/Makefile.am 
2009-02-10 23:30:55 UTC (rev 10434)
+++ gnuradio/branches/developers/michaelld/am_swig/gr-video-sdl/src/Makefile.am 
2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,6 +20,7 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 # Install this stuff so that it ends up as the gnuradio.video_sdl module
 # This usually ends up at:
@@ -31,16 +32,10 @@
 EXTRA_DIST = run_tests.in
 TESTS = run_tests
 
-LOCAL_IFILES =                                 \
-       $(top_srcdir)/gr-video-sdl/src/video_sdl.i                              
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                  \
+       $(srcdir)/video_sdl.i
 
-NON_LOCAL_IFILES =                     \
-       $(GNURADIO_I)
-
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 \
-       $(NON_LOCAL_IFILES)             
-
 BUILT_SOURCES =                        \
        video_sdl.cc                    \
        video_sdl.py                            
@@ -58,25 +53,20 @@
        video_sdl_sink_uc.cc            \
        video_sdl_sink_s.cc
 
-
 grinclude_HEADERS =                    \
        video_sdl_sink_uc.h             \
        video_sdl_sink_s.h
 
-swiginclude_HEADERS =                  \
-       $(LOCAL_IFILES)
-
 _video_sdl_la_LIBADD =                         \
-       $(PYTHON_LDFLAGS)               \
-       $(GNURADIO_CORE_LA)             \
         $(SDL_LIBS)                    \
-       -lstdc++                                
+       $(STD_SWIG_LA_LIB_ADD)
 
-_video_sdl_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+_video_sdl_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
 
-video_sdl.cc video_sdl.py: $(ALL_IFILES)
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module video_sdl \
-               -o video_sdl.cc $(LOCAL_IFILES)
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
 noinst_PYTHON = qa_video_sdl.py
 

Modified: 
gnuradio/branches/developers/michaelld/am_swig/usrp/host/lib/legacy/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/michaelld/am_swig/usrp/host/lib/legacy/Makefile.am 
    2009-02-10 23:30:55 UTC (rev 10434)
+++ 
gnuradio/branches/developers/michaelld/am_swig/usrp/host/lib/legacy/Makefile.am 
    2009-02-11 03:27:14 UTC (rev 10435)
@@ -187,6 +187,7 @@
 usrp_dbid.py usrp_dbid.h usrp_dbid.cc: gen_usrp_dbid.py usrp_dbid.dat
        PYTHONPATH=$(top_srcdir)/usrp/src srcdir=$(srcdir) $(PYTHON) 
$(srcdir)/gen_usrp_dbid.py $(srcdir)/usrp_dbid.dat
 
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
 swiginclude_HEADERS = db_base.i
 
 MOSTLYCLEANFILES = \

Modified: 
gnuradio/branches/developers/michaelld/am_swig/usrp/host/swig/Makefile.am
===================================================================
--- gnuradio/branches/developers/michaelld/am_swig/usrp/host/swig/Makefile.am   
2009-02-10 23:30:55 UTC (rev 10434)
+++ gnuradio/branches/developers/michaelld/am_swig/usrp/host/swig/Makefile.am   
2009-02-11 03:27:14 UTC (rev 10435)
@@ -20,37 +20,31 @@
 # 
 
 include $(top_srcdir)/Makefile.common
+include $(top_srcdir)/Makefile.swig
 
 ourpythondir = $(usrppythondir)
 ourlibdir    = $(usrppyexecdir)
 
-
 AM_CPPFLAGS = $(USRP_INCLUDES)                 \
           $(PYTHON_CPPFLAGS)           \
           -I$(srcdir)                  \
           $(WITH_INCLUDES)
 
-LOCAL_IFILES =                         \
-       prims.i
+# These swig headers get installed in ${prefix}/include/gnuradio/swig
+swiginclude_HEADERS =                  \
+       $(srcdir)/usrp_prims.i
 
-
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 
-
-
 EXTRA_DIST =                           \
-       $(LOCAL_IFILES)
+       $(swiginclude_HEADERS)
 
-
 BUILT_SOURCES =                                \
-       prims.cc                        \
+       usrp_prims.cc                   \
        usrp_prims.py
 
-
 ourpython_PYTHON =                     \
        __init__.py                     \
        usrp_fpga_regs.py               \
-       usrp_prims.py                   
+       usrp_prims.py
 
 # special SWIG flags
 LOCAL_SWIG_DEFINES_AND_INCLUDES = $(USRP_INCLUDES)
@@ -59,25 +53,21 @@
        _usrp_prims.la
 
 _usrp_prims_la_SOURCES =               \
-       prims.cc                
+       usrp_prims.cc           
 
-
-noinst_HEADERS =
-
 _usrp_prims_la_LIBADD  = $(USRP_LA) -lstdc++ $(PYTHON_LDFLAGS)
-_usrp_prims_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
-
+_usrp_prims_la_LDFLAGS = $(STD_SWIG_LA_LD_FLAGS)
 _usrp_prims_la_CXXFLAGS = @swig_CXXFLAGS@
 
-prims.cc usrp_prims.py : $(srcdir)/prims.i 
../../firmware/include/fpga_regs_common.h 
../../firmware/include/fpga_regs_standard.h
-       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module usrp_prims \
-               -o prims.cc $(srcdir)/prims.i
+# KLUDGE: Force runtime include of SWIG dependency files.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
address@hidden@ @address@hidden/$(DEPDIR)/address@hidden@
 
 MOSTLYCLEANFILES = \
-       prims.cc usrp_prims.py *~ *.pyc
+       $(BUILT_SOURCES) *~ *.pyc
 
 # Don't distribute output of swig
 dist-hook:
        @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done
        @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
-

Deleted: gnuradio/branches/developers/michaelld/am_swig/usrp/host/swig/prims.i

Added: 
gnuradio/branches/developers/michaelld/am_swig/usrp/host/swig/usrp_prims.i
===================================================================
--- gnuradio/branches/developers/michaelld/am_swig/usrp/host/swig/usrp_prims.i  
                        (rev 0)
+++ gnuradio/branches/developers/michaelld/am_swig/usrp/host/swig/usrp_prims.i  
2009-02-11 03:27:14 UTC (rev 10435)
@@ -0,0 +1,266 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2003,2004 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.
+ */
+
+/*
+ * Low level primitives for directly messing with USRP hardware.
+ *
+ * If you're trying to use the USRP, you'll probably want to take a
+ * look at the usrp_standard_rx and usrp_standard_tx classes.  They
+ * hide a bunch of low level details and provide high performance
+ * streaming i/o.
+ *
+ * This interface is built on top of libusb, which allegedly works under
+ * Linux, *BSD and Mac OS/X.  http://libusb.sourceforge.net
+ */
+
+%include <stl.i>       // pick up string stuff
+
+
+%{
+#include <usrp_prims.h>
+%}
+
+
+enum usrp_load_status_t { ULS_ERROR = 0, ULS_OK, ULS_ALREADY_LOADED };
+
+struct usb_dev_handle;
+struct usb_device;
+
+/*!
+ * \brief initialize libusb; probe busses and devices.
+ * Safe to call more than once.
+ */
+void usrp_one_time_init ();
+
+void usrp_rescan ();
+
+/*!
+ * \brief locate Nth (zero based) USRP device in system.
+ * Return pointer or 0 if not found.
+ *
+ * The following kinds of devices are considered USRPs:
+ *
+ *   unconfigured USRP (no firwmare loaded)
+ *   configured USRP (firmware loaded)
+ *   unconfigured Cypress FX2 (only if fx2_ok_p is true)
+ */
+struct usb_device *usrp_find_device (int nth, bool fx2_ok_p = false);
+
+bool usrp_usrp_p (struct usb_device *q);               //< is this a USRP
+bool usrp_usrp0_p (struct usb_device *q);              //< is this a USRP Rev 0
+bool usrp_usrp1_p (struct usb_device *q);              //< is this a USRP Rev 1
+bool usrp_usrp2_p (struct usb_device *q);              //< is this a USRP Rev 2
+int  usrp_hw_rev (struct usb_device *q);               //< return h/w rev code
+bool usrp_fx2_p (struct usb_device *q);                        //< is this an 
unconfigured Cypress FX2
+
+bool usrp_unconfigured_usrp_p (struct usb_device *q);  //< some kind of 
unconfigured USRP
+bool usrp_configured_usrp_p (struct usb_device *q);    //< some kind of 
configured USRP
+
+/*!
+ * \brief given a usb_device return an instance of the appropriate 
usb_dev_handle
+ *
+ * These routines claim the specified interface and select the
+ * correct alternate interface.  (USB nomenclature is totally screwed!)
+ *
+ * If interface can't be opened, or is already claimed by some other
+ * process, 0 is returned.
+ */
+struct usb_dev_handle *usrp_open_cmd_interface (struct usb_device *dev);
+struct usb_dev_handle *usrp_open_rx_interface (struct usb_device *dev);
+struct usb_dev_handle *usrp_open_tx_interface (struct usb_device *dev);
+
+/*!
+ * \brief close interface.
+ */
+bool usrp_close_interface (struct usb_dev_handle *udh);
+
+/*!
+ * \brief load intel hex format file into USRP/Cypress FX2 (8051).
+ *
+ * The filename extension is typically *.ihx
+ *
+ * Note that loading firmware may cause the device to renumerate.  I.e.,
+ * change its configuration, invalidating the current device handle.
+ */
+
+usrp_load_status_t 
+usrp_load_firmware (struct usb_dev_handle *udh, const char *filename, bool 
force);
+
+/*!
+ * \brief load intel hex format file into USRP FX2 (8051).
+ *
+ * The filename extension is typically *.ihx
+ *
+ * Note that loading firmware may cause the device to renumerate.  I.e.,
+ * change its configuration, invalidating the current device handle.
+ * If the result is ULS_OK, usrp_load_firmware_nth delays 1 second
+ * then rescans the busses and devices.
+ */
+usrp_load_status_t
+usrp_load_firmware_nth (int nth, const char *filename, bool force);
+
+/*!
+ * \brief load fpga configuration bitstream
+ */
+usrp_load_status_t
+usrp_load_fpga (struct usb_dev_handle *udh, const char *filename, bool force);
+
+/*!
+ * \brief load the regular firmware and fpga bitstream in the Nth USRP.
+ *
+ * This is the normal starting point...
+ */
+bool usrp_load_standard_bits (int nth, bool force);
+
+
+%include <fpga_regs_common.h>
+%include <fpga_regs_standard.h>
+
+
+bool usrp_write_fpga_reg (struct usb_dev_handle *udh, int reg, int value);
+
+%inline %{
+
+int 
+usrp_read_fpga_reg (struct usb_dev_handle *udh, int reg)
+{
+  int value;
+  bool ok = usrp_read_fpga_reg (udh, reg, &value);
+  if (ok)
+    return value;
+  else
+    return -999;
+}
+
+%}
+
+bool usrp_set_fpga_reset (struct usb_dev_handle *udh, bool on);
+bool usrp_set_fpga_tx_enable (struct usb_dev_handle *udh, bool on);
+bool usrp_set_fpga_rx_enable (struct usb_dev_handle *udh, bool on);
+bool usrp_set_fpga_tx_reset (struct usb_dev_handle *udh, bool on);
+bool usrp_set_fpga_rx_reset (struct usb_dev_handle *udh, bool on);
+bool usrp_set_led (struct usb_dev_handle *udh, int which, bool on);
+
+bool usrp_check_rx_overrun (struct usb_dev_handle *udh, bool *overrun_p);
+bool usrp_check_tx_underrun (struct usb_dev_handle *udh, bool *underrun_p);
+
+// i2c_read and i2c_write are limited to a maximum len of 64 bytes.
+
+bool usrp_i2c_write (struct usb_dev_handle *udh, int i2c_addr,
+                    void *buf, int len);
+
+bool usrp_i2c_read (struct usb_dev_handle *udh, int i2c_addr,
+                   void *buf, int len);
+
+// spi_read and spi_write are limited to a maximum of 64 bytes
+// See usrp_spi_defs.h for more info
+
+bool usrp_spi_write (struct usb_dev_handle *udh,
+                    int optional_header, int enables, int format,
+                    unsigned char *buf, int len);
+
+bool usrp_spi_read (struct usb_dev_handle *udh,
+                    int optional_header, int enables, int format,
+                    unsigned char *buf, int len);
+
+
+bool usrp_9862_write (struct usb_dev_handle *udh,
+                     int which_codec,                  // [0,  1]
+                     int regno,                        // [0, 63]
+                     int value);                       // [0, 255]     
+
+%inline %{
+
+int 
+usrp_9862_read (struct usb_dev_handle *udh, int which_codec, int reg)
+{
+  unsigned char value;
+  bool ok = usrp_9862_read (udh, which_codec, reg, &value);
+  if (ok)
+    return value;
+  else
+    return -999;
+}
+
+%}
+
+%inline %{
+
+bool 
+usrp_eeprom_write (struct usb_dev_handle *udh, int i2c_addr,
+                  int eeprom_offset, const std::string buf)
+{
+  return usrp_eeprom_write (udh, i2c_addr, eeprom_offset,
+                           buf.data (), buf.size ());
+}
+  
+std::string
+usrp_eeprom_read (struct usb_dev_handle *udh, int i2c_addr,
+                 int eeprom_offset, int len)
+{
+  if (len <= 0)
+    return "";
+  
+  char buf[len];
+
+  if (!usrp_eeprom_read (udh, i2c_addr, eeprom_offset, buf, len))
+    return "";
+
+  return std::string (buf, len);
+}
+
+%}
+
+bool usrp_write_aux_dac (struct usb_dev_handle *uhd, int slot,
+                        int which_dac, int value);
+
+%inline %{
+
+int usrp_read_aux_adc (struct usb_dev_handle *udh, int slot, int which_adc)
+{
+  int value;
+  bool ok = usrp_read_aux_adc (udh, slot, which_adc, &value);
+  if (ok)
+    return value;
+  else
+    return -999;
+}
+
+%}
+
+/*!
+ * \brief return a usrp's serial number.
+ *
+ * Note that this only works on a configured usrp.
+ * \returns non-zero length string iff successful.
+ */
+std::string usrp_serial_number(struct usb_dev_handle *udh);
+
+/*!
+ * \brief usrp daughterboard id to name mapping
+ */
+const std::string usrp_dbid_to_string (int dbid);
+
+%inline %{
+#include "../../firmware/include/fpga_regs_common.h"
+#include "../../firmware/include/fpga_regs_standard.h"
+%}





reply via email to

[Prev in Thread] Current Thread [Next in Thread]