#!/bin/bash if [ $# -ne 2 ]; then echo "usage: gcell-embedspu-libtool file.lo spu_executable_file" 1>&2 exit 1 fi lo_file=$1 spu_executable=$2 symbol_name=${lo_file%%.lo} # generate the .o file that wraps the SPU executable ppu-embedspu -m32 -fpic ${symbol_name} ${spu_executable} .libs/${symbol_name}.o # generate the .lo libtool file that points at all the right places rm -f $lo_file cat >$lo_file.new <