Merged eb/reverted-7899 -r7928:7930 into trunk. This effectively
[debian/gnuradio] / gnuradio-core / src / lib / filter / Makefile.am
1 #
2 # Copyright 2001,2002,2004,2005,2006,2007,2008 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 #
25 # This directory contains mostly filter routines, plus a few
26 # other performance critical items
27 #
28
29 AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
30
31 noinst_LTLIBRARIES = libfilter.la libfilter-qa.la
32
33 # ----------------------------------------------------------------
34 # these scripts generate FIR code
35 #
36
37 CODE_GENERATOR =                                        \
38         generate_all.py                                 \
39         generate_gr_fir_XXX.py                          \
40         generate_gr_fir_filter_XXX.py                   \
41         generate_gr_interp_fir_filter_XXX.py            \
42         generate_gr_rational_resampler_base_XXX.py      \
43         generate_gr_fir_sysconfig.py                    \
44         generate_gr_fir_sysconfig_generic.py            \
45         generate_gr_fir_util.py                         \
46         generate_gr_freq_xlating_fir_filter_XXX.py      \
47         generate_utils.py                               \
48         gr_fir_XXX.cc.t                                 \
49         gr_fir_XXX.h.t                                  \
50         gr_fir_XXX_generic.cc.t                         \
51         gr_fir_XXX_generic.h.t                          \
52         gr_fir_filter_XXX.cc.t                          \
53         gr_fir_filter_XXX.h.t                           \
54         gr_fir_filter_XXX.i.t                           \
55         gr_interp_fir_filter_XXX.cc.t                   \
56         gr_interp_fir_filter_XXX.h.t                    \
57         gr_interp_fir_filter_XXX.i.t                    \
58         gr_rational_resampler_base_XXX.cc.t             \
59         gr_rational_resampler_base_XXX.h.t              \
60         gr_rational_resampler_base_XXX.i.t              \
61         gr_freq_xlating_fir_filter_XXX.cc.t             \
62         gr_freq_xlating_fir_filter_XXX.h.t              \
63         gr_freq_xlating_fir_filter_XXX.i.t
64
65 include Makefile.gen
66
67 # Ensure parallel make does the right thing.
68 # http://sources.redhat.com/automake/automake.html#Multiple-Outputs
69
70 STAMPS = generate-stamp
71
72 generate-stamp: $(CODE_GENERATOR)
73         @rm -f generate-tmp
74         @touch generate-tmp
75         PYTHONPATH=$(top_srcdir)/gnuradio-core/src/python srcdir=$(srcdir) $(PYTHON) $(srcdir)/generate_all.py
76         @mv -f generate-tmp $@
77
78
79 $(GENERATED_H) $(GENERATED_I) $(GENERATED_CC) filter_generated.i: generate-stamp
80 ## Recover from the removal of $@
81         @if test -f $@; then :; else \
82                trap 'rm -rf generate-lock generate-stamp' 1 2 13 15; \
83                if mkdir generate-lock 2>/dev/null; then \
84 ## This code is being executed by the first process.
85                  rm -f generate-stamp; \
86                  $(MAKE) $(AM_MAKEFLAGS) generate-stamp; \
87                  rmdir generate-lock; \
88                else \
89 ## This code is being executed by the follower processes.
90 ## Wait until the first process is done.
91                  while test -d generate-lock; do sleep 1; done; \
92 ## Succeed if and only if the first process succeeded.
93                  test -f generate-stamp; exit $$?; \
94                fi; \
95              fi
96
97
98 BUILT_SOURCES = $(GENERATED_H) $(GENERATED_I) $(GENERATED_CC) filter_generated.i
99
100
101 # ----------------------------------------------------------------
102 # MD_CPU and MD_SUBCPU are set at configure time by way of 
103 #   gnuradio/config/gr_set_md_cpu.m4.  
104 #   It indicates which set of machine dependent code we should be building.
105 #   We currently implement "generic" and "x86"
106
107 #
108 # <foo>_CODE entry for each set of machine specific speedups
109 #
110
111 generic_CODE =                          \
112         sysconfig_generic.cc            
113
114 generic_qa_CODE =                       \
115         qa_dotprod_generic.cc
116
117 x86_CODE =                              \
118         sysconfig_x86.cc                \
119         gr_fir_sysconfig_x86.cc         \
120         gr_cpu.cc                       \
121         gr_fir_ccc_simd.cc              \
122         gr_fir_ccc_x86.cc               \
123         gr_fir_fff_simd.cc              \
124         gr_fir_fff_x86.cc               \
125         gr_fir_fsf_simd.cc              \
126         gr_fir_fsf_x86.cc               \
127         gr_fir_scc_simd.cc              \
128         gr_fir_scc_x86.cc               \
129         gr_fir_fcc_simd.cc              \
130         gr_fir_fcc_x86.cc               \
131         gr_fir_ccf_simd.cc              \
132         gr_fir_ccf_x86.cc               \
133         sse_debug.c
134
135 x86_SUBCODE =                           \
136         float_dotprod_sse.S             \
137         float_dotprod_3dnow.S           \
138         complex_dotprod_3dnowext.S      \
139         complex_dotprod_3dnow.S         \
140         complex_dotprod_sse.S           \
141         ccomplex_dotprod_3dnowext.S     \
142         ccomplex_dotprod_3dnow.S        \
143         ccomplex_dotprod_sse.S          \
144         fcomplex_dotprod_3dnow.S        \
145         fcomplex_dotprod_sse.S          \
146         short_dotprod_mmx.S             \
147         cpuid_x86.S
148
149 x86_64_SUBCODE =                        \
150         float_dotprod_sse64.S           \
151         float_dotprod_3dnow64.S         \
152         complex_dotprod_3dnowext64.S    \
153         complex_dotprod_3dnow64.S       \
154         complex_dotprod_sse64.S         \
155         ccomplex_dotprod_3dnowext64.S   \
156         ccomplex_dotprod_3dnow64.S      \
157         ccomplex_dotprod_sse64.S        \
158         fcomplex_dotprod_3dnow64.S      \
159         fcomplex_dotprod_sse64.S        \
160         short_dotprod_mmx64.S           \
161         cpuid_x86_64.S
162
163 x86_qa_CODE =                           \
164         qa_dotprod_x86.cc               \
165         qa_float_dotprod_x86.cc         \
166         qa_complex_dotprod_x86.cc       \
167         qa_ccomplex_dotprod_x86.cc      
168
169 #
170 # include each <foo>_CODE entry here...
171 #
172 EXTRA_libfilter_la_SOURCES =            \
173         $(generic_CODE)                 \
174         $(generic_qa_CODE)              \
175         $(x86_CODE)                     \
176         $(x86_SUBCODE)                  \
177         $(x86_64_SUBCODE)               \
178         $(x86_qa_CODE)
179
180
181 EXTRA_DIST =                                    \
182         3dnow_float_dotprod_really_simple.S     \
183         3dnow_float_dotprod_simple.S            \
184         $(CODE_GENERATOR)                       \
185         $(STAMPS)
186
187
188 # work around automake deficiency
189 libfilter_la_common_SOURCES =           \
190         $(GENERATED_CC)                 \
191         gr_adaptive_fir_ccf.cc          \
192         gr_cma_equalizer_cc.cc          \
193         gr_fft_filter_ccc.cc            \
194         gr_fft_filter_fff.cc            \
195         gr_goertzel_fc.cc               \
196         gr_filter_delay_fc.cc           \
197         gr_fractional_interpolator_ff.cc \
198         gr_fractional_interpolator_cc.cc \
199         gr_hilbert_fc.cc                \
200         gr_iir_filter_ffd.cc            \
201         gr_sincos.c                     \
202         gr_single_pole_iir_filter_ff.cc \
203         gr_single_pole_iir_filter_cc.cc \
204         gri_goertzel.cc                 \
205         gri_mmse_fir_interpolator.cc    \
206         gri_mmse_fir_interpolator_cc.cc \
207         complex_dotprod_generic.cc      \
208         ccomplex_dotprod_generic.cc     \
209         float_dotprod_generic.c         \
210         short_dotprod_generic.c         
211
212 libfilter_qa_la_common_SOURCES =        \
213         qa_filter.cc                    \
214         qa_gr_fir_ccf.cc                \
215         qa_gr_fir_fcc.cc                \
216         qa_gr_fir_fff.cc                \
217         qa_gr_fir_ccc.cc                \
218         qa_gr_fir_scc.cc                \
219         qa_gri_mmse_fir_interpolator.cc \
220         qa_gri_mmse_fir_interpolator_cc.cc      
221
222 if MD_CPU_generic
223 libfilter_la_SOURCES = $(libfilter_la_common_SOURCES) $(generic_CODE)
224 libfilter_qa_la_SOURCES = $(libfilter_qa_la_common_SOURCES) $(generic_qa_CODE)
225 endif
226
227 if MD_CPU_x86
228 if MD_SUBCPU_x86_64
229 libfilter_la_SOURCES = $(libfilter_la_common_SOURCES) $(x86_64_SUBCODE) $(x86_CODE)
230 else
231 libfilter_la_SOURCES = $(libfilter_la_common_SOURCES) $(x86_SUBCODE) $(x86_CODE)
232 endif
233
234 libfilter_qa_la_SOURCES = $(libfilter_qa_la_common_SOURCES) $(x86_qa_CODE)
235 endif
236
237
238 grinclude_HEADERS =                     \
239         $(GENERATED_H)                  \
240         complex_dotprod_generic.h       \
241         complex_dotprod_x86.h           \
242         fcomplex_dotprod_x86.h          \
243         ccomplex_dotprod_generic.h      \
244         ccomplex_dotprod_x86.h          \
245         float_dotprod_generic.h         \
246         float_dotprod_x86.h             \
247         gr_adaptive_fir_ccf.h           \
248         gr_cma_equalizer_cc.h           \
249         gr_cpu.h                        \
250         gr_fft_filter_ccc.h             \
251         gr_fft_filter_fff.h             \
252         gr_filter_delay_fc.h            \
253         gr_fir_sysconfig_x86.h          \
254         gr_fractional_interpolator_ff.h \
255         gr_fractional_interpolator_cc.h \
256         gr_goertzel_fc.h                \
257         gr_hilbert_fc.h                 \
258         gr_iir_filter_ffd.h             \
259         gr_rotator.h                    \
260         gr_sincos.h                     \
261         gr_single_pole_iir.h            \
262         gr_single_pole_iir_filter_ff.h  \
263         gr_single_pole_iir_filter_cc.h  \
264         gri_goertzel.h                  \
265         gri_iir.h                       \
266         gri_mmse_fir_interpolator.h     \
267         gri_mmse_fir_interpolator_cc.h  \
268         qa_filter.h                     \
269         short_dotprod_generic.h         \
270         short_dotprod_x86.h             \
271         sse_debug.h
272
273 noinst_HEADERS =                        \
274         assembly.h                      \
275         gr_fir_scc_simd.h               \
276         gr_fir_scc_x86.h                \
277         gr_fir_fcc_simd.h               \
278         gr_fir_fcc_x86.h                \
279         gr_fir_ccf_simd.h               \
280         gr_fir_ccf_x86.h                \
281         gr_fir_ccc_simd.h               \
282         gr_fir_ccc_x86.h                \
283         gr_fir_fff_simd.h               \
284         gr_fir_fff_x86.h                \
285         gr_fir_fsf_simd.h               \
286         gr_fir_fsf_x86.h                \
287         interpolator_taps.h             \
288         qa_complex_dotprod_x86.h        \
289         qa_ccomplex_dotprod_x86.h       \
290         qa_dotprod.h                    \
291         qa_float_dotprod_x86.h          \
292         qa_gr_fir_ccf.h                 \
293         qa_gr_fir_fcc.h                 \
294         qa_gr_fir_fff.h                 \
295         qa_gr_fir_ccc.h                 \
296         qa_gr_fir_scc.h                 \
297         qa_gri_mmse_fir_interpolator.h  \
298         qa_gri_mmse_fir_interpolator_cc.h       
299
300
301
302 swiginclude_HEADERS =                   \
303         filter.i                        \
304         filter_generated.i              \
305         gr_adaptive_fir_ccf.i           \
306         gr_cma_equalizer_cc.i           \
307         gr_fft_filter_ccc.i             \
308         gr_fft_filter_fff.i             \
309         gr_filter_delay_fc.i            \
310         gr_fractional_interpolator_ff.i \
311         gr_fractional_interpolator_cc.i \
312         gr_goertzel_fc.i                \
313         gr_hilbert_fc.i                 \
314         gr_iir_filter_ffd.i             \
315         gr_single_pole_iir_filter_ff.i  \
316         gr_single_pole_iir_filter_cc.i  \
317         $(GENERATED_I)
318
319
320 CLEANFILES = $(BUILT_SOURCES) $(STAMPS) *.pyc