Houston, we have a trunk.
[debian/gnuradio] / gr-error-correcting-codes / src / lib / Makefile.am
1 #
2 # Copyright 2006 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 2, 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., 59 Temple Place - Suite 330,
19 # Boston, MA 02111-1307, USA.
20
21
22 include $(top_srcdir)/Makefile.common
23
24 SUBDIRS = libecc
25
26 LIBS += $(GNURADIO_CORE_LIBS)
27
28 # Install this stuff so that it ends up as the gnuradio.und module
29 # This usually ends up at:
30 #   ${prefix}/lib/python${python_version}/site-packages/gnuradio
31
32 ourpythondir = $(grpythondir)
33 ourlibdir    = $(grpythondir)
34
35 INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(GNURADIO_INCLUDES)
36
37 SWIGCPPPYTHONARGS = -fvirtual -python -modern $(PYTHON_CPPFLAGS) \
38         $(GNURADIO_INCLUDES)
39
40 ALL_IFILES =                            \
41         $(LOCAL_IFILES)                 \
42         $(NON_LOCAL_IFILES)
43
44 NON_LOCAL_IFILES =                      \
45         $(top_srcdir)/gnuradio-core/src/lib/swig/gnuradio.i
46
47 LOCAL_IFILES =                                          \
48         gr_syms_to_metrics.i                            \
49         gr_metrics_decode_viterbi_full_block.i          \
50         gr_streams_encode_convolutional.i               \
51         gr_streams_encode_turbo.i                       \
52         ecc.i
53
54 # These files are built by SWIG.  The first is the C++ glue.
55 # The second is the python wrapper that loads the _howto shared library
56 # and knows how to call our extensions.
57
58 BUILT_SOURCES =         \
59         ecc.cc          \
60         ecc.py          
61
62 # This gets ecc.py installed in the right place
63 ourpython_PYTHON =                      \
64         __init__.py                     \
65         ecc.py
66
67 ourlib_LTLIBRARIES = _ecc.la
68
69 # These are the source files that go into the shared library
70 _ecc_la_SOURCES =                                       \
71         gr_syms_to_metrics.cc                           \
72         gr_metrics_decode_viterbi_full_block.cc         \
73         gr_streams_encode_convolutional.cc              \
74         gr_streams_encode_turbo.cc                      \
75         ecc.cc
76
77 # magic flags
78 _ecc_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
79
80 # link the library against the c++ standard library
81 _ecc_la_LIBADD =                \
82         libecc/libecc.la        \
83         $(PYTHON_LDFLAGS)       \
84         -lstdc++
85
86 # These headers get installed in ${prefix}/include/gnuradio
87 grinclude_HEADERS =                                     \
88         gr_syms_to_metrics.h                            \
89         gr_metrics_decode_viterbi_full_block.h          \
90         gr_streams_encode_convolutional.h               \
91         gr_streams_encode_turbo.h
92
93 # These swig headers get installed in ${prefix}/include/gnuradio/swig
94 swiginclude_HEADERS = $(LOCAL_IFILES)
95
96 ecc.cc ecc.py: ecc.i $(ALL_IFILES)
97         $(SWIG) $(SWIGCPPPYTHONARGS) -module ecc -o ecc.cc $<
98
99 MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc *.loT *~
100
101 CONFIG_CLEAN_FILES = *.in