Merged gcell-wip -r8159:8202 into trunk. This includes the following
[debian/gnuradio] / gcell / src / lib / runtime / gcell-embedspu-libtool
1 #!/bin/bash
2
3 if [ $# -ne 2 ]; then
4   echo "usage: gcell-embedspu-libtool file.lo spu_executable_file" 1>&2
5   exit 1
6 fi
7
8 lo_file=$1
9 spu_executable=$2
10 symbol_name=${lo_file%%.lo}
11
12 # generate the .o file that wraps the SPU executable
13 ppu-embedspu -m32 -fpic ${symbol_name} ${spu_executable} .libs/${symbol_name}.o
14
15 # generate the .lo libtool file that points at all the right places
16 rm -f $lo_file
17 cat >$lo_file.new <<EOF
18 # $lo_file - a libtool object file
19 # Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
20 #
21 # Please DO NOT delete this file!
22 # It is necessary for linking the library.
23
24 pic_object='.libs/${symbol_name}.o'
25 non_pic_object=none
26 EOF
27
28 mv $lo_file.new $lo_file
29