Fixes for ticket:35, allowing use of BSD make instead of GNU make.
[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., 59 Temple Place - Suite 330,
19 # Boston, MA 02111-1307, 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 #LIBS += $(GNURADIO_CORE_LIBS)
34
35 EXTRA_DIST =                                    \
36         gen_encoder.py                          \
37         qa_atsci_trellis_encoder_t1_input.dat   \
38         qa_atsci_trellis_encoder_t1_output.dat  \
39         qa_atsci_viterbi_decoder_t1_input.dat   \
40         qa_atsci_viterbi_decoder_t1_output.dat  
41
42
43 BUILT_SOURCES =                                 \
44         atsci_viterbi_mux.cc                    \
45         $(swig_built_sources)
46
47
48 TESTS =                                         \
49         test_atsci                              
50
51
52 # We build two libtool convenience libraries
53
54 noinst_LTLIBRARIES = libatsc.la libatsc-qa.la
55
56 # FIXME
57 #       atsci_exp2_lp.cc                        \
58 #       atsci_root_raised_cosine.cc             \
59 #       atsci_root_raised_cosine_bandpass.cc    \
60 #       atsci_vsbtx_lp.cc                       \
61 #
62
63 libatsc_la_SOURCES =                            \
64         atsc_derandomizer.cc                    \
65         atsc_randomizer.cc                      \
66         atsc_rs_decoder.cc                      \
67         atsc_rs_encoder.cc                      \
68         atsc_interleaver.cc                     \
69         atsc_deinterleaver.cc                   \
70         atsc_trellis_encoder.cc                 \
71         atsc_viterbi_decoder.cc                 \
72         atsc_ds_to_softds.cc                    \
73         atsc_field_sync_mux.cc                  \
74         atsc_field_sync_demux.cc                \
75         atsc_equalizer.cc                       \
76         atsc_fs_checker.cc                      \
77         atsc_bit_timing_loop.cc                 \
78         atsc_fpll.cc                            \
79         atsc_depad.cc                           \
80         atsci_basic_trellis_encoder.cc          \
81         atsci_data_interleaver.cc               \
82         atsci_equalizer.cc                      \
83         atsci_equalizer_lms.cc                  \
84         atsci_equalizer_lms2.cc                 \
85         atsci_equalizer_nop.cc                  \
86         atsci_fake_single_viterbi.cc            \
87         atsci_fs_checker.cc                     \
88         atsci_fs_checker_naive.cc               \
89         atsci_fs_correlator.cc                  \
90         atsci_fs_correlator_naive.cc            \
91         atsci_single_viterbi.cc                 \
92         atsci_sssr.cc                           \
93         atsci_pnXXX.cc                          \
94         atsci_randomizer.cc                     \
95         atsci_reed_solomon.cc                   \
96         atsci_sliding_correlator.cc             \
97         atsci_trellis_encoder.cc                \
98         atsci_viterbi_decoder.cc                \
99         create_atsci_equalizer.cc               \
100         create_atsci_fs_checker.cc              \
101         create_atsci_fs_correlator.cc           \
102         plinfo.cc                               
103
104 libatsc_qa_la_SOURCES =                         \
105         qa_atsci_basic_trellis_encoder.cc       \
106         qa_atsci_data_interleaver.cc            \
107         qa_atsci_equalizer_nop.cc               \
108         qa_atsci_fake_single_viterbi.cc         \
109         qa_atsci_fs_correlator.cc               \
110         qa_atsci_single_viterbi.cc              \
111         qa_atsci_randomizer.cc                  \
112         qa_atsci_reed_solomon.cc                \
113         qa_atsci_sliding_correlator.cc          \
114         qa_atsci_trellis_encoder.cc             \
115         qa_atsci_viterbi_decoder.cc             \
116         qa_convolutional_interleaver.cc         \
117         qa_atsci.cc                             \
118         qa_interleaver_fifo.cc                  
119
120
121 # These headers get installed in ${prefix}/include/gnuradio
122 grinclude_HEADERS =                             \
123         atsc_consts.h                           \
124         atsc_derandomizer.h                     \
125         atsc_randomizer.h                       \
126         atsc_rs_decoder.h                       \
127         atsc_rs_encoder.h                       \
128         atsc_interleaver.h                      \
129         atsc_deinterleaver.h                    \
130         atsc_trellis_encoder.h                  \
131         atsc_viterbi_decoder.h                  \
132         atsc_ds_to_softds.h                     \
133         atsc_field_sync_mux.h                   \
134         atsc_field_sync_demux.h                 \
135         atsc_equalizer.h                        \
136         atsc_fs_checker.h                       \
137         atsc_bit_timing_loop.h                  \
138         atsc_fpll.h                             \
139         atsc_depad.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   = libatsc-qa.la libatsc.la $(GNURADIO_CORE_LIBS) $(CPPUNIT_LIBS)
206
207
208 # ------------------------------------------------------------------------
209 #  This is the swig-ish part of the Makefile.
210 #  It builds the atsc module which we'll load into python
211 # ------------------------------------------------------------------------
212
213 SWIGCPPPYTHONARGS = -fvirtual -python -modern $(PYTHON_CPPFLAGS) \
214         $(STD_DEFINES_AND_INCLUDES)
215
216 ALL_IFILES =                            \
217         $(LOCAL_IFILES)                 \
218         $(NON_LOCAL_IFILES)             
219
220 NON_LOCAL_IFILES =                      \
221         $(GNURADIO_I)
222
223 LOCAL_IFILES =                          \
224         $(top_srcdir)/gr-atsc/src/lib/atsc.i                            
225
226 # These files are built by SWIG.  The first is the C++ glue.
227 # The second is the python wrapper that loads the _atsc shared library
228 # and knows how to call our extensions.
229
230 swig_built_sources =                    \
231         atsc.cc                         \
232         atsc.py                         
233
234 # This gets atsc.py installed in the right place
235 ourpython_PYTHON =                      \
236         atsc.py
237
238 ourlib_LTLIBRARIES = _atsc.la
239
240 # These are the source files that go into the shared library
241 _atsc_la_SOURCES =                      \
242         atsc.cc                 
243
244 # magic flags
245 _atsc_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
246
247 # link the library against some comon swig runtime code and the 
248 # c++ standard library
249 _atsc_la_LIBADD =                       \
250         $(GNURADIO_CORE_LIBS)           \
251         $(PYTHON_LDFLAGS)               \
252         libatsc.la                      \
253         -lstdc++                        
254
255 atsc.cc atsc.py: atsc.i $(ALL_IFILES)
256         $(SWIG) $(SWIGCPPPYTHONARGS) -module atsc -o atsc.cc $(LOCAL_IFILES)
257
258 # These swig headers get installed in ${prefix}/include/gnuradio/swig
259 swiginclude_HEADERS =                   \
260         $(LOCAL_IFILES)                 
261
262 # ------------------------------------------------------------------------
263 #  Cleanup
264 # ------------------------------------------------------------------------
265
266 CLEANFILES =       atsci_viterbi_mux.cc
267 MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc
268