summaryrefslogtreecommitdiff
path: root/gr-audio-portaudio/src/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'gr-audio-portaudio/src/Makefile.am')
-rw-r--r--gr-audio-portaudio/src/Makefile.am80
1 files changed, 29 insertions, 51 deletions
diff --git a/gr-audio-portaudio/src/Makefile.am b/gr-audio-portaudio/src/Makefile.am
index 314ed72a8..4b44807d8 100644
--- a/gr-audio-portaudio/src/Makefile.am
+++ b/gr-audio-portaudio/src/Makefile.am
@@ -21,45 +21,16 @@
include $(top_srcdir)/Makefile.common
-# Install this stuff so that it ends up as the gnuradio.audio_portaudio 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_portaudio.i
-
-NON_LOCAL_IFILES = \
- $(GNURADIO_I)
-
-ALL_IFILES = \
- $(LOCAL_IFILES) \
- $(NON_LOCAL_IFILES)
-
-BUILT_SOURCES = \
- audio_portaudio.cc \
- audio_portaudio.py
-
-ourpython_PYTHON = \
- audio_portaudio.py
+DISTCLEANFILES = run_tests
AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \
$(PORTAUDIO_CFLAGS) $(WITH_INCLUDES)
-ourlib_LTLIBRARIES = _audio_portaudio.la
-
-_audio_portaudio_la_SOURCES = \
- audio_portaudio.cc \
- audio_portaudio_sink.cc \
- audio_portaudio_source.cc \
- gri_portaudio.cc
-
+# C/C++ headers get installed in ${prefix}/include/gnuradio
grinclude_HEADERS = \
audio_portaudio_sink.h \
audio_portaudio_source.h
@@ -67,30 +38,37 @@ grinclude_HEADERS = \
noinst_HEADERS = \
gri_portaudio.h
-swiginclude_HEADERS = \
- $(LOCAL_IFILES)
+noinst_PYTHON = \
+ qa_portaudio.py
-_audio_portaudio_la_LIBADD = \
- $(PYTHON_LDFLAGS) \
- $(GNURADIO_CORE_LA) \
- $(PORTAUDIO_LIBS) \
- -lstdc++
+###################################
+# SWIG Python interface and library
-_audio_portaudio_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+TOP_SWIG_IFILES = \
+ audio_portaudio.i
+
+# Install so that they end up available as:
+# import gnuradio.audio_portaudio
+# This ends up at:
+# ${prefix}/lib/python${python_version}/site-packages/gnuradio
+audio_portaudio_pythondir_category = \
+ gnuradio
-_audio_portaudio_la_CXXFLAGS = @swig_CXXFLAGS@
+# additional sources for the SWIG-generated library
+audio_portaudio_la_swig_sources = \
+ audio_portaudio_sink.cc \
+ audio_portaudio_source.cc \
+ gri_portaudio.cc
-audio_portaudio.cc audio_portaudio.py: $(ALL_IFILES) audio_portaudio_sink.h audio_portaudio_source.h
- $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module audio_portaudio \
- -o audio_portaudio.cc $(LOCAL_IFILES)
+# additional libraries for linking with the SWIG-generated library
+audio_portaudio_la_swig_libadd = \
+ $(GNURADIO_CORE_LA) \
+ $(PORTAUDIO_LIBS)
-noinst_PYTHON = \
- qa_portaudio.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)
-# 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
+# Do not distribute the output of SWIG
+no_dist_files = $(swig_built_sources)