2 # Copyright 2004,2005,2006,2008,2009 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 3, 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 # ----------------------------------------------------------------------
25 # C++ block API interface librar(ies)
28 # ----------------------------------------------------------------------
30 $(STD_DEFINES_AND_INCLUDES) \
36 lib_LTLIBRARIES = libgr-usrp2.la
38 libgr_usrp2_la_SOURCES = \
42 usrp2_source_base.cc \
43 usrp2_source_16sc.cc \
44 usrp2_source_32fc.cc \
49 libgr_usrp2_la_LIBADD = \
66 # ----------------------------------------------------------------------
67 # Python SWIG wrapper around C++ library
71 # ----------------------------------------------------------------------
73 # Python installation locations
74 ourpythondir = $(grpythondir)
75 ourlibdir = $(grpyexecdir)
77 # SWIG interface files
78 LOCAL_IFILES = $(srcdir)/usrp2.i
79 NON_LOCAL_IFILES = $(GNURADIO_I)
80 ALL_IFILES = $(LOCAL_IFILES) $(NON_LOCAL_IFILES)
82 # Install the SWIG interface files
83 swiginclude_HEADERS = $(LOCAL_IFILES)
85 # Generated by SWIG wrapper generator
86 BUILT_SOURCES = usrp2.cc usrp2.py
88 # Install the SWIG python output
89 ourpython_PYTHON = usrp2.py
91 # Special swig arguments
92 LOCAL_SWIG_DEFINES_AND_INCLUDES = $(USRP2_INCLUDES)
94 # Invoke SWIG wrapper generator
95 usrp2.cc usrp2.py: $(ALL_IFILES)
96 $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module usrp2 \
97 -o usrp2.cc $(LOCAL_IFILES)
99 # Create the Python shared library
100 ourlib_LTLIBRARIES = _usrp2.la
101 _usrp2_la_SOURCES = usrp2.cc
102 _usrp2_la_CXXFLAGS = @swig_CXXFLAGS@
103 _usrp2_la_LDFLAGS = $(swig_CXXFLAGS) $(NO_UNDEFINED) -module -avoid-version
105 # Link the library as needed
109 $(GNURADIO_CORE_LA) \
113 # Don't distribute output of swig
115 @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done
116 @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
118 # ----------------------------------------------------------------------
119 # Local Python files, not installed
122 # ----------------------------------------------------------------------
124 noinst_PYTHON = qa_usrp2.py
127 # ----------------------------------------------------------------------
128 # Miscellaneous build operations
129 # ----------------------------------------------------------------------
131 EXTRA_DIST = run_tests.in
133 MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc