242f27d9c0d7d9de79696ca4af39a3fc13f76ab2
[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 if PYTHON
25 AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) -I$(srcdir) \
26          $(WITH_INCLUDES)
27
28 EXTRA_DIST = gen-swig-bug-fix
29
30 # SWIG headers get installed in ${prefix}/include/gnuradio/swig
31 swiginclude_HEADERS =                   \
32         gnuradio.i                      \
33         gr_swig_block_magic.i           \
34         gr_shared_ptr.i
35
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
40
41 # ----------------------------------------------------------------
42 # FIXME As of swig 1.3.31, this still seems to be required...
43
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 $@
46
47 # C/C++ headers get installed in ${prefix}/include/gnuradio
48 grinclude_HEADERS =                     \
49         gnuradio_swig_bug_workaround.h
50
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 # ----------------------------------------------------------------
57
58 TOP_SWIG_IFILES =                       \
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
65
66 # Install so that they end up available as:
67 #   import gnuradio.gr
68 # This ends up at:
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
76
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)
84
85 include $(top_srcdir)/Makefile.swig
86
87 # add some of the variables generated inside the Makefile.swig
88
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.
91 BUILT_SOURCES =                         \
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)            \
99         $(swig_built_sources)
100
101 # Do not distribute the output of SWIG
102 no_dist_files = $(swig_built_sources)
103 endif