Add support for msdd6000 with resampler in FPGA.
[debian/gnuradio] / gr-msdd6000 / src / Makefile.swig.gen
1 # -*- Makefile -*-
2 #
3 # Copyright 2009 Free Software Foundation, Inc.
4
5 # This file is part of GNU Radio
6
7 # GNU Radio is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3, or (at your option)
10 # any later version.
11
12 # GNU Radio is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Radio; see the file COPYING.  If not, write to
19 # the Free Software Foundation, Inc., 51 Franklin Street,
20 # Boston, MA 02110-1301, USA.
21
22
23 # Makefile.swig.gen for msdd.i
24
25 ## Default install locations for these files:
26 ##
27 ## Default location for the Python directory is:
28 ##  ${prefix}/lib/python${python_version}/site-packages/[category]/msdd
29 ## Default location for the Python exec directory is:
30 ##  ${exec_prefix}/lib/python${python_version}/site-packages/[category]/msdd
31 ##
32 ## The following can be overloaded to change the install location, but
33 ## this has to be done in the including Makefile.am -before-
34 ## Makefile.swig is included.
35
36
37 msdd_pythondir_category ?= gnuradio/msdd
38 msdd_pylibdir_category ?= $(msdd_pythondir_category)
39 msdd_pythondir = $(pythondir)/$(msdd_pythondir_category)
40 msdd_pylibdir = $(pyexecdir)/$(msdd_pylibdir_category)
41
42 msdd_rs_pythondir_category ?= gnuradio/msdd_rs
43 msdd_rs_pylibdir_category ?= $(msdd_rs_pythondir_category)
44 msdd_rs_pythondir = $(pythondir)/$(msdd_rs_pythondir_category)
45 msdd_rs_pylibdir = $(pyexecdir)/$(msdd_rs_pylibdir_category)
46
47 ## SWIG headers are always installed into the same directory.
48
49 msdd_swigincludedir = $(swigincludedir)
50 msdd_rs_swigincludedir = $(swigincludedir)
51
52 ## This is a template file for a "generated" Makefile addition (in
53 ## this case, "Makefile.swig.gen").  By including the top-level
54 ## Makefile.swig, this file will be used to generate the SWIG
55 ## dependencies.  Assign the variable TOP_SWIG_FILES to be the list of
56 ## SWIG .i files to generated wrappings for; there can be more than 1
57 ## so long as the names are unique (no sorting is done on the
58 ## TOP_SWIG_FILES list). This file explicitly assumes that a SWIG .i
59 ## file will generate .cc, .py, and possibly .h files -- meaning that
60 ## all of these files will have the same base name (that provided for
61 ## the SWIG .i file).
62 ##
63 ## This code is setup to ensure parallel MAKE ("-j" or "-jN") does the
64 ## right thing.  For more info, see <
65 ## http://sources.redhat.com/automake/automake.html#Multiple-Outputs >
66
67 ## Stamps used to ensure parallel make does the right thing.  These
68 ## are removed by "make clean", but otherwise unused except during the
69 ## parallel built.  These will not be included in a tarball, because
70 ## the SWIG-generated files will be removed from the distribution.
71
72 STAMPS += $(DEPDIR)/msdd-generate-*
73 STAMPS += $(DEPDIR)/msdd_rs-generate-*
74
75 ## Other cleaned files: dependency files generated by SWIG or this Makefile
76
77 MOSTLYCLEANFILES += $(DEPDIR)/*.S*
78
79 ## Add the .py and .cc files to the list of SWIG built sources.  The
80 ## .h file is sometimes built, but not always ... so that one has to
81 ## be added manually by the including Makefile.am .
82
83 swig_built_sources += msdd.py msdd_rs.py msdd.cc msdd_rs.cc
84
85 ## Various SWIG variables.  These can be overloaded in the including
86 ## Makefile.am by setting the variable value there, then including
87 ## Makefile.swig .
88
89 msdd_swiginclude_HEADERS =              \
90         msdd.i                          \
91         msdd_rs.i                       \
92         $(msdd_swiginclude_headers)
93
94 msdd_pylib_LTLIBRARIES =                \
95         _msdd.la
96
97 msdd_rs_pylib_LTLIBRARIES =             \
98         _msdd_rs.la
99
100 _msdd_la_SOURCES =                      \
101         msdd.cc                         \
102         $(msdd_la_swig_sources)
103
104 _msdd_rs_la_SOURCES =                   \
105     msdd_rs.cc                          \
106     $(msdd_la_swig_sources)
107
108
109 _msdd_la_LIBADD =                       \
110         $(STD_SWIG_LA_LIB_ADD)          \
111         $(msdd_la_swig_libadd)
112
113 _msdd_rs_la_LIBADD =                    \
114     $(STD_SWIG_LA_LIB_ADD)              \
115     $(msdd_rs_la_swig_libadd)
116
117 _msdd_la_LDFLAGS =                      \
118         $(STD_SWIG_LA_LD_FLAGS)         \
119         $(msdd_la_swig_ldflags)
120
121 _msdd_la_CXXFLAGS =                     \
122         $(STD_SWIG_CXX_FLAGS)           \
123         $(msdd_la_swig_cxxflags)
124
125 _msdd_rs_la_LDFLAGS =                   \
126     $(STD_SWIG_LA_LD_FLAGS)             \
127     $(msdd_rs_la_swig_ldflags)
128
129 _msdd_rs_la_CXXFLAGS =                  \
130     $(STD_SWIG_CXX_FLAGS)               \
131     $(msdd_rs_la_swig_cxxflags)
132
133 msdd_python_PYTHON =                    \
134         msdd.py                         \
135         $(msdd_python)
136
137 msdd_rs_python_PYTHON =                 \
138     msdd_rs.py                          \
139     $(msdd_rs_python)
140
141 ## Entry rule for running SWIG
142
143 msdd.h msdd.py msdd.cc: msdd.i
144 ## This rule will get called only when MAKE decides that one of the
145 ## targets needs to be created or re-created, because:
146 ##
147 ## * The .i file is newer than any or all of the generated files;
148 ##
149 ## * Any or all of the .cc, .h, or .py files does not exist and is
150 ##   needed (in the case this file is not needed, the rule for it is
151 ##   ignored); or
152 ##
153 ## * Some SWIG-based dependecy of the .cc file isn't met and hence the
154 ##   .cc file needs be be regenerated.  Explanation: Because MAKE
155 ##   knows how to handle dependencies for .cc files (regardless of
156 ##   their name or extension), then the .cc file is used as a target
157 ##   instead of the .i file -- but with the dependencies of the .i
158 ##   file.  It is this last reason why the line:
159 ##
160 ##      if test -f $@; then :; else
161 ##
162 ##   cannot be used in this case: If a .i file dependecy is not met,
163 ##   then the .cc file needs to be rebuilt.  But if the stamp is newer
164 ##   than the .cc file, and the .cc file exists, then in the original
165 ##   version (with the 'test' above) the internal MAKE call will not
166 ##   be issued and hence the .cc file will not be rebuilt.
167 ##
168 ## Once execution gets to here, it should always proceed no matter the
169 ## state of a stamp (as discussed in link above).  The
170 ## $(DEPDIR)/msdd-generate stuff is used to allow for parallel
171 ## builds to "do the right thing".  The stamp has no relationship with
172 ## either the target files or dependency file; it is used solely for
173 ## the protection of multiple builds during a given call to MAKE.
174 ##
175 ## Catch signals SIGHUP (1), SIGINT (2), SIGPIPE (13), and SIGTERM
176 ## (15).  At a caught signal, the quoted command will be issued before
177 ## exiting.  In this case, remove any stamp, whether temporary of not.
178 ## The trap is valid until the process exits; the process includes all
179 ## commands appended via "\"s.
180 ##
181         trap 'rm -rf $(DEPDIR)/msdd-generate-*' 1 2 13 15; \
182 ##
183 ## Create a temporary directory, which acts as a lock.  The first
184 ## process to create the directory will succeed and issue the MAKE
185 ## command to do the actual work, while all subsequent processes will
186 ## fail -- leading them to wait for the first process to finish.
187 ##
188         if mkdir $(DEPDIR)/msdd-generate-lock 2>/dev/null; then \
189 ##
190 ## This code is being executed by the first process to succeed in
191 ## creating the directory lock.
192 ##
193 ## Remove the stamp associated with this filename.
194 ##
195                 rm -f $(DEPDIR)/msdd-generate-stamp; \
196 ##
197 ## Tell MAKE to run the rule for creating this stamp.
198 ##
199                 $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/msdd-generate-stamp WHAT=$<; \
200 ##
201 ## Now that the .cc, .h, and .py files have been (re)created from the
202 ## .i file, future checking of this rule during the same MAKE
203 ## execution will come back that the rule doesn't need to be executed
204 ## because none of the conditions mentioned at the start of this rule
205 ## will be positive.  Remove the the directory lock, which frees up
206 ## any waiting process(es) to continue.
207 ##
208                 rmdir $(DEPDIR)/msdd-generate-lock; \
209         else \
210 ##
211 ## This code is being executed by any follower processes while the
212 ## directory lock is in place.
213 ##
214 ## Wait until the first process is done, testing once per second.
215 ##
216                 while test -d $(DEPDIR)/msdd-generate-lock; do \
217                         sleep 1; \
218                 done; \
219 ##
220 ## Succeed if and only if the first process succeeded; exit this
221 ## process returning the status of the generated stamp.
222 ##
223                 test -f $(DEPDIR)/msdd-generate-stamp; \
224                 exit $$?; \
225         fi;
226
227 $(DEPDIR)/msdd-generate-stamp:
228 ## This rule will be called only by the first process issuing the
229 ## above rule to succeed in creating the lock directory, after
230 ## removing the actual stamp file in order to guarantee that MAKE will
231 ## execute this rule.
232 ##
233 ## Call SWIG to generate the various output files; special
234 ## post-processing on 'mingw32' host OS for the dependency file.
235 ##
236         if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(msdd_swig_args) \
237                 -MD -MF $(DEPDIR)/msdd.Std \
238                 -module msdd -o msdd.cc $(WHAT); then \
239             if test $(host_os) = mingw32; then \
240                 $(RM) $(DEPDIR)/msdd.Sd; \
241                 $(SED) 's,\\\\,/,g' < $(DEPDIR)/msdd.Std \
242                         > $(DEPDIR)/msdd.Sd; \
243                 $(RM) $(DEPDIR)/msdd.Std; \
244                 $(MV) $(DEPDIR)/msdd.Sd $(DEPDIR)/msdd.Std; \
245             fi; \
246         else \
247             $(RM) $(DEPDIR)/msdd.S*; exit 1; \
248         fi;
249 ##
250 ## Mess with the SWIG output .Std dependency file, to create a
251 ## dependecy file valid for the input .i file: Basically, simulate the
252 ## dependency file created for libraries by GNU's libtool for C++,
253 ## where all of the dependencies for the target are first listed, then
254 ## each individual dependency is listed as a target with no further
255 ## dependencies.
256 ##
257 ## (1) remove the current dependency file
258 ##
259         $(RM) $(DEPDIR)/msdd.d
260 ##
261 ## (2) Copy the whole SWIG file:
262 ##
263         cp $(DEPDIR)/msdd.Std $(DEPDIR)/msdd.d
264 ##
265 ## (3) all a carriage return to the end of the dependency file.
266 ##
267         echo "" >> $(DEPDIR)/msdd.d
268 ##
269 ## (4) from the SWIG file, remove the first line (the target); remove
270 ##     trailing " \" and " " from each line.  Append ":" to each line,
271 ##     followed by 2 carriage returns, then append this to the end of
272 ##     the dependency file.
273 ##
274         $(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/msdd.Std | \
275                 awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/msdd.d
276 ##
277 ## (5) remove the SWIG-generated file
278 ##
279         $(RM) $(DEPDIR)/msdd.Std
280 ##
281 ## Create the stamp for this filename generation, to signal success in
282 ## executing this rule; allows other threads waiting on this process
283 ## to continue.
284 ##
285         touch $(DEPDIR)/msdd-generate-stamp
286
287
288
289
290
291
292 msdd_rs.h msdd_rs.py msdd_rs.cc: msdd_rs.i
293 ## This rule will get called only when MAKE decides that one of the
294 ## targets needs to be created or re-created, because:
295 ##
296 ## * The .i file is newer than any or all of the generated files;
297 ##
298 ## * Any or all of the .cc, .h, or .py files does not exist and is
299 ##   needed (in the case this file is not needed, the rule for it is
300 ##   ignored); or
301 ##
302 ## * Some SWIG-based dependecy of the .cc file isn't met and hence the
303 ##   .cc file needs be be regenerated.  Explanation: Because MAKE
304 ##   knows how to handle dependencies for .cc files (regardless of
305 ##   their name or extension), then the .cc file is used as a target
306 ##   instead of the .i file -- but with the dependencies of the .i
307 ##   file.  It is this last reason why the line:
308 ##
309 ##      if test -f $@; then :; else
310 ##
311 ##   cannot be used in this case: If a .i file dependecy is not met,
312 ##   then the .cc file needs to be rebuilt.  But if the stamp is newer
313 ##   than the .cc file, and the .cc file exists, then in the original
314 ##   version (with the 'test' above) the internal MAKE call will not
315 ##   be issued and hence the .cc file will not be rebuilt.
316 ##
317 ## Once execution gets to here, it should always proceed no matter the
318 ## state of a stamp (as discussed in link above).  The
319 ## $(DEPDIR)/msdd-generate stuff is used to allow for parallel
320 ## builds to "do the right thing".  The stamp has no relationship with
321 ## either the target files or dependency file; it is used solely for
322 ## the protection of multiple builds during a given call to MAKE.
323 ##
324 ## Catch signals SIGHUP (1), SIGINT (2), SIGPIPE (13), and SIGTERM
325 ## (15).  At a caught signal, the quoted command will be issued before
326 ## exiting.  In this case, remove any stamp, whether temporary of not.
327 ## The trap is valid until the process exits; the process includes all
328 ## commands appended via "\"s.
329 ##
330         trap 'rm -rf $(DEPDIR)/msdd_rs-generate-*' 1 2 13 15; \
331 ##
332 ## Create a temporary directory, which acts as a lock.  The first
333 ## process to create the directory will succeed and issue the MAKE
334 ## command to do the actual work, while all subsequent processes will
335 ## fail -- leading them to wait for the first process to finish.
336 ##
337         if mkdir $(DEPDIR)/msdd_rs-generate-lock 2>/dev/null; then \
338 ##
339 ## This code is being executed by the first process to succeed in
340 ## creating the directory lock.
341 ##
342 ## Remove the stamp associated with this filename.
343 ##
344                 rm -f $(DEPDIR)/msdd_rs-generate-stamp; \
345 ##
346 ## Tell MAKE to run the rule for creating this stamp.
347 ##
348                 $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/msdd_rs-generate-stamp WHAT=$<; \
349 ##
350 ## Now that the .cc, .h, and .py files have been (re)created from the
351 ## .i file, future checking of this rule during the same MAKE
352 ## execution will come back that the rule doesn't need to be executed
353 ## because none of the conditions mentioned at the start of this rule
354 ## will be positive.  Remove the the directory lock, which frees up
355 ## any waiting process(es) to continue.
356 ##
357                 rmdir $(DEPDIR)/msdd_rs-generate-lock; \
358         else \
359 ##
360 ## This code is being executed by any follower processes while the
361 ## directory lock is in place.
362 ##
363 ## Wait until the first process is done, testing once per second.
364 ##
365                 while test -d $(DEPDIR)/msdd_rs-generate-lock; do \
366                         sleep 1; \
367                 done; \
368 ##
369 ## Succeed if and only if the first process succeeded; exit this
370 ## process returning the status of the generated stamp.
371 ##
372                 test -f $(DEPDIR)/msdd_rs-generate-stamp; \
373                 exit $$?; \
374         fi;
375
376 $(DEPDIR)/msdd_rs-generate-stamp:
377 ## This rule will be called only by the first process issuing the
378 ## above rule to succeed in creating the lock directory, after
379 ## removing the actual stamp file in order to guarantee that MAKE will
380 ## execute this rule.
381 ##
382 ## Call SWIG to generate the various output files; special
383 ## post-processing on 'mingw32' host OS for the dependency file.
384 ##
385         if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(msdd_rs_swig_args) \
386                 -MD -MF $(DEPDIR)/msdd_rs.Std \
387                 -module msdd_rs -o msdd_rs.cc $(WHAT); then \
388             if test $(host_os) = mingw32; then \
389                 $(RM) $(DEPDIR)/msdd_rs.Sd; \
390                 $(SED) 's,\\\\,/,g' < $(DEPDIR)/msdd_rs.Std \
391                         > $(DEPDIR)/msdd_rs.Sd; \
392                 $(RM) $(DEPDIR)/msdd_rs.Std; \
393                 $(MV) $(DEPDIR)/msdd_rs.Sd $(DEPDIR)/msdd_rs.Std; \
394             fi; \
395         else \
396             $(RM) $(DEPDIR)/msdd_rs.S*; exit 1; \
397         fi;
398 ##
399 ## Mess with the SWIG output .Std dependency file, to create a
400 ## dependecy file valid for the input .i file: Basically, simulate the
401 ## dependency file created for libraries by GNU's libtool for C++,
402 ## where all of the dependencies for the target are first listed, then
403 ## each individual dependency is listed as a target with no further
404 ## dependencies.
405 ##
406 ## (1) remove the current dependency file
407 ##
408         $(RM) $(DEPDIR)/msdd_rs.d
409 ##
410 ## (2) Copy the whole SWIG file:
411 ##
412         cp $(DEPDIR)/msdd_rs.Std $(DEPDIR)/msdd_rs.d
413 ##
414 ## (3) all a carriage return to the end of the dependency file.
415 ##
416         echo "" >> $(DEPDIR)/msdd_rs.d
417 ##
418 ## (4) from the SWIG file, remove the first line (the target); remove
419 ##     trailing " \" and " " from each line.  Append ":" to each line,
420 ##     followed by 2 carriage returns, then append this to the end of
421 ##     the dependency file.
422 ##
423         $(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/msdd_rs.Std | \
424                 awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/msdd_rs.d
425 ##
426 ## (5) remove the SWIG-generated file
427 ##
428         $(RM) $(DEPDIR)/msdd_rs.Std
429 ##
430 ## Create the stamp for this filename generation, to signal success in
431 ## executing this rule; allows other threads waiting on this process
432 ## to continue.
433 ##
434         touch $(DEPDIR)/msdd_rs-generate-stamp
435
436 # KLUDGE: Force runtime include of a SWIG dependency file.  This is
437 # not guaranteed to be portable, but will probably work.  If it works,
438 # we have accurate dependencies for our swig stuff, which is good.
439
440
441 @am__include@ @am__quote@./$(DEPDIR)/msdd.d@am__quote@
442 @am__include@ @am__quote@./$(DEPDIR)/msdd_rs.d@am__quote@
443
444