Merged r10554:10595 from michaelld/am_swig_4 into trunk. Major overhaul of SWIG...
[debian/gnuradio] / gnuradio-core / src / lib / swig / Makefile.am
1 #
2 # Copyright 2001,2003,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
3
4 # This file is part of GNU Radio
5
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)
9 # any later version.
10
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.
15
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.
20
21
22 include $(top_srcdir)/Makefile.common
23
24 AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) -I$(srcdir) \
25          $(WITH_INCLUDES)
26
27 EXTRA_DIST = gen-swig-bug-fix
28
29 # SWIG headers get installed in ${prefix}/include/gnuradio/swig
30 swiginclude_HEADERS =                   \
31         gnuradio.i                      \
32         gr_swig_block_magic.i           \
33         gr_shared_ptr.i
34
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
39
40 # ----------------------------------------------------------------
41 # FIXME As of swig 1.3.31, this still seems to be required...
42
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 $@
45
46 # C/C++ headers get installed in ${prefix}/include/gnuradio
47 grinclude_HEADERS =                     \
48         gnuradio_swig_bug_workaround.h
49
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 # ----------------------------------------------------------------
56
57 TOP_SWIG_IFILES =                       \
58         gnuradio_swig_py_runtime.i      \
59         gnuradio_swig_py_general.i      \
60         gnuradio_swig_py_gengen.i       \
61         gnuradio_swig_py_filter.i       \
62         gnuradio_swig_py_io.i
63
64 # Install so that they end up available as:
65 #   import gnuradio.gr
66 # This ends up at:
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
73
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)
80
81 include $(top_srcdir)/Makefile.swig
82
83 # add some of the variables generated inside the Makefile.swig
84
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.
87 BUILT_SOURCES =                         \
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)            \
94         $(swig_built_sources)
95
96 # Do not distribute the output of SWIG
97 no_dist_files = $(swig_built_sources)