summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/swig
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-core/src/lib/swig')
-rw-r--r--gnuradio-core/src/lib/swig/CMakeLists.txt93
-rw-r--r--gnuradio-core/src/lib/swig/Makefile.am2
-rw-r--r--gnuradio-core/src/lib/swig/Makefile.swig.gen12
-rw-r--r--gnuradio-core/src/lib/swig/gnuradio_core_general.i2
4 files changed, 102 insertions, 7 deletions
diff --git a/gnuradio-core/src/lib/swig/CMakeLists.txt b/gnuradio-core/src/lib/swig/CMakeLists.txt
new file mode 100644
index 000000000..b10b7c186
--- /dev/null
+++ b/gnuradio-core/src/lib/swig/CMakeLists.txt
@@ -0,0 +1,93 @@
+# Copyright 2010-2011 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+########################################################################
+include(GrPython)
+include(GrSwig)
+
+include_directories(${Boost_INCLUDE_DIRS})
+link_directories(${Boost_LIBRARY_DIRS})
+
+set(GR_SWIG_INCLUDE_DIRS
+ ${Boost_INCLUDE_DIRS}
+ ${GSL_INCLUDE_DIRS}
+ ${GRUEL_INCLUDE_DIRS}
+ ${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+set(GR_SWIG_LIBRARIES gnuradio-core)
+
+########################################################################
+# Build and install the swig targets
+########################################################################
+# ----------------------------------------------------------------
+# We've split the previously monstrous gnuradio_corethon into 6
+# 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!
+# ----------------------------------------------------------------
+
+set(GR_SWIG_TARGET_DEPS gengen_generated gengen_generated_index filter_generated)
+
+GR_SWIG_MAKE(gnuradio_core_runtime gnuradio_core_runtime.i)
+GR_SWIG_MAKE(gnuradio_core_general gnuradio_core_general.i)
+GR_SWIG_MAKE(gnuradio_core_gengen gnuradio_core_gengen.i)
+GR_SWIG_MAKE(gnuradio_core_filter gnuradio_core_filter.i)
+GR_SWIG_MAKE(gnuradio_core_io gnuradio_core_io.i)
+GR_SWIG_MAKE(gnuradio_core_hier gnuradio_core_hier.i)
+
+GR_SWIG_INSTALL(TARGETS
+ gnuradio_core_runtime
+ gnuradio_core_general
+ gnuradio_core_gengen
+ gnuradio_core_filter
+ gnuradio_core_io
+ gnuradio_core_hier
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/gr
+ COMPONENT "core_python"
+)
+
+########################################################################
+# Install various files
+########################################################################
+install(FILES
+ gnuradio.i
+ gr_swig_block_magic.i
+ gr_shared_ptr.i
+ gnuradio_core_runtime.i
+ gnuradio_core_general.i
+ gnuradio_core_gengen.i
+ gnuradio_core_filter.i
+ gnuradio_core_io.i
+ gnuradio_core_hier.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "core_swig"
+)
+
+GR_PYTHON_INSTALL(
+ FILES gnuradio_core.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/gr
+ COMPONENT "core_python"
+)
+
+install(
+ FILES ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio_swig_bug_workaround.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "core_swig"
+)
diff --git a/gnuradio-core/src/lib/swig/Makefile.am b/gnuradio-core/src/lib/swig/Makefile.am
index f8e7640ae..d304a2123 100644
--- a/gnuradio-core/src/lib/swig/Makefile.am
+++ b/gnuradio-core/src/lib/swig/Makefile.am
@@ -45,7 +45,7 @@ TOP_SWIG_IFILES = \
swiginclude_HEADERS = \
gnuradio.i \
gr_swig_block_magic.i \
- gr_shared_ptr.i
+ gr_shared_ptr.i
# SWIG headers that get installed in ${prefix}/include/gnuradio/swig/...
nobase_swiginclude_HEADERS = \
diff --git a/gnuradio-core/src/lib/swig/Makefile.swig.gen b/gnuradio-core/src/lib/swig/Makefile.swig.gen
index 0c3247565..cede68817 100644
--- a/gnuradio-core/src/lib/swig/Makefile.swig.gen
+++ b/gnuradio-core/src/lib/swig/Makefile.swig.gen
@@ -105,7 +105,7 @@ _gnuradio_core_runtime_la_CXXFLAGS = \
$(gnuradio_core_runtime_la_swig_cxxflags)
python/gnuradio_core_runtime.cc: gnuradio_core_runtime.py
-gnuradio_core_runtime.py: gnuradio_core_runtime.i
+gnuradio_core_runtime.py: gnuradio_core_runtime.i
# Include the python dependencies for this file
-include python/gnuradio_core_runtime.d
@@ -250,7 +250,7 @@ _gnuradio_core_general_la_CXXFLAGS = \
$(gnuradio_core_general_la_swig_cxxflags)
python/gnuradio_core_general.cc: gnuradio_core_general.py
-gnuradio_core_general.py: gnuradio_core_general.i
+gnuradio_core_general.py: gnuradio_core_general.i
# Include the python dependencies for this file
-include python/gnuradio_core_general.d
@@ -395,7 +395,7 @@ _gnuradio_core_gengen_la_CXXFLAGS = \
$(gnuradio_core_gengen_la_swig_cxxflags)
python/gnuradio_core_gengen.cc: gnuradio_core_gengen.py
-gnuradio_core_gengen.py: gnuradio_core_gengen.i
+gnuradio_core_gengen.py: gnuradio_core_gengen.i
# Include the python dependencies for this file
-include python/gnuradio_core_gengen.d
@@ -540,7 +540,7 @@ _gnuradio_core_filter_la_CXXFLAGS = \
$(gnuradio_core_filter_la_swig_cxxflags)
python/gnuradio_core_filter.cc: gnuradio_core_filter.py
-gnuradio_core_filter.py: gnuradio_core_filter.i
+gnuradio_core_filter.py: gnuradio_core_filter.i
# Include the python dependencies for this file
-include python/gnuradio_core_filter.d
@@ -685,7 +685,7 @@ _gnuradio_core_io_la_CXXFLAGS = \
$(gnuradio_core_io_la_swig_cxxflags)
python/gnuradio_core_io.cc: gnuradio_core_io.py
-gnuradio_core_io.py: gnuradio_core_io.i
+gnuradio_core_io.py: gnuradio_core_io.i
# Include the python dependencies for this file
-include python/gnuradio_core_io.d
@@ -830,7 +830,7 @@ _gnuradio_core_hier_la_CXXFLAGS = \
$(gnuradio_core_hier_la_swig_cxxflags)
python/gnuradio_core_hier.cc: gnuradio_core_hier.py
-gnuradio_core_hier.py: gnuradio_core_hier.i
+gnuradio_core_hier.py: gnuradio_core_hier.i
# Include the python dependencies for this file
-include python/gnuradio_core_hier.d
diff --git a/gnuradio-core/src/lib/swig/gnuradio_core_general.i b/gnuradio-core/src/lib/swig/gnuradio_core_general.i
index adf6b469a..b34d4f936 100644
--- a/gnuradio-core/src/lib/swig/gnuradio_core_general.i
+++ b/gnuradio-core/src/lib/swig/gnuradio_core_general.i
@@ -19,6 +19,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#define GR_CORE_API
+
#ifndef SWIGIMPORTED
%module(directors="1") gnuradio_core_general
#endif