diff options
author | jcorgan | 2009-03-14 02:28:41 +0000 |
---|---|---|
committer | jcorgan | 2009-03-14 02:28:41 +0000 |
commit | c3f962a1f0a4132ad643c58774bb69b190dccc49 (patch) | |
tree | daa59a206d6fde01dc1404197e981927366af0e0 /gr-usrp2/src/Makefile.am | |
parent | 4eea337c46db44a6ee7560a4552e158421776777 (diff) | |
download | gnuradio-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-usrp2/src/Makefile.am')
-rw-r--r-- | gr-usrp2/src/Makefile.am | 90 |
1 files changed, 35 insertions, 55 deletions
diff --git a/gr-usrp2/src/Makefile.am b/gr-usrp2/src/Makefile.am index 90796ceae..bd9034f1a 100644 --- a/gr-usrp2/src/Makefile.am +++ b/gr-usrp2/src/Makefile.am @@ -22,6 +22,22 @@ include $(top_srcdir)/Makefile.common # ---------------------------------------------------------------------- +# Local Python files, not installed +# +# qa_usrp2.py +# ---------------------------------------------------------------------- + +noinst_PYTHON = qa_usrp2.py + +# ---------------------------------------------------------------------- +# Miscellaneous build operations +# ---------------------------------------------------------------------- + +EXTRA_DIST = run_tests.in +TESTS = run_tests +DISTCLEANFILES = run_tests + +# ---------------------------------------------------------------------- # C++ block API interface librar(ies) # # libgr-usrp.so @@ -70,64 +86,28 @@ noinst_HEADERS = \ # _usrp2.so # ---------------------------------------------------------------------- -# Python installation locations -ourpythondir = $(grpythondir) -ourlibdir = $(grpyexecdir) - -# SWIG interface files -LOCAL_IFILES = $(srcdir)/usrp2.i -NON_LOCAL_IFILES = $(GNURADIO_I) -ALL_IFILES = $(LOCAL_IFILES) $(NON_LOCAL_IFILES) - -# Install the SWIG interface files -swiginclude_HEADERS = $(LOCAL_IFILES) +TOP_SWIG_IFILES = \ + usrp2.i -# Generated by SWIG wrapper generator -BUILT_SOURCES = usrp2.cc usrp2.py +# Install so that they end up available as: +# import gnuradio.usrp2 +# This ends up at: +# ${prefix}/lib/python${python_version}/site-packages/gnuradio +usrp2_pythondir_category = \ + gnuradio -# Install the SWIG python output -ourpython_PYTHON = usrp2.py +# additional arguments to the SWIG command +usrp2_swig_args = \ + $(USRP2_INCLUDES) -# Special swig arguments -LOCAL_SWIG_DEFINES_AND_INCLUDES = $(USRP2_INCLUDES) +# additional libraries for linking with the SWIG-generated library +usrp2_la_swig_libadd = \ + libgr-usrp2.la -# Invoke SWIG wrapper generator -usrp2.cc usrp2.py: $(ALL_IFILES) - $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module usrp2 \ - -o usrp2.cc $(LOCAL_IFILES) +include $(top_srcdir)/Makefile.swig -# Create the Python shared library -ourlib_LTLIBRARIES = _usrp2.la -_usrp2_la_SOURCES = usrp2.cc -_usrp2_la_CXXFLAGS = @swig_CXXFLAGS@ -_usrp2_la_LDFLAGS = $(swig_CXXFLAGS) $(NO_UNDEFINED) -module -avoid-version +# add some of the variables generated inside the Makefile.swig.gen +BUILT_SOURCES = $(swig_built_sources) -# Link the library as needed -_usrp2_la_LIBADD = \ - $(PYTHON_LDFLAGS) \ - libgr-usrp2.la \ - $(GNURADIO_CORE_LA) \ - $(USRP2_LIBS) \ - -lstdc++ - -# 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 - -# ---------------------------------------------------------------------- -# Local Python files, not installed -# -# qa_usrp2.py -# ---------------------------------------------------------------------- - -noinst_PYTHON = qa_usrp2.py - - -# ---------------------------------------------------------------------- -# Miscellaneous build operations -# ---------------------------------------------------------------------- - -EXTRA_DIST = run_tests.in -TESTS = run_tests -MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc +# Do not distribute the output of SWIG +no_dist_files = $(swig_built_sources) |