2 # Copyright 2001,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
4 # This file is part of GNU Radio
6 # GNU Radio is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option)
11 # GNU Radio is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with GNU Radio; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 51 Franklin Street,
19 # Boston, MA 02110-1301, USA.
22 include $(top_srcdir)/Makefile.common
25 AM_CPPFLAGS = -I$(srcdir) $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \
28 EXTRA_DIST = gen-swig-bug-fix
30 # SWIG headers get installed in ${prefix}/include/gnuradio/swig
31 swiginclude_HEADERS = \
33 gr_swig_block_magic.i \
36 # special install for this top-level Python script which includes all
37 # of the split Python libraries.
38 ourpythondir = $(grpythondir)/gr
39 ourpython_PYTHON = gnuradio_swig_python.py
41 # ----------------------------------------------------------------
42 # FIXME As of swig 1.3.31, this still seems to be required...
44 gnuradio_swig_bug_workaround.h : gnuradio_swig_py_runtime.cc $(srcdir)/gen-swig-bug-fix
45 $(PYTHON) $(srcdir)/gen-swig-bug-fix gnuradio_swig_py_runtime.cc $@
47 # C/C++ headers get installed in ${prefix}/include/gnuradio
49 gnuradio_swig_bug_workaround.h
51 # ----------------------------------------------------------------
52 # We've split the previously monstrous gnuradio_swig_python into 6
53 # smaller pieces. This reduces compile time coupling and creates
54 # smaller pieces for the compiler to digest. prior to this change, on
55 # X86_64, g++'s resident set size was 650MB!
56 # ----------------------------------------------------------------
59 gnuradio_swig_py_runtime.i \
60 gnuradio_swig_py_general.i \
61 gnuradio_swig_py_gengen.i \
62 gnuradio_swig_py_filter.i \
63 gnuradio_swig_py_io.i \
64 gnuradio_swig_py_hier.i
66 # Install so that they end up available as:
69 # ${prefix}/lib/python${python_version}/site-packages/gnuradio/gr
70 gnuradio_swig_py_runtime_pythondir_category = gnuradio/gr
71 gnuradio_swig_py_general_pythondir_category = gnuradio/gr
72 gnuradio_swig_py_gengen_pythondir_category = gnuradio/gr
73 gnuradio_swig_py_filter_pythondir_category = gnuradio/gr
74 gnuradio_swig_py_io_pythondir_category = gnuradio/gr
75 gnuradio_swig_py_hier_pythondir_category = gnuradio/gr
77 # additional libraries for linking with each SWIG-generated library
78 gnuradio_swig_py_runtime_la_swig_libadd = $(GNURADIO_CORE_LA)
79 gnuradio_swig_py_general_la_swig_libadd = $(GNURADIO_CORE_LA)
80 gnuradio_swig_py_gengen_la_swig_libadd = $(GNURADIO_CORE_LA)
81 gnuradio_swig_py_filter_la_swig_libadd = $(GNURADIO_CORE_LA)
82 gnuradio_swig_py_io_la_swig_libadd = $(GNURADIO_CORE_LA)
83 gnuradio_swig_py_hier_la_swig_libadd = $(GNURADIO_CORE_LA)
85 include $(top_srcdir)/Makefile.swig
87 # add some of the variables generated inside the Makefile.swig
89 # include the SWIG-generated .h files in the BUILT SOURCES, since they
90 # aren't by default when using Makefile.swig; order doesn't matter.
92 gnuradio_swig_py_runtime.h \
93 gnuradio_swig_py_general.h \
94 gnuradio_swig_py_gengen.h \
95 gnuradio_swig_py_filter.h \
96 gnuradio_swig_py_io.h \
97 gnuradio_swig_py_hier.h \
98 $(grinclude_HEADERS) \
101 # Do not distribute the output of SWIG
102 no_dist_files = $(swig_built_sources)