Using gcell out of tree


#1

I’m trying to do an out of tree build using gcell on a PS3 with Fedora
8. Is
anybody else working on this? Any pointers?
I copied the ‘gr-howto-write-a-block’ folder out of the tree and
followed
the documentation to create my own block. I then copied
‘Makefile.common.spu’ and used the ‘gr-gcell’ fft example as a guide to
edit
my program. I was successful in getting a ‘hello world from spe’, but
not
without manually hacking the Makefiles to include/exclude certain
includes
and libraries. I’m hoping there’s an easier way.

Thanks,

Chris


#2

On Wed, Dec 31, 2008 at 10:59:22AM -0500, Chris Noyes wrote:

Chris
Hi Chris,

Yes, there’s an easier way. The main thing you want to do is to copy
config/gr_standalone.m4, config/gr_gcell.m4, and config/pkg.m4 out of
the
trunk and add them to your out-of-tree config directory. Invoke
GR_GCELL in your configure.ac and most of what you need will be set
up. See the attached files below.

I generally use a directory structure that looks like this:

mymodule/config # m4 macros
mymodule/include/mymodule # includes that will be installed in
PREFIX/include/mymodule
mymodule/include/mymodule/spu # SPU specific includes that will be
installed
mymodule/lib # generic code
mymodule/lib/gcell # code that uses gcell
mymodule/lib/gcell/spu # SPU code used by code in lib/gcell
mymodule/python
mymodule/apps

lib/gcell is only built if the AM_CONDITIONAL HAVE_GCELL is true.

There’s also a HAVE_GCELL value in config.h

If I get some time, I’ll work up a revised out-of-tree skeleton that
includes conditionally built code that uses gcell. In the meantime,
I’m working on a “gcell-ized” version of FFTW :slight_smile:

Eric