summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnathan Corgan2009-11-03 14:24:43 -0800
committerJohnathan Corgan2009-11-03 14:24:43 -0800
commit0bde79ebad973abdcfa23b4d50261fcee39cc28e (patch)
tree1bcc8ed9a899688afe3afdc93e9bcca87a7047b1
parent3e366411a75b47eff5f76c76beb1f3a47006f6c7 (diff)
parent26d9beb0b51945915798e75ab24051adaa46d083 (diff)
downloadgnuradio-0bde79ebad973abdcfa23b4d50261fcee39cc28e.tar.gz
gnuradio-0bde79ebad973abdcfa23b4d50261fcee39cc28e.tar.bz2
gnuradio-0bde79ebad973abdcfa23b4d50261fcee39cc28e.zip
Merge branch 'wip/howto' of git@gnuradio.org:jcorgan
* 'wip/howto' of git@gnuradio.org:jcorgan: howto: moved osbsolete docs directory into limbo howto: make swig directory use individual .i files howto: reorganized directory structure howto: implement dynamic versioning howto: update m4 files to match latest master howto: updated INSTALL, fixed mode of config.*
-rw-r--r--gr-howto-write-a-block/INSTALL94
-rw-r--r--gr-howto-write-a-block/Makefile.am14
-rwxr-xr-x[-rw-r--r--]gr-howto-write-a-block/config.guess0
-rwxr-xr-x[-rw-r--r--]gr-howto-write-a-block/config.sub0
-rw-r--r--gr-howto-write-a-block/config/Makefile.am2
-rw-r--r--gr-howto-write-a-block/config/gr_fortran.m41
-rw-r--r--gr-howto-write-a-block/config/gr_git.m435
-rw-r--r--gr-howto-write-a-block/config/gr_pwin32.m43
-rw-r--r--gr-howto-write-a-block/config/gr_python.m444
-rw-r--r--gr-howto-write-a-block/config/gr_set_md_cpu.m481
-rw-r--r--gr-howto-write-a-block/config/gr_standalone.m46
-rw-r--r--gr-howto-write-a-block/config/gr_version.m474
-rw-r--r--gr-howto-write-a-block/config/lf_warnings.m447
-rw-r--r--gr-howto-write-a-block/config/usrp_fusb_tech.m415
-rw-r--r--gr-howto-write-a-block/configure.ac25
-rw-r--r--gr-howto-write-a-block/lib/.gitignore (renamed from gr-howto-write-a-block/src/lib/.gitignore)0
-rw-r--r--gr-howto-write-a-block/lib/Makefile.am (renamed from gr-howto-write-a-block/src/Makefile.am)26
-rw-r--r--gr-howto-write-a-block/lib/howto_square2_ff.cc (renamed from gr-howto-write-a-block/src/lib/howto_square2_ff.cc)0
-rw-r--r--gr-howto-write-a-block/lib/howto_square2_ff.h (renamed from gr-howto-write-a-block/src/lib/howto_square2_ff.h)0
-rw-r--r--gr-howto-write-a-block/lib/howto_square_ff.cc (renamed from gr-howto-write-a-block/src/lib/howto_square_ff.cc)0
-rw-r--r--gr-howto-write-a-block/lib/howto_square_ff.h (renamed from gr-howto-write-a-block/src/lib/howto_square_ff.h)0
-rw-r--r--gr-howto-write-a-block/limbo/doc/.gitignore (renamed from gr-howto-write-a-block/doc/.gitignore)0
-rw-r--r--gr-howto-write-a-block/limbo/doc/Makefile.am (renamed from gr-howto-write-a-block/doc/Makefile.am)2
-rw-r--r--gr-howto-write-a-block/limbo/doc/README1
-rw-r--r--gr-howto-write-a-block/limbo/doc/howto-write-a-block.xml (renamed from gr-howto-write-a-block/doc/howto-write-a-block.xml)0
-rw-r--r--gr-howto-write-a-block/limbo/doc/howto_1.i (renamed from gr-howto-write-a-block/doc/howto_1.i)0
-rwxr-xr-xgr-howto-write-a-block/limbo/doc/make_numbered_listing.py (renamed from gr-howto-write-a-block/doc/make_numbered_listing.py)0
-rwxr-xr-xgr-howto-write-a-block/limbo/doc/qa_howto_1.py (renamed from gr-howto-write-a-block/doc/qa_howto_1.py)0
-rw-r--r--gr-howto-write-a-block/limbo/doc/src_lib_Makefile_1.am (renamed from gr-howto-write-a-block/doc/src_lib_Makefile_1.am)0
-rw-r--r--gr-howto-write-a-block/limbo/doc/src_lib_Makefile_2.am (renamed from gr-howto-write-a-block/doc/src_lib_Makefile_2.am)0
-rw-r--r--gr-howto-write-a-block/python/.gitignore (renamed from gr-howto-write-a-block/src/python/.gitignore)0
-rw-r--r--gr-howto-write-a-block/python/Makefile.am (renamed from gr-howto-write-a-block/src/python/Makefile.am)0
-rwxr-xr-xgr-howto-write-a-block/python/qa_howto.py (renamed from gr-howto-write-a-block/src/python/qa_howto.py)0
-rw-r--r--gr-howto-write-a-block/python/run_tests.in (renamed from gr-howto-write-a-block/src/python/run_tests.in)12
-rw-r--r--gr-howto-write-a-block/src/lib/howto.i39
-rw-r--r--gr-howto-write-a-block/swig/.gitignore (renamed from gr-howto-write-a-block/src/.gitignore)8
-rw-r--r--gr-howto-write-a-block/swig/Makefile.am (renamed from gr-howto-write-a-block/src/lib/Makefile.am)28
-rw-r--r--gr-howto-write-a-block/swig/Makefile.swig.gen (renamed from gr-howto-write-a-block/src/lib/Makefile.swig.gen)0
-rw-r--r--gr-howto-write-a-block/swig/howto.i11
-rw-r--r--gr-howto-write-a-block/swig/howto_square2_ff.i9
-rw-r--r--gr-howto-write-a-block/swig/howto_square_ff.i16
-rw-r--r--gr-howto-write-a-block/version.sh4
42 files changed, 450 insertions, 147 deletions
diff --git a/gr-howto-write-a-block/INSTALL b/gr-howto-write-a-block/INSTALL
index d3c5b40a9..8b82ade08 100644
--- a/gr-howto-write-a-block/INSTALL
+++ b/gr-howto-write-a-block/INSTALL
@@ -2,15 +2,15 @@ Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007 Free Software Foundation, Inc.
+2006, 2007, 2008 Free Software Foundation, Inc.
-This file is free documentation; the Free Software Foundation gives
+ This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
-Briefly, the shell commands `./configure; make; make install' should
+ Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package.
@@ -73,9 +73,9 @@ The simplest way to compile this package is:
Compilers and Options
=====================
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about. Run `./configure --help' for
-details on some of the pertinent environment variables.
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
@@ -88,7 +88,7 @@ is an example:
Compiling For Multiple Architectures
====================================
-You can compile the package for more than one kind of computer at the
+ You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
@@ -100,10 +100,24 @@ architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture.
+ On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor. Like
+this:
+
+ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CPP="gcc -E" CXXCPP="g++ -E"
+
+ This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
Installation Names
==================
-By default, `make install' installs the package's commands under
+ By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
@@ -126,7 +140,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
-Some packages pay attention to `--enable-FEATURE' options to
+ Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
@@ -138,14 +152,36 @@ find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
+Particular systems
+==================
+
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+ ./configure CC="cc -Ae"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+ On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file. The option `-nodtk' can be used as
+a workaround. If GNU CC is not installed, it is therefore recommended
+to try
+
+ ./configure CC="cc"
+
+and if that doesn't work, try
+
+ ./configure CC="cc -nodtk"
+
Specifying the System Type
==========================
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
@@ -171,9 +207,9 @@ eventually be run) with `--host=TYPE'.
Sharing Defaults
================
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
@@ -182,7 +218,7 @@ A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
-Variables not defined in a site shell script can be set in the
+ Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
@@ -201,11 +237,19 @@ an Autoconf bug. Until the bug is fixed you can use this workaround:
`configure' Invocation
======================
-`configure' recognizes the following options to control how it operates.
+ `configure' recognizes the following options to control how it
+operates.
`--help'
`-h'
- Print a summary of the options to `configure', and exit.
+ Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+ Print a summary of the options unique to this package's
+ `configure', and exit. The `short' variant lists options used
+ only in the top level, while the `recursive' variant lists options
+ also present in any nested packages.
`--version'
`-V'
@@ -232,6 +276,16 @@ an Autoconf bug. Until the bug is fixed you can use this workaround:
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
+`--prefix=DIR'
+ Use DIR as the installation prefix. *Note Installation Names::
+ for more details, including other options available for fine-tuning
+ the installation locations.
+
+`--no-create'
+`-n'
+ Run the configure checks, but stop before creating any output
+ files.
+
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
diff --git a/gr-howto-write-a-block/Makefile.am b/gr-howto-write-a-block/Makefile.am
index 56307aada..ce2e4e8ca 100644
--- a/gr-howto-write-a-block/Makefile.am
+++ b/gr-howto-write-a-block/Makefile.am
@@ -23,11 +23,17 @@ ACLOCAL_AMFLAGS = -I config
include $(top_srcdir)/Makefile.common
-EXTRA_DIST = bootstrap configure config.h.in \
- Makefile.swig Makefile.swig.gen.t
+EXTRA_DIST = \
+ bootstrap \
+ configure \
+ config.h.in \
+ Makefile.swig \
+ Makefile.swig.gen.t \
+ version.sh
-SUBDIRS = config src
-DIST_SUBDIRS = config src doc
+SUBDIRS = config lib swig python
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA =
+
+DISTCLEANFILES = gr-howto-write-a-block*.tar.gz
diff --git a/gr-howto-write-a-block/config.guess b/gr-howto-write-a-block/config.guess
index f32079abd..f32079abd 100644..100755
--- a/gr-howto-write-a-block/config.guess
+++ b/gr-howto-write-a-block/config.guess
diff --git a/gr-howto-write-a-block/config.sub b/gr-howto-write-a-block/config.sub
index 6759825a5..6759825a5 100644..100755
--- a/gr-howto-write-a-block/config.sub
+++ b/gr-howto-write-a-block/config.sub
diff --git a/gr-howto-write-a-block/config/Makefile.am b/gr-howto-write-a-block/config/Makefile.am
index 5858d2219..23f4a4b16 100644
--- a/gr-howto-write-a-block/config/Makefile.am
+++ b/gr-howto-write-a-block/config/Makefile.am
@@ -49,6 +49,7 @@ m4macros = \
gr_check_usrp.m4 \
gr_doxygen.m4 \
gr_fortran.m4 \
+ gr_git.m4 \
gr_gprof.m4 \
gr_lib64.m4 \
gr_libgnuradio_core_extra_ldflags.m4 \
@@ -63,6 +64,7 @@ m4macros = \
gr_subversion.m4 \
gr_swig.m4 \
gr_sysv_shm.m4 \
+ gr_version.m4 \
lf_cc.m4 \
lf_cxx.m4 \
lf_warnings.m4 \
diff --git a/gr-howto-write-a-block/config/gr_fortran.m4 b/gr-howto-write-a-block/config/gr_fortran.m4
index b5b0470f4..033ef0307 100644
--- a/gr-howto-write-a-block/config/gr_fortran.m4
+++ b/gr-howto-write-a-block/config/gr_fortran.m4
@@ -29,4 +29,5 @@ AC_DEFUN([GR_FORTRAN],[
AC_PROG_F77
AC_F77_LIBRARY_LDFLAGS
fi
+ AC_PROG_CC dnl bug fix to restore $ac_ext
])
diff --git a/gr-howto-write-a-block/config/gr_git.m4 b/gr-howto-write-a-block/config/gr_git.m4
new file mode 100644
index 000000000..5fe424808
--- /dev/null
+++ b/gr-howto-write-a-block/config/gr_git.m4
@@ -0,0 +1,35 @@
+dnl Copyright 2009 Free Software Foundation, Inc.
+dnl
+dnl This file is part of GNU Radio
+dnl
+dnl GNU Radio is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3, or (at your option)
+dnl any later version.
+dnl
+dnl GNU Radio is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with GNU Radio; see the file COPYING. If not, write to
+dnl the Free Software Foundation, Inc., 51 Franklin Street,
+dnl Boston, MA 02110-1301, USA.
+
+
+AC_DEFUN([GR_GIT],[
+ dnl Identify git binary
+ AC_PATH_PROG([GIT],[git])
+
+ dnl If it exists, get either 'git describe' or fallback to current commit
+ if test x$GIT != x ; then
+ if (cd $srcdir && $GIT describe >/dev/null 2>&1); then
+ GIT_VERSION=`cd $srcdir && $GIT describe --abbrev=8 | cut -f 2- -d '-'`
+ else
+ if (cd $srcdir && $GIT describe --always --abbrev=8 >/dev/null 2>&1); then
+ GIT_VERSION=`cd $srcdir && $GIT describe --always --abbrev=8`
+ fi
+ fi
+ fi
+])
diff --git a/gr-howto-write-a-block/config/gr_pwin32.m4 b/gr-howto-write-a-block/config/gr_pwin32.m4
index 7b99cba6b..495e9dd4d 100644
--- a/gr-howto-write-a-block/config/gr_pwin32.m4
+++ b/gr-howto-write-a-block/config/gr_pwin32.m4
@@ -99,6 +99,9 @@ struct timespec {
long tv_nsec;
};
#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
static inline int nanosleep(const struct timespec *req, struct timespec *rem) { return usleep(req->tv_sec*1000000+req->tv_nsec/1000); }
#endif
diff --git a/gr-howto-write-a-block/config/gr_python.m4 b/gr-howto-write-a-block/config/gr_python.m4
index 6c862bba3..43ccfc015 100644
--- a/gr-howto-write-a-block/config/gr_python.m4
+++ b/gr-howto-write-a-block/config/gr_python.m4
@@ -123,6 +123,50 @@ print path
;;
esac
+ case $host_os in
+ *mingw* )
+ # Python 2.5 requires ".pyd" instead of ".dll" for extensions
+ PYTHON_LDFLAGS="-shrext .pyd ${PYTHON_LDFLAGS}"
+ esac
+
AC_SUBST(PYTHON_LDFLAGS)
fi
])
+
+# PYTHON_CHECK_MODULE
+#
+# Determines if a particular Python module can be imported
+#
+# $1 - module name
+# $2 - module description
+# $3 - action if found
+# $4 - action if not found
+# $5 - test command
+
+AC_DEFUN([PYTHON_CHECK_MODULE],[
+ AC_MSG_CHECKING([for $2])
+ dnl ########################################
+ dnl # import and test checking
+ dnl ########################################
+ if test "$5"; then
+ python_cmd='
+try:
+ import $1
+ assert $5
+except: exit(1)'
+ dnl ########################################
+ dnl # import checking only
+ dnl ########################################
+ else
+ python_cmd='
+try: import $1
+except: exit(1)'
+ fi
+ if ! $PYTHON -c "$python_cmd" 2> /dev/null; then
+ AC_MSG_RESULT([no])
+ $4
+ else
+ AC_MSG_RESULT([yes])
+ $3
+ fi
+])
diff --git a/gr-howto-write-a-block/config/gr_set_md_cpu.m4 b/gr-howto-write-a-block/config/gr_set_md_cpu.m4
index b9c570ede..7ebf88a66 100644
--- a/gr-howto-write-a-block/config/gr_set_md_cpu.m4
+++ b/gr-howto-write-a-block/config/gr_set_md_cpu.m4
@@ -1,5 +1,5 @@
dnl
-dnl Copyright 2003,2008 Free Software Foundation, Inc.
+dnl Copyright 2003,2008,2009 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
@@ -19,20 +19,89 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
dnl Boston, MA 02110-1301, USA.
dnl
+AC_DEFUN([_TRY_ADD_ALTIVEC],
+[
+ LF_CHECK_CC_FLAG([-mabi=altivec -maltivec])
+ LF_CHECK_CXX_FLAG([-mabi=altivec -maltivec])
+])
+
+AC_DEFUN([_FIND_ARM_ISA],
+[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[#ifndef __ARM_ARCH_5__
+ #error "Not armv5"
+ #endif
+ ]])],
+ [is_armv5=yes],
+ [is_armv5=no])
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[#ifndef __ARM_ARCH_7A__
+ #error "Not armv7-a"
+ #endif
+ ]])],
+ [is_armv7_a=yes],
+ [is_armv7_a=no])
+
+])
+
AC_DEFUN([GR_SET_MD_CPU],[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_ARG_WITH(md-cpu,
- [ --with-md-cpu=ARCH set machine dependent speedups (auto)],
+ AC_HELP_STRING([--with-md-cpu=ARCH],[set machine dependent speedups (auto)]),
[cf_with_md_cpu="$withval"],
- [cf_with_md_cpu="$host_cpu"])
-
- AC_MSG_CHECKING([for machine dependent speedups])
+ [
+ dnl see if the user has specified --host or --build, via 'cross_compiling'
+ if test "$cross_compiling" != no; then
+ dnl when cross-compiling, because the user specified it either via
+ dnl --target or --build, just keep the user's specs & hope for the best.
+ cf_with_md_cpu="$host_cpu"
+ else
+ dnl when the user didn't specify --target or --build, on Darwin 10
+ dnl (OSX 10.6.0 and .1) and GNU libtoool 2.2.6, 'configure' doesn't
+ dnl figure out the CPU type correctly, so do it by hand here using
+ dnl the sizeof (void*): if 4 then use i386, and otherwise use x86_64.
+ case "$host_os" in
+ *darwin*10*)
+ AC_CHECK_SIZEOF(void*)
+ if test "$ac_cv_sizeof_voidp" = 4; then
+ cf_with_md_cpu="i386"
+ else
+ cf_with_md_cpu="x86_64"
+ fi
+ ;;
+ *)
+ cf_with_md_cpu="$host_cpu"
+ ;;
+ esac
+ fi
+ ])
case "$cf_with_md_cpu" in
x86 | i[[3-7]]86) MD_CPU=x86 MD_SUBCPU=x86 ;;
x86_64) MD_CPU=x86 MD_SUBCPU=x86_64 ;;
powerpc*) MD_CPU=powerpc ;;
+ arm)
+ _FIND_ARM_ISA
+ if test $is_armv5 = yes; then MD_CPU=armv5;
+ elif test $is_armv7_a = yes; then MD_CPU=armv7_a;
+ else MD_CPU=generic; fi
+ ;;
*) MD_CPU=generic ;;
esac
+
+ AC_ARG_ENABLE(altivec,
+ AC_HELP_STRING([--enable-altivec],[enable altivec on PowerPC (yes)]),
+ [ if test $MD_CPU = powerpc; then
+ case "$enableval" in
+ (no) MD_CPU=generic ;;
+ (yes) _TRY_ADD_ALTIVEC ;;
+ (*) AC_MSG_ERROR([Invalid argument ($enableval) to --enable-altivec]) ;;
+ esac
+ fi],
+ [ if test $MD_CPU = powerpc; then _TRY_ADD_ALTIVEC fi])
+
+
+ AC_MSG_CHECKING([for machine dependent speedups])
AC_MSG_RESULT($MD_CPU)
AC_SUBST(MD_CPU)
AC_SUBST(MD_SUBCPU)
@@ -40,5 +109,7 @@ AC_DEFUN([GR_SET_MD_CPU],[
AM_CONDITIONAL(MD_CPU_x86, test "$MD_CPU" = "x86")
AM_CONDITIONAL(MD_SUBCPU_x86_64, test "$MD_SUBCPU" = "x86_64")
AM_CONDITIONAL(MD_CPU_powerpc, test "$MD_CPU" = "powerpc")
+ AM_CONDITIONAL(MD_CPU_armv5, test "$MD_CPU" = "armv5")
+ AM_CONDITIONAL(MD_CPU_armv7_a, test "$MD_CPU" = "armv7_a")
AM_CONDITIONAL(MD_CPU_generic, test "$MD_CPU" = "generic")
])
diff --git a/gr-howto-write-a-block/config/gr_standalone.m4 b/gr-howto-write-a-block/config/gr_standalone.m4
index 2f8851676..593583e2d 100644
--- a/gr-howto-write-a-block/config/gr_standalone.m4
+++ b/gr-howto-write-a-block/config/gr_standalone.m4
@@ -31,12 +31,6 @@ m4_define([GR_STANDALONE],
AC_CONFIG_SRCDIR([config/gr_standalone.m4])
AM_CONFIG_HEADER(config.h)
- AC_CANONICAL_BUILD
- AC_CANONICAL_HOST
- AC_CANONICAL_TARGET
-
- AM_INIT_AUTOMAKE
-
dnl Remember if the user explicity set CXXFLAGS
if test -n "${CXXFLAGS}"; then
user_set_cxxflags=yes
diff --git a/gr-howto-write-a-block/config/gr_version.m4 b/gr-howto-write-a-block/config/gr_version.m4
new file mode 100644
index 000000000..3360b7d54
--- /dev/null
+++ b/gr-howto-write-a-block/config/gr_version.m4
@@ -0,0 +1,74 @@
+dnl Copyright 2009 Free Software Foundation, Inc.
+dnl
+dnl This file is part of GNU Radio
+dnl
+dnl GNU Radio is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3, or (at your option)
+dnl any later version.
+dnl
+dnl GNU Radio is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with GNU Radio; see the file COPYING. If not, write to
+dnl the Free Software Foundation, Inc., 51 Franklin Street,
+dnl Boston, MA 02110-1301, USA.
+
+AC_DEFUN([GR_VERSION],[
+ dnl Computed version based on version.sh
+ dnl Does not force recompile on rev change
+ dnl
+ dnl Source the variables describing the release version
+ dnl
+ dnl MAJOR_VERSION Major release generation (2.x, 3.x, etc.)
+ dnl API_COMPAT API compatibility version (3.2.x, 3.3.x, etc.)
+ dnl MINOR_VERSION Minor release version
+ dnl MAINT_VERSION Pure bugfix additions to make maintenance release
+ dnl
+ dnl The last two fields can have 'git' instead of a number to indicate
+ dnl that this branch is between versions.
+ . $srcdir/version.sh
+ RELEASE=$MAJOR_VERSION.$API_COMPAT
+
+ dnl Get git version if available
+ GR_GIT
+
+ dnl Test if we should use git version
+ if test "$MINOR_VERSION" == "git"; then
+ dnl 3.3git-xxx-gxxxxxxxx
+ RELEASE=$RELEASE$MINOR_VERSION
+ DOCVER=$RELEASE
+ if test "$GIT_VERSION" != "" ; then
+ RELEASE=$RELEASE-$GIT_VERSION
+ fi
+ else
+ if test "$MAINT_VERSION" == "git" ; then
+ dnl 3.3.1git-xxx-gxxxxxxxx
+ RELEASE=$RELEASE.$MINOR_VERSION$MAINT_VERSION
+ DOCVER=$RELEASE
+ if test "$GIT_VERSION" != "" ; then
+ RELEASE=$RELEASE-$GIT_VERSION
+ fi
+ else
+ dnl This is a numbered reelase.
+ dnl Test if minor version is 0, which we don't encode, unless it is also
+ dnl a maintenance release
+ if test "$MINOR_VERSION" != "0" -o "$MAINT_VERSION" != "0"; then
+ dnl 3.3.1
+ RELEASE=$RELEASE.$MINOR_VERSION
+ if test "$MAINT_VERSION" != "0"; then
+ dnl 3.3.0.1, 3.3.1.1
+ RELEASE=$RELEASE.$MAINT_VERSION
+ fi
+ DOCVER=$RELEASE
+ fi
+ fi
+ fi
+
+ AC_MSG_NOTICE([GNU Radio Release $RELEASE])
+ AC_SUBST(RELEASE)
+ AC_SUBST(DOCVER)
+])
diff --git a/gr-howto-write-a-block/config/lf_warnings.m4 b/gr-howto-write-a-block/config/lf_warnings.m4
index 4e2ca9111..d40c77f14 100644
--- a/gr-howto-write-a-block/config/lf_warnings.m4
+++ b/gr-howto-write-a-block/config/lf_warnings.m4
@@ -1,4 +1,5 @@
dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu>
+dnl Copyright (C) 2009 Free Software Foundation, Inc.
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
@@ -21,7 +22,7 @@ dnl distribution terms that you use for the rest of that program.
# --------------------------------------------------------------------------
# Check whether the C++ compiler accepts a certain flag
-# If it does it adds the flag to CXXFLAGS
+# If it does it adds the flag to lf_CXXFLAGS
# If it does not then it returns an error to lf_ok
# Usage:
# LF_CHECK_CXX_FLAG(-flag1 -flag2 -flag3 ...)
@@ -34,18 +35,19 @@ AC_DEFUN([LF_CHECK_CXX_FLAG],[
AC_MSG_CHECKING([whether $CXX accepts $i])
if test -z "`${CXX} $i -c conftest.cc 2>&1`"
then
- CXXFLAGS="${CXXFLAGS} $i"
+ lf_CXXFLAGS="${lf_CXXFLAGS} $i"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
done
rm -f conftest.cc conftest.o
+ AC_SUBST(lf_CXXFLAGS)
])
# --------------------------------------------------------------------------
# Check whether the C compiler accepts a certain flag
-# If it does it adds the flag to CFLAGS
+# If it does it adds the flag to lf_CFLAGS
# If it does not then it returns an error to lf_ok
# Usage:
# LF_CHECK_CC_FLAG(-flag1 -flag2 -flag3 ...)
@@ -58,18 +60,19 @@ AC_DEFUN([LF_CHECK_CC_FLAG],[
AC_MSG_CHECKING([whether $CC accepts $i])
if test -z "`${CC} $i -c conftest.c 2>&1`"
then
- CFLAGS="${CFLAGS} $i"
+ lf_CFLAGS="${lf_CFLAGS} $i"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
done
rm -f conftest.c conftest.o
+ AC_SUBST(lf_CFLAGS)
])
# --------------------------------------------------------------------------
# Check whether the Fortran compiler accepts a certain flag
-# If it does it adds the flag to FFLAGS
+# If it does it adds the flag to lf_FFLAGS
# If it does not then it returns an error to lf_ok
# Usage:
# LF_CHECK_F77_FLAG(-flag1 -flag2 -flag3 ...)
@@ -87,42 +90,32 @@ EOF
AC_MSG_CHECKING([whether $F77 accepts $i])
if test -z "`${F77} $i -c conftest.f 2>&1`"
then
- FFLAGS="${FFLAGS} $i"
+ lf_FFLAGS="${lf_FFLAGS} $i"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
done
rm -f conftest.f conftest.o
+ AC_SUBST(lf_FFLAGS)
])
# ----------------------------------------------------------------------
-# Provide the configure script with an --with-warnings option that
-# turns on warnings. Call this command AFTER you have configured ALL your
-# compilers.
+# Enable compiler warnings.
+# Call this command AFTER you have configured ALL your compilers.
# ----------------------------------------------------------------------
AC_DEFUN([LF_SET_WARNINGS],[
- dnl Check for --with-warnings
- AC_MSG_CHECKING([whether user wants warnings])
- AC_ARG_WITH(warnings,
- [ --with-warnings Turn on warnings],
- [ lf_warnings=yes ], [ lf_warnings=no ])
- lf_warnings=yes # hard code for now -eb
- AC_MSG_RESULT($lf_warnings)
-
dnl Warnings for the two main compilers
- cc_warning_flags="-Wall"
+ dnl add -Wextra when you're got time to fix a bunch of them ;-)
+ cc_warning_flags="-Wall -Werror-implicit-function-declaration"
cxx_warning_flags="-Wall -Woverloaded-virtual"
- if test $lf_warnings = yes
+ if test -n "${CC}"
then
- if test -n "${CC}"
- then
- LF_CHECK_CC_FLAG($cc_warning_flags)
- fi
- if test -n "${CXX}"
- then
- LF_CHECK_CXX_FLAG($cxx_warning_flags)
- fi
+ LF_CHECK_CC_FLAG($cc_warning_flags)
+ fi
+ if test -n "${CXX}"
+ then
+ LF_CHECK_CXX_FLAG($cxx_warning_flags)
fi
])
diff --git a/gr-howto-write-a-block/config/usrp_fusb_tech.m4 b/gr-howto-write-a-block/config/usrp_fusb_tech.m4
index db857249b..b99cf2432 100644
--- a/gr-howto-write-a-block/config/usrp_fusb_tech.m4
+++ b/gr-howto-write-a-block/config/usrp_fusb_tech.m4
@@ -1,5 +1,5 @@
dnl
-dnl Copyright 2003,2008 Free Software Foundation, Inc.
+dnl Copyright 2003,2008,2009 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
@@ -25,6 +25,8 @@ dnl
# "" : do these tests
AC_DEFUN([USRP_SET_FUSB_TECHNIQUE],[
+ req_libusb1=no
+ USE_LIBUSB1=0
AC_ARG_WITH([fusb-tech],
AC_HELP_STRING([--with-fusb-tech=OS],
[Set fast USB technique (default=auto)]),
@@ -32,6 +34,11 @@ AC_DEFUN([USRP_SET_FUSB_TECHNIQUE],[
[cf_with_fusb_tech="$host_os"])
if test [x]$1 != xno; then
case "$cf_with_fusb_tech" in
+ libusb1*)
+ FUSB_TECH=libusb1
+ req_libusb1=yes
+ USE_LIBUSB1=1
+ ;;
linux*)
AC_CHECK_HEADER([linux/usbdevice_fs.h],
[x_have_usbdevice_fs_h=yes],
@@ -70,5 +77,11 @@ AC_DEFUN([USRP_SET_FUSB_TECHNIQUE],[
AM_CONDITIONAL(FUSB_TECH_win32, test x$FUSB_TECH = xwin32)
AM_CONDITIONAL(FUSB_TECH_generic, test x$FUSB_TECH = xgeneric)
AM_CONDITIONAL(FUSB_TECH_linux, test x$FUSB_TECH = xlinux)
+ AM_CONDITIONAL(FUSB_TECH_libusb1, test x$FUSB_TECH = xlibusb1)
AM_CONDITIONAL(FUSB_TECH_ra_wb, test x$FUSB_TECH = xra_wb)
+
+ AC_SUBST(USE_LIBUSB1)
+ AC_CONFIG_FILES([\
+ usrp/host/include/usrp/libusb_types.h \
+ ])
])
diff --git a/gr-howto-write-a-block/configure.ac b/gr-howto-write-a-block/configure.ac
index bfb431526..8241f7ec1 100644
--- a/gr-howto-write-a-block/configure.ac
+++ b/gr-howto-write-a-block/configure.ac
@@ -19,10 +19,20 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
dnl Boston, MA 02110-1301, USA.
dnl
-AC_INIT(gr-howto-write-a-block,3.3svn)
+
+AC_INIT
AC_PREREQ(2.57)
AC_CONFIG_AUX_DIR([.])
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+
+GR_VERSION
+dnl ustar required to have pathnames > 99 chars
+_AM_SET_OPTION([tar-ustar])
+AM_INIT_AUTOMAKE(gr-howto-write-a-block,$RELEASE)
+
dnl This is kind of non-standard, but it sure shortens up this file :-)
m4_include([config/gr_standalone.m4])
GR_STANDALONE
@@ -62,14 +72,15 @@ dnl AX_BOOST_WSERIALIZATION
AC_CONFIG_FILES([\
Makefile \
config/Makefile \
- doc/Makefile \
- src/Makefile \
- src/lib/Makefile \
- src/python/Makefile \
- src/python/run_tests \
+ lib/Makefile \
+ python/Makefile \
+ python/run_tests \
+ swig/Makefile \
])
dnl run_tests is created from run_tests.in. Make it executable.
-AC_CONFIG_COMMANDS([run_tests], [chmod +x src/python/run_tests])
+AC_CONFIG_COMMANDS([run_tests], [chmod +x python/run_tests])
AC_OUTPUT
+
+echo Configured gr-howto-write-a-block release $RELEASE for build.
diff --git a/gr-howto-write-a-block/src/lib/.gitignore b/gr-howto-write-a-block/lib/.gitignore
index d957a6821..d957a6821 100644
--- a/gr-howto-write-a-block/src/lib/.gitignore
+++ b/gr-howto-write-a-block/lib/.gitignore
diff --git a/gr-howto-write-a-block/src/Makefile.am b/gr-howto-write-a-block/lib/Makefile.am
index 4c8650d7d..e553c193d 100644
--- a/gr-howto-write-a-block/src/Makefile.am
+++ b/gr-howto-write-a-block/lib/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2004,2009 Free Software Foundation, Inc.
+# Copyright 2004,2005,2006,2008,2009 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -19,8 +19,24 @@
# Boston, MA 02110-1301, USA.
#
-SUBDIRS = lib
+include $(top_srcdir)/Makefile.common
-if PYTHON
-SUBDIRS += python
-endif
+###################################
+# 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)
diff --git a/gr-howto-write-a-block/src/lib/howto_square2_ff.cc b/gr-howto-write-a-block/lib/howto_square2_ff.cc
index e86db93dd..e86db93dd 100644
--- a/gr-howto-write-a-block/src/lib/howto_square2_ff.cc
+++ b/gr-howto-write-a-block/lib/howto_square2_ff.cc
diff --git a/gr-howto-write-a-block/src/lib/howto_square2_ff.h b/gr-howto-write-a-block/lib/howto_square2_ff.h
index 536b04fab..536b04fab 100644
--- a/gr-howto-write-a-block/src/lib/howto_square2_ff.h
+++ b/gr-howto-write-a-block/lib/howto_square2_ff.h
diff --git a/gr-howto-write-a-block/src/lib/howto_square_ff.cc b/gr-howto-write-a-block/lib/howto_square_ff.cc
index 5ab45d1f2..5ab45d1f2 100644
--- a/gr-howto-write-a-block/src/lib/howto_square_ff.cc
+++ b/gr-howto-write-a-block/lib/howto_square_ff.cc
diff --git a/gr-howto-write-a-block/src/lib/howto_square_ff.h b/gr-howto-write-a-block/lib/howto_square_ff.h
index 092b93698..092b93698 100644
--- a/gr-howto-write-a-block/src/lib/howto_square_ff.h
+++ b/gr-howto-write-a-block/lib/howto_square_ff.h
diff --git a/gr-howto-write-a-block/doc/.gitignore b/gr-howto-write-a-block/limbo/doc/.gitignore
index f65ab6cf7..f65ab6cf7 100644
--- a/gr-howto-write-a-block/doc/.gitignore
+++ b/gr-howto-write-a-block/limbo/doc/.gitignore
diff --git a/gr-howto-write-a-block/doc/Makefile.am b/gr-howto-write-a-block/limbo/doc/Makefile.am
index 0152ecad4..5f58a21e9 100644
--- a/gr-howto-write-a-block/doc/Makefile.am
+++ b/gr-howto-write-a-block/limbo/doc/Makefile.am
@@ -21,7 +21,6 @@
TARGETS = howto-write-a-block.html
-
# To avoid build problems for folks who don't have xmlto installed, we
# don't build the docs by default.
@@ -30,6 +29,7 @@ all: $(TARGETS)
EXTRA_DIST = \
+ README \
howto-write-a-block.xml \
howto_1.i \
make_numbered_listing.py \
diff --git a/gr-howto-write-a-block/limbo/doc/README b/gr-howto-write-a-block/limbo/doc/README
new file mode 100644
index 000000000..ff3b75e57
--- /dev/null
+++ b/gr-howto-write-a-block/limbo/doc/README
@@ -0,0 +1 @@
+The contents of this directory are obsolete.
diff --git a/gr-howto-write-a-block/doc/howto-write-a-block.xml b/gr-howto-write-a-block/limbo/doc/howto-write-a-block.xml
index f8027b456..f8027b456 100644
--- a/gr-howto-write-a-block/doc/howto-write-a-block.xml
+++ b/gr-howto-write-a-block/limbo/doc/howto-write-a-block.xml
diff --git a/gr-howto-write-a-block/doc/howto_1.i b/gr-howto-write-a-block/limbo/doc/howto_1.i
index 640d0897b..640d0897b 100644
--- a/gr-howto-write-a-block/doc/howto_1.i
+++ b/gr-howto-write-a-block/limbo/doc/howto_1.i
diff --git a/gr-howto-write-a-block/doc/make_numbered_listing.py b/gr-howto-write-a-block/limbo/doc/make_numbered_listing.py
index 889c2d78d..889c2d78d 100755
--- a/gr-howto-write-a-block/doc/make_numbered_listing.py
+++ b/gr-howto-write-a-block/limbo/doc/make_numbered_listing.py
diff --git a/gr-howto-write-a-block/doc/qa_howto_1.py b/gr-howto-write-a-block/limbo/doc/qa_howto_1.py
index 3173110f8..3173110f8 100755
--- a/gr-howto-write-a-block/doc/qa_howto_1.py
+++ b/gr-howto-write-a-block/limbo/doc/qa_howto_1.py
diff --git a/gr-howto-write-a-block/doc/src_lib_Makefile_1.am b/gr-howto-write-a-block/limbo/doc/src_lib_Makefile_1.am
index e97d70d1c..e97d70d1c 100644
--- a/gr-howto-write-a-block/doc/src_lib_Makefile_1.am
+++ b/gr-howto-write-a-block/limbo/doc/src_lib_Makefile_1.am
diff --git a/gr-howto-write-a-block/doc/src_lib_Makefile_2.am b/gr-howto-write-a-block/limbo/doc/src_lib_Makefile_2.am
index dca236e20..dca236e20 100644
--- a/gr-howto-write-a-block/doc/src_lib_Makefile_2.am
+++ b/gr-howto-write-a-block/limbo/doc/src_lib_Makefile_2.am
diff --git a/gr-howto-write-a-block/src/python/.gitignore b/gr-howto-write-a-block/python/.gitignore
index bf03975bb..bf03975bb 100644
--- a/gr-howto-write-a-block/src/python/.gitignore
+++ b/gr-howto-write-a-block/python/.gitignore
diff --git a/gr-howto-write-a-block/src/python/Makefile.am b/gr-howto-write-a-block/python/Makefile.am
index 79f44019d..79f44019d 100644
--- a/gr-howto-write-a-block/src/python/Makefile.am
+++ b/gr-howto-write-a-block/python/Makefile.am
diff --git a/gr-howto-write-a-block/src/python/qa_howto.py b/gr-howto-write-a-block/python/qa_howto.py
index 0abe0e244..0abe0e244 100755
--- a/gr-howto-write-a-block/src/python/qa_howto.py
+++ b/gr-howto-write-a-block/python/qa_howto.py
diff --git a/gr-howto-write-a-block/src/python/run_tests.in b/gr-howto-write-a-block/python/run_tests.in
index 6e4b83ea0..5b50509e1 100644
--- a/gr-howto-write-a-block/src/python/run_tests.in
+++ b/gr-howto-write-a-block/python/run_tests.in
@@ -11,11 +11,11 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
# Where to look in the build tree for our shared library
-libbld=@abs_top_builddir@/src/lib
-# Where to look in the src tree for swig generated python code
-libsrc=@abs_top_srcdir@/src/lib
+libbld=@abs_top_builddir@/lib
+# Where to look in the build tree for swig generated python code
+libswig=@abs_top_builddir@/swig
# Where to look in the src tree for hand written python code
-py=@abs_top_srcdir@/src/python
+py=@abs_top_srcdir@/python
# Where to look for installed GNU Radio python modules
# FIXME this is wrong on a distcheck. We really need to ask gnuradio-core
@@ -23,8 +23,8 @@ py=@abs_top_srcdir@/src/python
installed_pythondir=@pythondir@
installed_pyexecdir=@pyexecdir@
-PYTHONPATH="$libbld:$libbld/.libs:$libsrc:$py:$installed_pythondir:$installed_pyexecdir:$PYTHONPATH"
-#PYTHONPATH="$libbld:$libbld/.libs:$libsrc:$py:$installed_pythondir:$installed_pyexecdir"
+PYTHONPATH="$libbld:$libbld/.libs:$libswig:$libswig/.libs:$py:$installed_pythondir:$installed_pyexecdir:$PYTHONPATH"
+echo $PYTHONPATH
export PYTHONPATH
diff --git a/gr-howto-write-a-block/src/lib/howto.i b/gr-howto-write-a-block/src/lib/howto.i
deleted file mode 100644
index c3dae9dfc..000000000
--- a/gr-howto-write-a-block/src/lib/howto.i
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- c++ -*- */
-
-%include "gnuradio.i" // the common stuff
-
-%{
-#include "howto_square_ff.h"
-#include "howto_square2_ff.h"
-%}
-
-// ----------------------------------------------------------------
-
-/*
- * First arg is the package prefix.
- * Second arg is the name of the class minus the prefix.
- *
- * This does some behind-the-scenes magic so we can
- * access howto_square_ff from python as howto.square_ff
- */
-GR_SWIG_BLOCK_MAGIC(howto,square_ff);
-
-howto_square_ff_sptr howto_make_square_ff ();
-
-class howto_square_ff : public gr_block
-{
-private:
- howto_square_ff ();
-};
-
-// ----------------------------------------------------------------
-
-GR_SWIG_BLOCK_MAGIC(howto,square2_ff);
-
-howto_square2_ff_sptr howto_make_square2_ff ();
-
-class howto_square2_ff : public gr_sync_block
-{
-private:
- howto_square2_ff ();
-};
diff --git a/gr-howto-write-a-block/src/.gitignore b/gr-howto-write-a-block/swig/.gitignore
index bb3f27777..916527317 100644
--- a/gr-howto-write-a-block/src/.gitignore
+++ b/gr-howto-write-a-block/swig/.gitignore
@@ -1,10 +1,6 @@
-/Makefile
-/Makefile.in
-/.la
-/.lo
/.deps
/.libs
-/*.la
-/*.lo
+/Makefile.in
+/Makefile
/howto.cc
/howto.py
diff --git a/gr-howto-write-a-block/src/lib/Makefile.am b/gr-howto-write-a-block/swig/Makefile.am
index fa6b439ea..8c94f5041 100644
--- a/gr-howto-write-a-block/src/lib/Makefile.am
+++ b/gr-howto-write-a-block/swig/Makefile.am
@@ -21,25 +21,7 @@
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)
+AM_CPPFLAGS += -I$(top_srcdir)/lib
if PYTHON
###################################
@@ -56,7 +38,7 @@ howto_pythondir_category = \
gnuradio
howto_la_swig_libadd = \
- libgnuradio-howto.la
+ $(top_builddir)/lib/libgnuradio-howto.la
include $(top_srcdir)/Makefile.swig
@@ -65,4 +47,10 @@ BUILT_SOURCES = $(swig_built_sources)
# Do not distribute the output of SWIG
no_dist_files = $(swig_built_sources)
+
+# additional SWIG files to be installed
+howto_swiginclude_headers = \
+ howto_square_ff.i \
+ howto_square2_ff.i
+
endif
diff --git a/gr-howto-write-a-block/src/lib/Makefile.swig.gen b/gr-howto-write-a-block/swig/Makefile.swig.gen
index f76cc6371..f76cc6371 100644
--- a/gr-howto-write-a-block/src/lib/Makefile.swig.gen
+++ b/gr-howto-write-a-block/swig/Makefile.swig.gen
diff --git a/gr-howto-write-a-block/swig/howto.i b/gr-howto-write-a-block/swig/howto.i
new file mode 100644
index 000000000..8dc502010
--- /dev/null
+++ b/gr-howto-write-a-block/swig/howto.i
@@ -0,0 +1,11 @@
+/* -*- c++ -*- */
+
+%include "gnuradio.i" // the common stuff
+
+%{
+#include "howto_square_ff.h"
+#include "howto_square2_ff.h"
+%}
+
+%include "howto_square_ff.i"
+%include "howto_square2_ff.i"
diff --git a/gr-howto-write-a-block/swig/howto_square2_ff.i b/gr-howto-write-a-block/swig/howto_square2_ff.i
new file mode 100644
index 000000000..683a93d61
--- /dev/null
+++ b/gr-howto-write-a-block/swig/howto_square2_ff.i
@@ -0,0 +1,9 @@
+GR_SWIG_BLOCK_MAGIC(howto,square2_ff);
+
+howto_square2_ff_sptr howto_make_square2_ff ();
+
+class howto_square2_ff : public gr_sync_block
+{
+private:
+ howto_square2_ff ();
+};
diff --git a/gr-howto-write-a-block/swig/howto_square_ff.i b/gr-howto-write-a-block/swig/howto_square_ff.i
new file mode 100644
index 000000000..f8ae76986
--- /dev/null
+++ b/gr-howto-write-a-block/swig/howto_square_ff.i
@@ -0,0 +1,16 @@
+/*
+ * First arg is the package prefix.
+ * Second arg is the name of the class minus the prefix.
+ *
+ * This does some behind-the-scenes magic so we can
+ * access howto_square_ff from python as howto.square_ff
+ */
+GR_SWIG_BLOCK_MAGIC(howto,square_ff);
+
+howto_square_ff_sptr howto_make_square_ff ();
+
+class howto_square_ff : public gr_block
+{
+private:
+ howto_square_ff ();
+};
diff --git a/gr-howto-write-a-block/version.sh b/gr-howto-write-a-block/version.sh
new file mode 100644
index 000000000..b2cad877d
--- /dev/null
+++ b/gr-howto-write-a-block/version.sh
@@ -0,0 +1,4 @@
+MAJOR_VERSION=3
+API_COMPAT=3
+MINOR_VERSION=git
+MAINT_VERSION=