#
-# Copyright 2004,2005,2006 Free Software Foundation, Inc.
+# Copyright 2004,2005,2006,2008,2009 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,
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
#
include $(top_srcdir)/Makefile.common
-# Install this stuff so that it ends up as the gnuradio.video_sdl 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 = \
- video_sdl.i
-NON_LOCAL_IFILES = \
- $(GNURADIO_I)
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(SDL_CFLAGS) \
+ $(WITH_INCLUDES)
-ALL_IFILES = \
- $(LOCAL_IFILES) \
- $(NON_LOCAL_IFILES)
+noinst_PYTHON = \
+ qa_video_sdl.py
-BUILT_SOURCES = \
- video_sdl.cc \
- video_sdl.py
-
-ourpython_PYTHON = \
- video_sdl.py
-
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(SDL_CFLAGS)
-
-SWIGCPPPYTHONARGS = -fvirtual -python -modern $(PYTHON_CPPFLAGS) $(STD_DEFINES_AND_INCLUDES)
+grinclude_HEADERS = \
+ video_sdl_sink_uc.h \
+ video_sdl_sink_s.h
-ourlib_LTLIBRARIES = _video_sdl.la
+lib_LTLIBRARIES = libgnuradio-video-sdl.la
-_video_sdl_la_SOURCES = \
- video_sdl.cc \
+libgnuradio_video_sdl_la_SOURCES = \
video_sdl_sink_uc.cc \
video_sdl_sink_s.cc
+libgnuradio_video_sdl_la_LIBADD = \
+ $(SDL_LIBS) \
+ $(GNURADIO_CORE_LA)
-grinclude_HEADERS = \
- video_sdl_sink_uc.h \
- video_sdl_sink_s.h
-
-swiginclude_HEADERS = \
- $(LOCAL_IFILES)
+libgnuradio_video_sdl_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS)
-_video_sdl_la_LIBADD = \
- $(PYTHON_LDFLAGS) \
- $(GNURADIO_CORE_LIBS) \
- $(SDL_LIBS) \
- -lstdc++
+if PYTHON
+#################################
+# SWIG interface and library
+TESTS = run_tests
+DISTCLEANFILES = run_tests
-_video_sdl_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+TOP_SWIG_IFILES = \
+ video_sdl.i
-video_sdl.cc video_sdl.py: video_sdl.i
- $(SWIG) $(SWIGCPPPYTHONARGS) -module video_sdl -o video_sdl.cc $<
+# Install so that they end up available as:
+# import gnuradio.video_sdl
+# This ends up at:
+# ${prefix}/lib/python${python_version}/site-packages/gnuradio
+video_sdl_pythondir_category = \
+ gnuradio
+# additional libraries for linking with the SWIG-generated library
+video_sdl_la_swig_libadd = \
+ libgnuradio-video-sdl.la
-noinst_PYTHON = qa_video_sdl.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)
+endif