summaryrefslogtreecommitdiff
path: root/gr-audio-oss/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-audio-oss/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-audio-oss/src/Makefile.am')
-rw-r--r--gr-audio-oss/src/Makefile.am82
1 files changed, 30 insertions, 52 deletions
diff --git a/gr-audio-oss/src/Makefile.am b/gr-audio-oss/src/Makefile.am
index eb038a977..f83ba68ca 100644
--- a/gr-audio-oss/src/Makefile.am
+++ b/gr-audio-oss/src/Makefile.am
@@ -21,70 +21,48 @@
include $(top_srcdir)/Makefile.common
-# Install this stuff so that it ends up as the gnuradio.audio_oss module
-# This usually ends up at:
-# ${prefix}/lib/python${python_version}/site-packages/gnuradio
-
-ourpythondir = $(grpythondir)
-ourlibdir = $(grpyexecdir)
-
EXTRA_DIST = run_tests.in
-TESTS = run_tests
-LOCAL_IFILES = \
- $(srcdir)/audio_oss.i
-
-NON_LOCAL_IFILES = \
- $(GNURADIO_I)
+TESTS = run_tests
-ALL_IFILES = \
- $(LOCAL_IFILES) \
- $(NON_LOCAL_IFILES)
+DISTCLEANFILES = run_tests
-BUILT_SOURCES = \
- audio_oss.cc \
- audio_oss.py
+# C/C++ headers get installed in ${prefix}/include/gnuradio
+grinclude_HEADERS = \
+ audio_oss_sink.h \
+ audio_oss_source.h
-ourpython_PYTHON = \
- audio_oss.py
+noinst_PYTHON = qa_oss.py
AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
-ourlib_LTLIBRARIES = _audio_oss.la
+###################################
+# SWIG Python interface and library
-_audio_oss_la_SOURCES = \
- audio_oss.cc \
- audio_oss_sink.cc \
- audio_oss_source.cc
+TOP_SWIG_IFILES = \
+ audio_oss.i
-grinclude_HEADERS = \
- audio_oss_sink.h \
- audio_oss_source.h
-
-swiginclude_HEADERS = \
- $(LOCAL_IFILES)
-
-_audio_oss_la_LIBADD = \
- $(PYTHON_LDFLAGS) \
- $(GNURADIO_CORE_LA) \
- $(OSS_LIBS) \
- -lstdc++
-
-_audio_oss_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
-
-_audio_oss_la_CXXFLAGS = @swig_CXXFLAGS@
+# Install so that they end up available as:
+# import gnuradio.audio_oss
+# This ends up at:
+# ${prefix}/lib/python${python_version}/site-packages/gnuradio
+audio_oss_pythondir_category = \
+ gnuradio
-audio_oss.cc audio_oss.py: $(ALL_IFILES)
- $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module audio_oss \
- -o audio_oss.cc $(LOCAL_IFILES)
+# additional sources for the SWIG-generated library
+audio_oss_la_swig_sources = \
+ audio_oss_sink.cc \
+ audio_oss_source.cc
-# 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
+# additional libraries for linking with the SWIG-generated library
+audio_oss_la_swig_libadd = \
+ $(GNURADIO_CORE_LA) \
+ $(OSS_LIBS)
-noinst_PYTHON = qa_oss.py
+include $(top_srcdir)/Makefile.swig
-MOSTLYCLEANFILES = \
- $(BUILT_SOURCES) *~ *.pyc
+# add some of the variables generated inside the Makefile.swig.gen
+BUILT_SOURCES = $(swig_built_sources)
+# Do not distribute the output of SWIG
+no_dist_files = $(swig_built_sources)