switch source package format to 3.0 quilt
[debian/gnuradio] / gr-comedi / src / Makefile.am
index 3311cd569e499be702a106687a44a9cc409871e3..a55bd175b9d6daf85bf79efe8a9d0f113a386af8 100644 (file)
@@ -1,11 +1,11 @@
 #
-# Copyright 2005 Free Software Foundation, Inc.
+# Copyright 2005,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.comedi 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 =                                 \
-       comedi.i                                
-
-NON_LOCAL_IFILES =                     \
-       $(top_srcdir)/gnuradio-core/src/lib/swig/gnuradio.i
-
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 \
-       $(NON_LOCAL_IFILES)             
-
-BUILT_SOURCES =                        \
-       comedi.cc                       \
-       comedi.py                               
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
-ourpython_PYTHON =                     \
-       comedi.py
+# C/C++ headers get installed in ${prefix}/include/gnuradio
+grinclude_HEADERS =            \
+       comedi_sink_s.h         \
+       comedi_source_s.h
 
-INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS)
+noinst_HEADERS =               \
+       gri_comedi.h
 
-SWIGCPPPYTHONARGS = -c++ -python $(PYTHON_CPPFLAGS) $(STD_DEFINES_AND_INCLUDES)
-#      -I$(swigincludedir) $(S-I$(grincludedir) -I$(comediincludedir)
+noinst_PYTHON =                        \
+       qa_comedi.py
 
-ourlib_LTLIBRARIES = _comedi.la
+lib_LTLIBRARIES = libgnuradio-comedi.la
 
-_comedi_la_SOURCES =           \
-       comedi.cc               \
+libgnuradio_comedi_la_SOURCES = \
        comedi_sink_s.cc        \
        comedi_source_s.cc      \
-       gri_comedi.cc                   
+       gri_comedi.cc
 
-grinclude_HEADERS =            \
-       comedi_sink_s.h         \
-       comedi_source_s.h               
+libgnuradio_comedi_la_LIBADD = \
+       $(GNURADIO_CORE_LA)     \
+       $(COMEDI_LIBS)
 
-noinst_HEADERS =               \
-       gri_comedi.h                    
+libgnuradio_comedi_la_LDFLAGS =        $(NO_UNDEFINED) $(LTVERSIONFLAGS)
 
+if PYTHON
+###################################
+# SWIG Python interface and library
+TESTS = run_tests
+DISTCLEANFILES = run_tests
 
-swiginclude_HEADERS =          \
-       $(LOCAL_IFILES)
-
-_comedi_la_LIBADD =            \
-       $(PYTHON_LDFLAGS)       \
-       $(GNURADIO_CORE_LIBS)   \
-       -lstdc++                                
+TOP_SWIG_IFILES =              \
+       comedi.i
 
-_comedi_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+# Install so that they end up available as:
+#   import gnuradio.comedi
+# This ends up at:
+#   ${prefix}/lib/python${python_version}/site-packages/gnuradio
+comedi_pythondir_category =    \
+       gnuradio
 
-comedi.cc comedi.py: comedi.i
-       $(SWIG) $(SWIGCPPPYTHONARGS) -module comedi -o comedi.cc $<
+# additional libraries for linking with the SWIG-generated library
+comedi_la_swig_libadd =                \
+       libgnuradio-comedi.la
 
+include $(top_srcdir)/Makefile.swig
 
-noinst_PYTHON =                \
-       qa_comedi.py                    
+# add some of the variables generated inside the Makefile.swig.gen
+BUILT_SOURCES = $(swig_built_sources)
 
-MOSTLYCLEANFILES = \
-       $(BUILT_SOURCES) *~ *.pyc
+# Do not distribute the output of SWIG
+no_dist_files = $(swig_built_sources)
+endif