commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r11542 - in gnuradio/trunk/gr-howto-write-a-block: con


From: jcorgan
Subject: [Commit-gnuradio] r11542 - in gnuradio/trunk/gr-howto-write-a-block: config src src/lib
Date: Thu, 6 Aug 2009 17:21:41 -0600 (MDT)

Author: jcorgan
Date: 2009-08-06 17:21:40 -0600 (Thu, 06 Aug 2009)
New Revision: 11542

Modified:
   gnuradio/trunk/gr-howto-write-a-block/config/gr_standalone.m4
   gnuradio/trunk/gr-howto-write-a-block/src/Makefile.am
   gnuradio/trunk/gr-howto-write-a-block/src/lib/Makefile.am
Log:
howto: adds --disable-python option to gr-howto-write-a-block example.

Signed-off-by: Johnathan Corgan <address@hidden>

Modified: gnuradio/trunk/gr-howto-write-a-block/config/gr_standalone.m4
===================================================================
--- gnuradio/trunk/gr-howto-write-a-block/config/gr_standalone.m4       
2009-08-06 23:21:38 UTC (rev 11541)
+++ gnuradio/trunk/gr-howto-write-a-block/config/gr_standalone.m4       
2009-08-06 23:21:40 UTC (rev 11542)
@@ -116,4 +116,18 @@
 
   PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core >= 3)
   LIBS="$LIBS $GNURADIO_CORE_LIBS"
+
+  dnl Allow user to choose whether to generate SWIG/Python 
+  dnl Default is enabled
+  AC_ARG_ENABLE([python],
+    [AS_HELP_STRING([--enable-python],
+      [generate SWIG/Python components (default is yes)])],
+    [case "${enableval}" in
+       yes) enable_python=yes ;;
+       no) enable_python=no ;;
+       *) AC_MSG_ERROR([bad value ${enableval} for --enable-python]) ;;
+     esac],
+    [enable_python=yes]  
+  )
+  AM_CONDITIONAL([PYTHON], [test x$enable_python = xyes])
 ])

Modified: gnuradio/trunk/gr-howto-write-a-block/src/Makefile.am
===================================================================
--- gnuradio/trunk/gr-howto-write-a-block/src/Makefile.am       2009-08-06 
23:21:38 UTC (rev 11541)
+++ gnuradio/trunk/gr-howto-write-a-block/src/Makefile.am       2009-08-06 
23:21:40 UTC (rev 11542)
@@ -1,5 +1,5 @@
 #
-# Copyright 2004 Free Software Foundation, Inc.
+# Copyright 2004,2009 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -19,4 +19,8 @@
 # Boston, MA 02110-1301, USA.
 # 
 
-SUBDIRS = lib python
+SUBDIRS = lib
+
+if PYTHON
+SUBDIRS += python
+endif

Modified: gnuradio/trunk/gr-howto-write-a-block/src/lib/Makefile.am
===================================================================
--- gnuradio/trunk/gr-howto-write-a-block/src/lib/Makefile.am   2009-08-06 
23:21:38 UTC (rev 11541)
+++ gnuradio/trunk/gr-howto-write-a-block/src/lib/Makefile.am   2009-08-06 
23:21:40 UTC (rev 11542)
@@ -21,11 +21,27 @@
 
 include $(top_srcdir)/Makefile.common
 
+###################################
+# howto C++ library
+
 # C/C++ headers get installed in ${prefix}/include/gnuradio
 grinclude_HEADERS =            \
        howto_square_ff.h       \
        howto_square2_ff.h
 
+lib_LTLIBRARIES = libgnuradio-howto.la
+
+libgnuradio_howto_la_SOURCES =         \
+       howto_square_ff.cc      \
+       howto_square2_ff.cc
+
+libgnuradio_howto_la_LIBADD =  \
+       $(GNURADIO_CORE_LA)
+
+libgnuradio_howto_la_LDFLAGS = \
+       $(NO_UNDEFINED)
+
+if PYTHON
 ###################################
 # SWIG Python interface and library
 
@@ -39,35 +55,9 @@
 howto_pythondir_category =     \
        gnuradio
 
-# additional arguments to the SWIG command
-#howto_la_swig_args =          \
-#      -g
+howto_la_swig_libadd =         \
+       libgnuradio-howto.la
 
-# additional sources for the SWIG-generated library
-howto_la_swig_sources =        \
-       howto_square_ff.cc      \
-       howto_square2_ff.cc
-
-# additional arguments to the SWIG command
-#howto_la_swig_args =          \
-#      $(SWIG_PYTHON_ARGS)
-
-# additional libraries for linking with the SWIG-generated library
-#howto_la_swig_libadd =                \
-#      libm.dylib
-
-# additional LD flags for linking the SWIG-generated library
-#howto_la_swig_ldflags =       \
-#      -L/opt/local/bin
-
-# additional Python files to be installed along with the SWIG-generated one
-#howto_python =                        \
-#      __init__.py
-
-# additional SWIG files to be installed
-#howto_swiginclude_headers =   \
-#      nothing.i
-
 include $(top_srcdir)/Makefile.swig
 
 # add some of the variables generated inside the Makefile.swig.gen
@@ -75,3 +65,4 @@
 
 # Do not distribute the output of SWIG
 no_dist_files = $(swig_built_sources)
+endif





reply via email to

[Prev in Thread] Current Thread [Next in Thread]