diff options
Diffstat (limited to 'b')
| -rwxr-xr-x | b | 52 |
1 files changed, 52 insertions, 0 deletions
@@ -0,0 +1,52 @@ +#!/bin/sh + +echorun() +{ + echo $1 + $1 +} + +compile() +{ + echorun "$cc $cflags $include $lflags -o $dir/$1.o $dir/$1.c $libs" +} + +cur=`pwd` +dir=`realpath $0` +dir=`dirname $dir` + +echorun "cd $dir" + +if [ "$1" = 'clean' ] ; then + echorun "rm -f *.o" + echorun "cd $cur" + exit +fi +if [ "$1" = 'cleanlib' ] ; then + echorun "rm -f *.o libprb.a" + echorun "cd $cur" + exit +fi + +cc='gcc' +debug='-g' +release='-O2' +cflags="-c" +if [ "`echo \"$*\" | grep debug -`" ] ; then + cflags="$debug $cflags" +else + cflags="$release $cflags" +fi + +compile prbm +compile arena +compile prbs +compile linux + +echorun "ar rcs $dir/libprb.a \ + $dir/prbm.o \ + $dir/arena.o \ + $dir/prbs.o \ + $dir/linux.o" + +echorun "cd $cur" |
