Merged r10288:10370 from michaelld/swigpythonargs into trunk. Passes distcheck.
[debian/gnuradio] / gr-gcell / src / Makefile.am
1 #
2 # Copyright 2008,2009 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) \
36         $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
37
38 # Special swig arguments
39 LOCAL_SWIG_DEFINES_AND_INCLUDES = $(GCELL_INCLUDES)
40
41 # ----------------------------------------------------------------
42 #                        The C++ blocks
43 # ----------------------------------------------------------------
44
45 # the library for the C++ blocks
46 lib_LTLIBRARIES = libgr_gcell.la
47
48 libgr_gcell_la_SOURCES = \
49         gcell_fft_vcc.cc
50
51 grinclude_HEADERS = \
52         gcell_fft_vcc.h
53
54 libgr_gcell_la_LIBADD = \
55         $(GNURADIO_CORE_LA) \
56         $(GCELL_LA)
57
58 libgr_gcell_la_LDFLAGS = $(NO_UNDEFINED)
59
60
61 # ----------------------------------------------------------------
62 #                         SWIG stuff
63 # ----------------------------------------------------------------
64
65 # the library for the swig interface
66 ourlib_LTLIBRARIES = _gcell.la
67
68 LOCAL_IFILES = \
69         $(srcdir)/gc_job_manager.i \
70         $(srcdir)/gcell.i \
71         $(srcdir)/gcell_fft_vcc.i
72
73 NON_LOCAL_IFILES = \
74         $(GNURADIO_I)
75
76 ALL_IFILES = \
77         $(LOCAL_IFILES) \
78         $(NON_LOCAL_IFILES)
79
80 swig_built_sources = \
81         gcell.cc \
82         gcell.py
83
84 ourpython_PYTHON = \
85         gcell.py
86
87 _gcell_la_SOURCES = \
88         gcell.cc
89
90 _gcell_la_LIBADD = \
91         $(PYTHON_LDFLAGS) \
92         libgr_gcell.la \
93         -lstdc++
94
95 _gcell_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
96
97 _gcell_la_CXXFLAGS = @swig_CXXFLAGS@
98
99 swiginclude_HEADERS = \
100         $(LOCAL_IFILES)
101
102 #gcell.cc gcell.py: $(ALL_IFILES)
103 #       $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module gcell \
104 #               -o gcell.cc $(LOCAL_IFILES)
105
106 # KLUDGE: Force runtime include of gcell.d dependency file.
107 # This is not guaranteed to be portable, but will probably work.
108 # If it works, we have accurate dependencies for our swig stuff, which is good.
109 @am__include@ @am__quote@./gcell.d@am__quote@
110
111 gcell.py gcell.h: gcell.cc
112
113 gcell.cc : $(srcdir)/gcell.i $(GNURADIO_I)
114         if $(SWIG) $(STD_SWIG_PYTHON_ARGS) -MMD -MF gcell.Td -module gcell \
115                 -o gcell.cc $(srcdir)/gcell.i ;\
116         then if test $(host_os) = mingw32; \
117              then sed 's,\\\\,/,g' <gcell.Td >gcell.d; rm -f gcell.Td; \
118              else mv -f gcell.Td gcell.d; fi \
119         else rm -f gcell.Td; exit 1; fi 
120
121
122 noinst_PYTHON =  \
123         qa_fft.py
124
125 # ----------------------------------------------------------------
126
127 MOSTLYCLEANFILES =  \
128         $(swig_built_sources) *~ *.pyc
129
130 # Don't distribute output of swig
131 dist-hook:
132         @for file in $(swig_built_sources); do echo $(RM) $(distdir)/$$file; done
133         @for file in $(swig_built_sources); do $(RM) $(distdir)/$$file; done
134
135 DISTCLEANFILES = \
136         gcell.d