58115de254c4db817684f0a943d57659bf3a5068
[debian/gnuradio] / gr-trellis / src / lib / Makefile.am
1 #
2 # Copyright 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) $(WITH_INCLUDES)
25
26 # ----------------------------------------------------------------
27 # these scripts generate trellis codes from template files
28
29 core_generator =                                \
30         generate_all.py                         \
31         generate_trellis.py                     \
32         trellis_encoder_XX.cc.t                 \
33         trellis_encoder_XX.h.t                  \
34         trellis_encoder_XX.i.t                  \
35         trellis_metrics_X.cc.t                  \
36         trellis_metrics_X.h.t                   \
37         trellis_metrics_X.i.t                   \
38         trellis_viterbi_combined_XX.cc.t        \
39         trellis_viterbi_combined_XX.h.t         \
40         trellis_viterbi_combined_XX.i.t         \
41         trellis_viterbi_X.cc.t                  \
42         trellis_viterbi_X.h.t                   \
43         trellis_viterbi_X.i.t
44
45 # Source built by Python into $(builddir)
46 python_built_sources =          \
47         $(GENERATED_H)          \
48         $(GENERATED_I)          \
49         $(GENERATED_CC)         \
50         trellis_generated.i
51
52 EXTRA_DIST =                    \
53         $(core_generator)
54
55 # These headers get installed in ${prefix}/include/gnuradio
56 grinclude_HEADERS =                     \
57         fsm.h                           \
58         quicksort_index.h               \
59         base.h                          \
60         interleaver.h                   \
61         trellis_metric_type.h           \
62         trellis_calc_metric.h           \
63         trellis_permutation.h           \
64         trellis_siso_type.h             \
65         trellis_siso_f.h                \
66         trellis_siso_combined_f.h       \
67         $(GENERATED_H)
68
69 lib_LTLIBRARIES = libgnuradio-trellis.la
70
71 libgnuradio_trellis_la_SOURCES =        \
72         fsm.cc                          \
73         quicksort_index.cc              \
74         base.cc                         \
75         interleaver.cc                  \
76         trellis_calc_metric.cc          \
77         trellis_permutation.cc          \
78         trellis_siso_f.cc               \
79         trellis_siso_combined_f.cc      \
80         $(GENERATED_CC)
81
82 libgnuradio_trellis_la_LIBADD = \
83         $(GNURADIO_CORE_LA)
84
85 libgnuradio_trellis_la_LDFLAGS =        \
86         $(NO_UNDEFINED)
87
88
89
90
91 if PYTHON
92 #################################
93 # SWIG interface and library
94
95 TOP_SWIG_IFILES =                       \
96         trellis.i
97
98 # Install so that they end up available as:
99 #   import gnuradio.trellis
100 # This ends up at:
101 #   ${prefix}/lib/python${python_version}/site-packages/gnuradio
102 trellis_pythondir_category =            \
103         gnuradio
104
105 # additional libraries for linking with the SWIG-generated library
106 trellis_la_swig_libadd =                \
107         libgnuradio-trellis.la
108
109 # additional SWIG files to be installed
110 trellis_swiginclude_headers =           \
111         $(GENERATED_I)                  \
112         fsm.i                           \
113         interleaver.i                   \
114         trellis_permutation.i           \
115         trellis_siso_f.i                \
116         trellis_siso_combined_f.i       \
117         trellis_generated.i
118
119 # Do creation and inclusion of other Makefiles last
120
121 # include the srcdir's Makefile.gen; doing this creates an implicit
122 # dependency between $(srcdir)/Makefile.in and $(srcdir)/Makefile.gen.
123 include $(srcdir)/Makefile.gen
124
125 # common way for generating local Makefile.gen
126 makefile_gen_gen_command = PYTHONPATH=$(top_srcdir)/gnuradio-core/src/python srcdir=$(srcdir) do_makefile=1 do_sources=0 $(PYTHON) $(srcdir)/generate_all.py
127 include $(top_srcdir)/Makefile.gen.gen
128
129 # common way for generating sources from templates when using
130 # BUILT_SOURCES, using parallel build protection.
131 gen_sources = $(python_built_sources)
132 gen_sources_deps = $(core_generator)
133 par_gen_command = PYTHONPATH=$(top_srcdir)/gnuradio-core/src/python srcdir=$(srcdir) $(PYTHON) $(srcdir)/generate_all.py
134 include $(top_srcdir)/Makefile.par.gen
135
136 include $(top_srcdir)/Makefile.swig
137
138 # add some of the variables generated inside the Makefile.swig.gen
139 BUILT_SOURCES =                         \
140         $(python_built_sources)         \
141         $(swig_built_sources)
142
143 # Do not distribute the output of SWIG
144 no_dist_files = $(swig_built_sources)
145 endif