#
-# Copyright 2006 Free Software Foundation, Inc.
+# Copyright 2006,2008,2009,2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio.
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
+# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
include $(top_srcdir)/Makefile.common
-# Install this stuff so that it ends up as the gnuradio.audio_osx 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 = \
- $(top_srcdir)/gr-audio-osx/src/audio_osx.i
-NON_LOCAL_IFILES = \
- $(GNURADIO_I)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
-ALL_IFILES = \
- $(LOCAL_IFILES) \
- $(NON_LOCAL_IFILES)
-
-BUILT_SOURCES = \
- audio_osx.cc \
- audio_osx.py
-
-ourpython_PYTHON = \
- audio_osx.py
+# C/C++ headers get installed in ${prefix}/include/gnuradio
+grinclude_HEADERS = \
+ audio_osx_sink.h \
+ audio_osx_source.h
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS)
+noinst_HEADERS = \
+ audio_osx.h \
+ circular_buffer.h
-SWIGCPPPYTHONARGS = -python $(PYTHON_CPPFLAGS) $(STD_DEFINES_AND_INCLUDES)
+noinst_PYTHON = \
+ qa_osx.py \
+ test_audio_loop.py
-ourlib_LTLIBRARIES = _audio_osx.la
+lib_LTLIBRARIES = libgnuradio-audio-osx.la
-_audio_osx_la_SOURCES = \
- audio_osx.cc \
+libgnuradio_audio_osx_la_SOURCES = \
audio_osx_sink.cc \
- audio_osx_source.cc
+ audio_osx_source.cc
-noinst_HEADERS = \
- audio_osx.h \
- circular_buffer.h \
- mld_threads.h
+libgnuradio_audio_osx_la_LIBADD = \
+ $(GNURADIO_CORE_LA)
-grinclude_HEADERS = \
- audio_osx_sink.h \
- audio_osx_source.h
-
-swiginclude_HEADERS = \
- $(LOCAL_IFILES)
+libgnuradio_audio_osx_la_LDFLAGS = \
+ -framework AudioUnit \
+ -framework CoreAudio \
+ -framework AudioToolbox \
+ $(NO_UNDEFINED) \
+ $(LTVERSIONFLAGS)
-_audio_osx_la_LIBADD = \
- $(PYTHON_LDFLAGS) \
- $(GNURADIO_CORE_LA) \
- -lstdc++
+if PYTHON
+###################################
+# SWIG Python interface and library
+TESTS = run_tests
+DISTCLEANFILES = run_tests
-_audio_osx_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version -framework AudioUnit -framework CoreAudio -framework AudioToolbox
+TOP_SWIG_IFILES = \
+ audio_osx.i
-audio_osx.cc audio_osx.py: $(ALL_IFILES)
- $(SWIG) $(SWIGCPPPYTHONARGS) -module audio_osx -o audio_osx.cc $(LOCAL_IFILES)
+# Install so that they end up available as:
+# import gnuradio.audio_osx
+# This ends up at:
+# ${prefix}/lib/python${python_version}/site-packages/gnuradio
+audio_osx_pythondir_category = \
+ gnuradio
-noinst_PYTHON = qa_osx.py test_audio_loop.py
+# additional libraries for linking with the SWIG-generated library
+audio_osx_la_swig_libadd = \
+ libgnuradio-audio-osx.la
-MOSTLYCLEANFILES = $(BUILT_SOURCES) *~ *.pyc run_tests *.loT
+include $(top_srcdir)/Makefile.swig
-CONFIG_CLEAN_FILES = run_tests *.loT
+# 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)
+endif