2 # Copyright 2001,2003,2004,2005 Free Software Foundation, Inc.
4 # This file is part of GNU Radio
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)
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.
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.
22 include $(top_srcdir)/Makefile.common
24 # Install this stuff in the gr subdirectory of the python pkg dir.
25 # This usually ends up at:
26 # ${prefix}/lib/python${python_version}/site-packages/gnuradio/gr
28 grgrpythondir = $(grpythondir)/gr
29 grgrlibdir = $(grpyexecdir)/gr
32 INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) -I$(srcdir)
35 EXTRA_DIST = gen-swig-bug-fix
47 gnuradio_swig_python.cc \
48 gnuradio_swig_python.py \
49 gnuradio_swig_python.h \
50 gnuradio_swig_bug_workaround.h
53 gnuradio_swig_python.py
56 SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(INCLUDES)
59 # ----------------------------------------------------------------
60 # _gnuradio_swig_python contains all the glue that implements
61 # the gnuradio.gr python package
63 grgrlib_LTLIBRARIES = \
64 _gnuradio_swig_python.la
66 _gnuradio_swig_python_la_SOURCES = \
67 gnuradio_swig_python.cc
70 _gnuradio_swig_python_la_LIBADD = \
75 _gnuradio_swig_python_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
78 # KLUDGE: Force runtime include of gnuradio_swig_python.d dependency file.
79 # This is not guaranteed to be portable, but will probably work.
80 # If it works, we have accurate dependencies for our swig stuff, which is good.
81 @am__include@ @am__quote@./gnuradio_swig_python.d@am__quote@
83 gnuradio_swig_python.py gnuradio_swig_python.h: gnuradio_swig_python.cc
85 gnuradio_swig_python.cc : gnuradio.i
86 if $(SWIG) $(SWIGPYTHONARGS) -MMD -MF gnuradio_swig_python.Td -module gnuradio_swig_python -o gnuradio_swig_python.cc gnuradio.i ;\
87 then if test $(host_os) = mingw32; \
88 then sed 's,\\\\,/,g' <gnuradio_swig_python.Td >gnuradio_swig_python.d; rm -f gnuradio_swig_python.Td; \
89 else mv -f gnuradio_swig_python.Td gnuradio_swig_python.d; fi \
90 else rm -f gnuradio_swig_python.Td; exit 1; fi
93 gnuradio_swig_bug_workaround.h : gnuradio_swig_python.cc $(srcdir)/gen-swig-bug-fix
94 $(PYTHON) $(srcdir)/gen-swig-bug-fix gnuradio_swig_python.cc $@
97 # ----------------------------------------------------------------
99 # Don't distribute output of swig
101 @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done
102 @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
105 grinclude_HEADERS = \
106 gnuradio_swig_bug_workaround.h
108 swiginclude_HEADERS = \
112 $(BUILT_SOURCES) *~ *.pyc
114 DISTCLEANFILES = gnuradio_swig_python.d