2 # Copyright 2001,2003,2004,2005,2006,2007,2008,2009 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
24 AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) -I$(srcdir) \
27 EXTRA_DIST = gen-swig-bug-fix
29 # SWIG headers get installed in ${prefix}/include/gnuradio/swig
30 swiginclude_HEADERS = \
32 gr_swig_block_magic.i \
35 # special install for this top-level Python script which includes all
36 # of the split Python libraries.
37 ourpythondir = $(grpythondir)/gr
38 ourpython_PYTHON = gnuradio_swig_python.py
40 # ----------------------------------------------------------------
41 # FIXME As of swig 1.3.31, this still seems to be required...
43 gnuradio_swig_bug_workaround.h : gnuradio_swig_py_runtime.cc $(srcdir)/gen-swig-bug-fix
44 $(PYTHON) $(srcdir)/gen-swig-bug-fix gnuradio_swig_py_runtime.cc $@
46 # C/C++ headers get installed in ${prefix}/include/gnuradio
48 gnuradio_swig_bug_workaround.h
50 # ----------------------------------------------------------------
51 # We've split the previously monstrous gnuradio_swig_python into 5
52 # smaller pieces. This reduces compile time coupling and creates
53 # smaller pieces for the compiler to digest. prior to this change, on
54 # X86_64, g++'s resident set size was 650MB!
55 # ----------------------------------------------------------------
58 gnuradio_swig_py_runtime.i \
59 gnuradio_swig_py_general.i \
60 gnuradio_swig_py_gengen.i \
61 gnuradio_swig_py_filter.i \
64 # Install so that they end up available as:
67 # ${prefix}/lib/python${python_version}/site-packages/gnuradio/gr
68 gnuradio_swig_py_runtime_pythondir_category = gnuradio/gr
69 gnuradio_swig_py_general_pythondir_category = gnuradio/gr
70 gnuradio_swig_py_gengen_pythondir_category = gnuradio/gr
71 gnuradio_swig_py_filter_pythondir_category = gnuradio/gr
72 gnuradio_swig_py_io_pythondir_category = gnuradio/gr
74 # additional libraries for linking with each SWIG-generated library
75 gnuradio_swig_py_runtime_la_swig_libadd = $(GNURADIO_CORE_LA)
76 gnuradio_swig_py_general_la_swig_libadd = $(GNURADIO_CORE_LA)
77 gnuradio_swig_py_gengen_la_swig_libadd = $(GNURADIO_CORE_LA)
78 gnuradio_swig_py_filter_la_swig_libadd = $(GNURADIO_CORE_LA)
79 gnuradio_swig_py_io_la_swig_libadd = $(GNURADIO_CORE_LA)
81 include $(top_srcdir)/Makefile.swig
83 # add some of the variables generated inside the Makefile.swig
85 # include the SWIG-generated .h files in the BUILT SOURCES, since they
86 # aren't by default when using Makefile.swig; order doesn't matter.
88 gnuradio_swig_py_runtime.h \
89 gnuradio_swig_py_general.h \
90 gnuradio_swig_py_gengen.h \
91 gnuradio_swig_py_filter.h \
92 gnuradio_swig_py_io.h \
93 $(grinclude_HEADERS) \
96 # Do not distribute the output of SWIG
97 no_dist_files = $(swig_built_sources)