Merged r10554:10595 from michaelld/am_swig_4 into trunk. Major overhaul of SWIG...
[debian/gnuradio] / gr-gcell / src / Makefile.am
index 4ed607c55dd5f07b317a1afe33e78a253e63ee42..83dc30f45789a9710515da88affbe4fd80b055b1 100644 (file)
@@ -23,20 +23,20 @@ include $(top_srcdir)/Makefile.common
 SUBDIRS = . examples
 
 EXTRA_DIST = run_tests.in
-TESTS = run_tests
-
-
-# Install the python portion so that it ends up as the gnuradio.gcell module
-#   ${prefix}/lib/python${python_version}/site-packages/gnuradio
 
-ourpythondir = $(grpythondir)
-ourlibdir    = $(grpyexecdir)
+TESTS = run_tests
 
 AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(GCELL_INCLUDES) \
        $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
 
-# Special swig arguments
-LOCAL_SWIG_DEFINES_AND_INCLUDES = $(GCELL_INCLUDES)
+# ----------------------------------------------------------------
+
+noinst_PYTHON =  \
+       qa_fft.py
+
+DISTCLEANFILES = \
+       gcell.d \
+       run_tests
 
 # ----------------------------------------------------------------
 #                        The C++ blocks
@@ -48,6 +48,7 @@ lib_LTLIBRARIES = libgr_gcell.la
 libgr_gcell_la_SOURCES = \
        gcell_fft_vcc.cc
 
+# C/C++ headers get installed in ${prefix}/include/gnuradio
 grinclude_HEADERS = \
        gcell_fft_vcc.h
 
@@ -57,80 +58,37 @@ libgr_gcell_la_LIBADD = \
 
 libgr_gcell_la_LDFLAGS = $(NO_UNDEFINED)
 
-
 # ----------------------------------------------------------------
 #                         SWIG stuff
 # ----------------------------------------------------------------
 
-# the library for the swig interface
-ourlib_LTLIBRARIES = _gcell.la
-
-LOCAL_IFILES = \
-       $(srcdir)/gc_job_manager.i \
-       $(srcdir)/gcell.i \
-       $(srcdir)/gcell_fft_vcc.i
-
-NON_LOCAL_IFILES = \
-       $(GNURADIO_I)
-
-ALL_IFILES = \
-       $(LOCAL_IFILES) \
-       $(NON_LOCAL_IFILES)
+TOP_SWIG_IFILES =              \
+       gcell.i
 
-swig_built_sources = \
-       gcell.cc \
-       gcell.py
-
-ourpython_PYTHON = \
-       gcell.py
-
-_gcell_la_SOURCES = \
-       gcell.cc
-
-_gcell_la_LIBADD = \
-       $(PYTHON_LDFLAGS) \
-       libgr_gcell.la \
-       -lstdc++
-
-_gcell_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
-
-_gcell_la_CXXFLAGS = @swig_CXXFLAGS@
-
-swiginclude_HEADERS = \
-       $(LOCAL_IFILES)
-
-#gcell.cc gcell.py: $(ALL_IFILES)
-#      $(SWIG) $(STD_SWIG_PYTHON_ARGS) -module gcell \
-#              -o gcell.cc $(LOCAL_IFILES)
-
-# KLUDGE: Force runtime include of gcell.d dependency file.
-# This is not guaranteed to be portable, but will probably work.
-# If it works, we have accurate dependencies for our swig stuff, which is good.
-@am__include@ @am__quote@./gcell.d@am__quote@
+# Install so that they end up available as:
+#   import gnuradio.gcell
+# This ends up at:
+#   ${prefix}/lib/python${python_version}/site-packages/gnuradio
+gcell_pythondir_category =     \
+       gnuradio
 
-gcell.py gcell.h: gcell.cc
+# additional arguments to the SWIG command
+gcell_swig_args =              \
+       $(GCELL_INCLUDES)
 
-gcell.cc : $(srcdir)/gcell.i $(GNURADIO_I)
-       if $(SWIG) $(STD_SWIG_PYTHON_ARGS) -MMD -MF gcell.Td -module gcell \
-               -o gcell.cc $(srcdir)/gcell.i ;\
-       then if test $(host_os) = mingw32; \
-            then sed 's,\\\\,/,g' <gcell.Td >gcell.d; rm -f gcell.Td; \
-            else mv -f gcell.Td gcell.d; fi \
-       else rm -f gcell.Td; exit 1; fi 
+# additional libraries for linking with the SWIG-generated library
+gcell_la_swig_libadd =         \
+       libgr_gcell.la
 
+# additional SWIG files to be installed
+gcell_swiginclude_headers =    \
+       gc_job_manager.i        \
+       gcell_fft_vcc.i
 
-noinst_PYTHON =  \
-       qa_fft.py
+include $(top_srcdir)/Makefile.swig
 
-# ----------------------------------------------------------------
+# add some of the variables generated inside the Makefile.swig.gen
+BUILT_SOURCES = $(swig_built_sources)
 
-MOSTLYCLEANFILES =  \
-       $(swig_built_sources) *~ *.pyc
-
-# Don't distribute output of swig
-dist-hook:
-       @for file in $(swig_built_sources); do echo $(RM) $(distdir)/$$file; done
-       @for file in $(swig_built_sources); do $(RM) $(distdir)/$$file; done
-
-DISTCLEANFILES = \
-       gcell.d
+# Do not distribute the output of SWIG
+no_dist_files = $(swig_built_sources)