summaryrefslogtreecommitdiff
path: root/gr-usrp/src/Makefile.am
diff options
context:
space:
mode:
authorjcorgan2009-03-14 02:28:41 +0000
committerjcorgan2009-03-14 02:28:41 +0000
commitc3f962a1f0a4132ad643c58774bb69b190dccc49 (patch)
treedaa59a206d6fde01dc1404197e981927366af0e0 /gr-usrp/src/Makefile.am
parent4eea337c46db44a6ee7560a4552e158421776777 (diff)
downloadgnuradio-c3f962a1f0a4132ad643c58774bb69b190dccc49.tar.gz
gnuradio-c3f962a1f0a4132ad643c58774bb69b190dccc49.tar.bz2
gnuradio-c3f962a1f0a4132ad643c58774bb69b190dccc49.zip
Merged r10554:10595 from michaelld/am_swig_4 into trunk. Major overhaul of SWIG usage in build system, also fixes ticket:130. Trunk passes distcheck.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10596 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-usrp/src/Makefile.am')
-rw-r--r--gr-usrp/src/Makefile.am106
1 files changed, 43 insertions, 63 deletions
diff --git a/gr-usrp/src/Makefile.am b/gr-usrp/src/Makefile.am
index 7b897ea08..9b8737d71 100644
--- a/gr-usrp/src/Makefile.am
+++ b/gr-usrp/src/Makefile.am
@@ -22,6 +22,17 @@
include $(top_srcdir)/Makefile.common
# ----------------------------------------------------------------
+# Misc. build/installation activities
+
+EXTRA_DIST = run_tests.in
+
+TESTS = run_tests
+
+DISTCLEANFILES = run_tests
+
+noinst_PYTHON = qa_usrp.py
+
+# ----------------------------------------------------------------
# The straight C++ library
AM_CPPFLAGS = \
@@ -58,76 +69,45 @@ grinclude_HEADERS = \
usrp_source_s.h
# ----------------------------------------------------------------
-# The SWIG library and Python modules
-#
-# Install this stuff so that it ends up as the gnuradio.usrp module
-# This usually ends up at:
-# ${prefix}/lib/python${python_version}/site-packages/gnuradio/usrp
-
-ourpythondir = $(grpythondir)/usrp
-ourlibdir = $(grpyexecdir)/usrp
-
-BUILT_SOURCES = \
- usrp_swig.cc \
- usrp_swig.py
+# The SWIG library
-LOCAL_IFILES = \
- $(srcdir)/usrp.i \
- $(srcdir)/usrp_base.i \
- $(srcdir)/usrp_source_base.i \
- $(srcdir)/usrp_source_c.i \
- $(srcdir)/usrp_source_s.i \
- $(srcdir)/usrp_sink_base.i \
- $(srcdir)/usrp_sink_c.i \
- $(srcdir)/usrp_sink_s.i \
- $(srcdir)/usrp_standard.i
+TOP_SWIG_IFILES = \
+ usrp_swig.i
-NON_LOCAL_IFILES = \
- $(GNURADIO_I)
-
-ALL_IFILES = \
- $(LOCAL_IFILES) \
- $(NON_LOCAL_IFILES)
-
-ourlib_LTLIBRARIES = \
- _usrp_swig.la
-
-ourlib_PYTHON = \
- __init__.py \
- usrp_swig.py
+# Install so that they end up available as:
+# import gnuradio.usrp
+# This ends up at:
+# ${prefix}/lib/python${python_version}/site-packages/gnuradio/usrp
+usrp_swig_pythondir_category = \
+ gnuradio/usrp
-_usrp_swig_la_SOURCES = \
- usrp_swig.cc
+# additional arguments to the SWIG command
+usrp_swig_swig_args = \
+ $(USRP_INCLUDES)
-_usrp_swig_la_LIBADD = \
- $(PYTHON_LDFLAGS) \
+# additional libraries for linking with the SWIG-generated library
+usrp_swig_la_swig_libadd = \
libgnuradio-usrp.la
-_usrp_swig_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
-
-_usrp_swig_la_CXXFLAGS = @swig_CXXFLAGS@
-
-# Special swig arguments
-LOCAL_SWIG_DEFINES_AND_INCLUDES = $(USRP_INCLUDES)
+# additional Python files to be installed along with the SWIG-generated one
+usrp_swig_python = \
+ __init__.py
-usrp_swig.cc usrp_swig.py: $(ALL_IFILES)
- $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module usrp_swig \
- -o usrp_swig.cc $(srcdir)/usrp.i
+# additional SWIG files to be installed
+usrp_swig_swiginclude_headers = \
+ usrp_base.i \
+ usrp_source_base.i \
+ usrp_source_c.i \
+ usrp_source_s.i \
+ usrp_sink_base.i \
+ usrp_sink_c.i \
+ usrp_sink_s.i \
+ usrp_standard.i
-noinst_PYTHON = \
- qa_usrp.py
+include $(top_srcdir)/Makefile.swig
-swiginclude_HEADERS = \
- $(LOCAL_IFILES)
+# add some of the variables generated inside the Makefile.swig.gen
+BUILT_SOURCES = $(swig_built_sources)
-# Don't distribute output of swig
-dist-hook:
- @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done
- @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
-
-# ----------------------------------------------------------------
-# Misc. build/installation activities
-
-MOSTLYCLEANFILES = $(BUILT_SOURCES) *~ *.pyc
-EXTRA_DIST = run_tests.in
-TESTS = run_tests
+# Do not distribute the output of SWIG
+no_dist_files = $(swig_built_sources)