2 # Copyright 2004,2005,2006,2008 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 = \
41 usrp2_source_base.cc \
42 usrp2_source_16sc.cc \
44 # usrp2_source_16sc.cc
49 libgr_usrp2_la_LIBADD = \
65 # ----------------------------------------------------------------------
66 # Python SWIG wrapper around C++ library
70 # ----------------------------------------------------------------------
72 # Python installation locations
73 ourpythondir = $(grpythondir)
74 ourlibdir = $(grpyexecdir)
76 # SWIG interface files
77 LOCAL_IFILES = $(srcdir)/usrp2.i
78 NON_LOCAL_IFILES = $(GNURADIO_I)
79 ALL_IFILES = $(LOCAL_IFILES) $(NON_LOCAL_IFILES)
81 # Install the SWIG interface files
82 swiginclude_HEADERS = $(LOCAL_IFILES)
84 # Generated by SWIG wrapper generator
85 BUILT_SOURCES = usrp2.cc usrp2.py
87 # Install the SWIG python output
88 ourpython_PYTHON = usrp2.py
90 # Arguments to the swig wrapper generator
92 $(STD_DEFINES_AND_INCLUDES) \
98 # Invoke SWIG wrapper generator
99 usrp2.cc usrp2.py: $(ALL_IFILES)
100 $(SWIG) $(SWIGPYTHONARGS) -module usrp2 -o usrp2.cc $(LOCAL_IFILES)
102 # Create the Python shared library
103 ourlib_LTLIBRARIES = _usrp2.la
104 _usrp2_la_SOURCES = usrp2.cc
105 _usrp2_la_CXXFLAGS = @swig_CXXFLAGS@
106 _usrp2_la_LDFLAGS = $(swig_CXXFLAGS) $(NO_UNDEFINED) -module -avoid-version
108 # Link the library as needed
112 $(GNURADIO_CORE_LA) \
116 # Don't distribute output of swig
118 @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done
119 @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
121 # ----------------------------------------------------------------------
122 # Local Python files, not installed
125 # ----------------------------------------------------------------------
127 noinst_PYTHON = qa_usrp2.py
130 # ----------------------------------------------------------------------
131 # Miscellaneous build operations
132 # ----------------------------------------------------------------------
134 EXTRA_DIST = run_tests.in
136 MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc