diff options
Diffstat (limited to 'gnuradio-core/src/lib/swig')
-rw-r--r-- | gnuradio-core/src/lib/swig/CMakeLists.txt | 11 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gnuradio_core.py | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gnuradio_core_filter.i | 32 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gr_swig_block_magic.i | 8 |
4 files changed, 17 insertions, 36 deletions
diff --git a/gnuradio-core/src/lib/swig/CMakeLists.txt b/gnuradio-core/src/lib/swig/CMakeLists.txt index 2c89494e7..2132e2ca0 100644 --- a/gnuradio-core/src/lib/swig/CMakeLists.txt +++ b/gnuradio-core/src/lib/swig/CMakeLists.txt @@ -39,6 +39,12 @@ if(ENABLE_GR_LOG) SET(GR_SWIG_FLAGS "-DENABLE_GR_LOG") endif(ENABLE_GR_LOG) +if(ENABLE_GR_CTRLPORT) + list(APPEND GR_SWIG_FLAGS -DGR_CTRLPORT) + list(APPEND GR_SWIG_LIBRARIES ${ICE_LIBRARIES}) + list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR}) +endif(ENABLE_GR_CTRLPORT) + link_directories(${Boost_LIBRARY_DIRS}) ######################################################################## @@ -51,9 +57,10 @@ link_directories(${Boost_LIBRARY_DIRS}) # X86_64, g++'s resident set size was 650MB! # ---------------------------------------------------------------- -set(GR_SWIG_TARGET_DEPS general_generated gengen_generated filter_generated pmt_swig) +set(GR_SWIG_TARGET_DEPS gnuradio_core_generated_sources + general_generated gengen_generated filter_generated pmt_swig) -foreach(what runtime general gengen filter io hier) +foreach(what runtime general gengen io) SET(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/${what}_swig_doc.i) SET(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../${what} ${CMAKE_CURRENT_BINARY_DIR}/../${what}) GR_SWIG_MAKE(gnuradio_core_${what} gnuradio_core_${what}.i) diff --git a/gnuradio-core/src/lib/swig/gnuradio_core.py b/gnuradio-core/src/lib/swig/gnuradio_core.py index 23de74077..1fd558a11 100644 --- a/gnuradio-core/src/lib/swig/gnuradio_core.py +++ b/gnuradio-core/src/lib/swig/gnuradio_core.py @@ -23,6 +23,4 @@ from gnuradio_core_runtime import * from gnuradio_core_general import * from gnuradio_core_gengen import * -from gnuradio_core_filter import * from gnuradio_core_io import * -from gnuradio_core_hier import * diff --git a/gnuradio-core/src/lib/swig/gnuradio_core_filter.i b/gnuradio-core/src/lib/swig/gnuradio_core_filter.i deleted file mode 100644 index e9a44e54b..000000000 --- a/gnuradio-core/src/lib/swig/gnuradio_core_filter.i +++ /dev/null @@ -1,32 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006,2009,2010 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -%include "filter_swig_doc.i" - -#ifndef SWIGIMPORTED -%module(directors="1") gnuradio_core_filter -#endif - - //%feature("autodoc", "1"); // generate python docstrings - -%include "gnuradio.i" // the common stuff - -%include "filter.i" diff --git a/gnuradio-core/src/lib/swig/gr_swig_block_magic.i b/gnuradio-core/src/lib/swig/gr_swig_block_magic.i index 4016ae772..6d1af6136 100644 --- a/gnuradio-core/src/lib/swig/gr_swig_block_magic.i +++ b/gnuradio-core/src/lib/swig/gr_swig_block_magic.i @@ -48,3 +48,11 @@ BASE_NAME ## _sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), BASE_NAME = BASE_NAME.make; %} %enddef + +%define GR_SWIG_BLOCK_MAGIC_FACTORY(PKG, BASE_NAME, FACTORY) +%template(FACTORY ## _sptr) boost::shared_ptr<gr:: ## PKG ## :: ## BASE_NAME>; +%pythoncode %{ +FACTORY ## _sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), self.unique_id()) +FACTORY = BASE_NAME ## _make_ ## FACTORY; +%} +%enddef |