distcheck fix for gr-gcell
[debian/gnuradio] / gr-gcell / src / Makefile.am
1 #
2 # Copyright 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 along
17 # with this program; if not, write to the Free Software Foundation, Inc.,
18 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #
20
21 include $(top_srcdir)/Makefile.common
22
23 SUBDIRS = . examples
24
25 EXTRA_DIST = run_tests.in
26 TESTS = run_tests
27
28
29 # Install the python portion so that it ends up as the gnuradio.gcell module
30 #   ${prefix}/lib/python${python_version}/site-packages/gnuradio
31
32 ourpythondir = $(grpythondir)
33 ourlibdir    = $(grpyexecdir)
34
35 AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(GCELL_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
36
37 SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES) $(GCELL_INCLUDES) \
38         $(WITH_SWIG_INCLUDES) $(WITH_INCLUDES)
39
40 # ----------------------------------------------------------------
41 #                        The C++ blocks
42 # ----------------------------------------------------------------
43
44 # the library for the C++ blocks
45 lib_LTLIBRARIES = libgr_gcell.la
46
47 libgr_gcell_la_SOURCES = \
48         gcell_fft_vcc.cc
49
50 grinclude_HEADERS = \
51         gcell_fft_vcc.h
52
53 libgr_gcell_la_LIBADD = \
54         $(GNURADIO_CORE_LA) \
55         $(GCELL_LA)
56
57 libgr_gcell_la_LDFLAGS = $(NO_UNDEFINED)
58
59
60 # ----------------------------------------------------------------
61 #                         SWIG stuff
62 # ----------------------------------------------------------------
63
64 # the library for the swig interface
65 ourlib_LTLIBRARIES = _gcell.la
66
67 LOCAL_IFILES = \
68         $(srcdir)/gc_job_manager.i \
69         $(srcdir)/gcell.i \
70         $(srcdir)/gcell_fft_vcc.i
71
72 NON_LOCAL_IFILES = \
73         $(GNURADIO_I)
74
75 ALL_IFILES = \
76         $(LOCAL_IFILES) \
77         $(NON_LOCAL_IFILES)
78
79 swig_built_sources = \
80         gcell.cc \
81         gcell.py
82
83 ourpython_PYTHON = \
84         gcell.py
85
86 _gcell_la_SOURCES = \
87         gcell.cc
88
89 _gcell_la_LIBADD = \
90         $(PYTHON_LDFLAGS) \
91         libgr_gcell.la \
92         -lstdc++
93
94 _gcell_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
95
96
97 swiginclude_HEADERS = \
98         $(LOCAL_IFILES)
99
100 #gcell.cc gcell.py: $(LOCAL_IFILES) $(NON_LOCAL_IFILES)
101 #       $(SWIG) $(SWIGPYTHONARGS) -module gcell -o gcell.cc $(LOCAL_IFILES)
102
103 # KLUDGE: Force runtime include of gcell.d dependency file.
104 # This is not guaranteed to be portable, but will probably work.
105 # If it works, we have accurate dependencies for our swig stuff, which is good.
106 @am__include@ @am__quote@./gcell.d@am__quote@
107
108 gcell.py gcell.h: gcell.cc
109
110 gcell.cc : gcell.i $(GNURADIO_I)
111         if $(SWIG) $(SWIGPYTHONARGS) -MMD -MF gcell.Td -module gcell -o gcell.cc $(srcdir)/gcell.i ;\
112         then if test $(host_os) = mingw32; \
113              then sed 's,\\\\,/,g' <gcell.Td >gcell.d; rm -f gcell.Td; \
114              else mv -f gcell.Td gcell.d; fi \
115         else rm -f gcell.Td; exit 1; fi 
116
117
118 noinst_PYTHON =  \
119         qa_fft.py
120
121 # ----------------------------------------------------------------
122
123 MOSTLYCLEANFILES =  \
124         $(swig_built_sources) *~ *.pyc
125
126 # Don't distribute output of swig
127 dist-hook:
128         @for file in $(swig_built_sources); do echo $(RM) $(distdir)/$$file; done
129         @for file in $(swig_built_sources); do $(RM) $(distdir)/$$file; done
130
131 DISTCLEANFILES = \
132         gcell.d