Merged r4632:4645 on jcorgan/linking into trunk. Cleans up linking issues with libto...
[debian/gnuradio] / gr-atsc / src / lib / Makefile.am
1 #
2 # Copyright 2001,2004,2005,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., 51 Franklin Street,
19 # Boston, MA 02110-1301, USA.
20
21
22 include $(top_srcdir)/Makefile.common
23
24 # Install this stuff so that it ends up as the gnuradio.atsc module
25 # This usually ends up at:
26 #   ${prefix}/lib/python${python_version}/site-packages/gnuradio
27
28 ourpythondir = $(grpythondir)
29 ourlibdir    = $(grpyexecdir)
30
31 INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(CPPUNIT_INCLUDES)
32
33 EXTRA_DIST =                                    \
34         gen_encoder.py                          \
35         qa_atsci_trellis_encoder_t1_input.dat   \
36         qa_atsci_trellis_encoder_t1_output.dat  \
37         qa_atsci_viterbi_decoder_t1_input.dat   \
38         qa_atsci_viterbi_decoder_t1_output.dat  
39
40
41 BUILT_SOURCES =                                 \
42         atsci_viterbi_mux.cc                    \
43         $(swig_built_sources)
44
45
46 TESTS =                                         \
47         test_atsci                              
48
49
50 # We build two libtool convenience libraries
51
52 noinst_LTLIBRARIES = libatsc.la libatsc-qa.la
53
54 # FIXME
55 #       atsci_exp2_lp.cc                        \
56 #       atsci_root_raised_cosine.cc             \
57 #       atsci_root_raised_cosine_bandpass.cc    \
58 #       atsci_vsbtx_lp.cc                       \
59 #
60
61 libatsc_la_SOURCES =                            \
62         atsc_derandomizer.cc                    \
63         atsc_randomizer.cc                      \
64         atsc_rs_decoder.cc                      \
65         atsc_rs_encoder.cc                      \
66         atsc_interleaver.cc                     \
67         atsc_deinterleaver.cc                   \
68         atsc_trellis_encoder.cc                 \
69         atsc_viterbi_decoder.cc                 \
70         atsc_ds_to_softds.cc                    \
71         atsc_field_sync_mux.cc                  \
72         atsc_field_sync_demux.cc                \
73         atsc_equalizer.cc                       \
74         atsc_fs_checker.cc                      \
75         atsc_bit_timing_loop.cc                 \
76         atsc_fpll.cc                            \
77         atsc_depad.cc                           \
78         atsc_pad.cc                             \
79         atsci_basic_trellis_encoder.cc          \
80         atsci_data_interleaver.cc               \
81         atsci_equalizer.cc                      \
82         atsci_equalizer_lms.cc                  \
83         atsci_equalizer_lms2.cc                 \
84         atsci_equalizer_nop.cc                  \
85         atsci_fake_single_viterbi.cc            \
86         atsci_fs_checker.cc                     \
87         atsci_fs_checker_naive.cc               \
88         atsci_fs_correlator.cc                  \
89         atsci_fs_correlator_naive.cc            \
90         atsci_single_viterbi.cc                 \
91         atsci_sssr.cc                           \
92         atsci_pnXXX.cc                          \
93         atsci_randomizer.cc                     \
94         atsci_reed_solomon.cc                   \
95         atsci_sliding_correlator.cc             \
96         atsci_trellis_encoder.cc                \
97         atsci_viterbi_decoder.cc                \
98         create_atsci_equalizer.cc               \
99         create_atsci_fs_checker.cc              \
100         create_atsci_fs_correlator.cc           \
101         plinfo.cc                               
102
103 libatsc_qa_la_SOURCES =                         \
104         qa_atsci_basic_trellis_encoder.cc       \
105         qa_atsci_data_interleaver.cc            \
106         qa_atsci_equalizer_nop.cc               \
107         qa_atsci_fake_single_viterbi.cc         \
108         qa_atsci_fs_correlator.cc               \
109         qa_atsci_single_viterbi.cc              \
110         qa_atsci_randomizer.cc                  \
111         qa_atsci_reed_solomon.cc                \
112         qa_atsci_sliding_correlator.cc          \
113         qa_atsci_trellis_encoder.cc             \
114         qa_atsci_viterbi_decoder.cc             \
115         qa_convolutional_interleaver.cc         \
116         qa_atsci.cc                             \
117         qa_interleaver_fifo.cc                  
118
119
120 # These headers get installed in ${prefix}/include/gnuradio
121 grinclude_HEADERS =                             \
122         atsc_consts.h                           \
123         atsc_derandomizer.h                     \
124         atsc_randomizer.h                       \
125         atsc_rs_decoder.h                       \
126         atsc_rs_encoder.h                       \
127         atsc_interleaver.h                      \
128         atsc_deinterleaver.h                    \
129         atsc_trellis_encoder.h                  \
130         atsc_viterbi_decoder.h                  \
131         atsc_ds_to_softds.h                     \
132         atsc_field_sync_mux.h                   \
133         atsc_field_sync_demux.h                 \
134         atsc_equalizer.h                        \
135         atsc_fs_checker.h                       \
136         atsc_bit_timing_loop.h                  \
137         atsc_fpll.h                             \
138         atsc_depad.h                            \
139         atsc_pad.h                              \
140         atsc_types.h                            \
141         atsci_basic_trellis_encoder.h           \
142         atsci_data_interleaver.h                \
143         atsci_diag_output.h                     \
144         atsci_equalizer.h                       \
145         atsci_equalizer_lms.h                   \
146         atsci_equalizer_lms2.h                  \
147         atsci_equalizer_nop.h                   \
148         atsci_exp2_lp.h                         \
149         atsci_fake_single_viterbi.h             \
150         atsci_fs_checker.h                      \
151         atsci_fs_checker_naive.h                \
152         atsci_fs_correlator.h                   \
153         atsci_fs_correlator_naive.h             \
154         atsci_pnXXX.h                           \
155         atsci_randomizer.h                      \
156         atsci_reed_solomon.h                    \
157         atsci_root_raised_cosine.h              \
158         atsci_root_raised_cosine_bandpass.h     \
159         atsci_single_viterbi.h                  \
160         atsci_slicer_agc.h                      \
161         atsci_sliding_correlator.h              \
162         atsci_sssr.h                            \
163         atsci_syminfo.h                         \
164         atsci_sync_tag.h                        \
165         atsci_trellis_encoder.h                 \
166         atsci_viterbi_decoder.h                 \
167         atsci_vsbtx_lp.h                        \
168         convolutional_interleaver.h             \
169         create_atsci_equalizer.h                \
170         create_atsci_fs_checker.h               \
171         create_atsci_fs_correlator.h            \
172         fpll_btloop_coupling.h                  \
173         interleaver_fifo.h                      \
174         qa_atsci.h                              \
175         qa_atsci_basic_trellis_encoder.h        \
176         qa_atsci_data_interleaver.h             \
177         qa_atsci_equalizer_nop.h                \
178         qa_atsci_fake_single_viterbi.h          \
179         qa_atsci_fs_correlator.h                \
180         qa_atsci_randomizer.h                   \
181         qa_atsci_reed_solomon.h                 \
182         qa_atsci_single_viterbi.h               \
183         qa_atsci_sliding_correlator.h           \
184         qa_atsci_trellis_encoder.h              \
185         qa_atsci_viterbi_decoder.h              \
186         qa_convolutional_interleaver.h          \
187         qa_interleaver_fifo.h                   
188
189
190 # programs we build but don't install
191 # FIXME add test_atsc
192 noinst_PROGRAMS =                               \
193         atsci_viterbi_gen                       \
194         test_atsci                              
195
196
197 atsci_viterbi_gen_SOURCES = atsci_viterbi_gen.cc
198
199 atsci_viterbi_mux.cc: atsci_viterbi_gen$(EXEEXT) 
200         $(MAKE) $(AM_MAKEFLAGS) CXX="$(CXX_FOR_BUILD)" atsci_viterbi_gen$(EXEEXT)
201         ./atsci_viterbi_gen$(EXEEXT) -o atsci_viterbi_mux.cc
202
203
204 test_atsci_SOURCES = test_atsci.cc
205 test_atsci_LDADD   =            \
206         libatsc-qa.la           \
207         libatsc.la              \
208         $(GNURADIO_CORE_LA)     \
209         $(CPPUNIT_LIBS)
210
211 # ------------------------------------------------------------------------
212 #  This is the swig-ish part of the Makefile.
213 #  It builds the atsc module which we'll load into python
214 # ------------------------------------------------------------------------
215
216 SWIGCPPPYTHONARGS = -fvirtual -python -modern $(PYTHON_CPPFLAGS) \
217         $(STD_DEFINES_AND_INCLUDES)
218
219 ALL_IFILES =                            \
220         $(LOCAL_IFILES)                 \
221         $(NON_LOCAL_IFILES)             
222
223 NON_LOCAL_IFILES =                      \
224         $(GNURADIO_I)
225
226 LOCAL_IFILES =                          \
227         $(top_srcdir)/gr-atsc/src/lib/atsc.i                            
228
229 # These files are built by SWIG.  The first is the C++ glue.
230 # The second is the python wrapper that loads the _atsc shared library
231 # and knows how to call our extensions.
232
233 swig_built_sources =                    \
234         atsc.cc                         \
235         atsc.py                         
236
237 # This gets atsc.py installed in the right place
238 ourpython_PYTHON =                      \
239         atsc.py
240
241 ourlib_LTLIBRARIES = _atsc.la
242
243 # These are the source files that go into the shared library
244 _atsc_la_SOURCES =                      \
245         atsc.cc                 
246
247 # magic flags
248 _atsc_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
249
250 # link the library against some comon swig runtime code and the 
251 # c++ standard library
252 _atsc_la_LIBADD =                       \
253         $(GNURADIO_CORE_LA)             \
254         $(PYTHON_LDFLAGS)               \
255         libatsc.la                      \
256         -lstdc++                        
257
258 atsc.cc atsc.py: atsc.i $(ALL_IFILES)
259         $(SWIG) $(SWIGCPPPYTHONARGS) -module atsc -o atsc.cc $(LOCAL_IFILES)
260
261 # These swig headers get installed in ${prefix}/include/gnuradio/swig
262 swiginclude_HEADERS =                   \
263         $(LOCAL_IFILES)                 
264
265 # Don't distribute output of swig
266 dist-hook:
267         @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done
268         @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
269
270 # ------------------------------------------------------------------------
271 #  Cleanup
272 # ------------------------------------------------------------------------
273
274 CLEANFILES =       atsci_viterbi_mux.cc
275 MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc
276