diff options
Diffstat (limited to 'b')
| -rwxr-xr-x | b | 58 |
1 files changed, 58 insertions, 0 deletions
@@ -0,0 +1,58 @@ +#!/bin/sh + +echorun() +{ + echo $1 + $1 +} + +compile() +{ + for src in $@ ; do + echorun "$cc -c $cflags $include -o $dir/$src.o $dir/$src.c" + done +} + +archive() +{ + name="$dir/lib$1.a" + objs=`echo $@ | cut -d ' ' -f 2-` + dirobjs='' + echo "ar rcs $name" + for obj in $objs ; do + dirobjs="$dirobjs $dir/$obj.o" + echo "\t$dir/$obj.o" + done + ar rcs $name $dirobjs +} + +start=`pwd` +dir=`realpath $0` +dir=`dirname $dir` + +echorun "cd $dir" + +if [ "$1" = 'clean' ] ; then + echorun "rm -f *.o *.a" + echorun "cd $start" + exit +fi + + +cc="gcc" +cflags="-g -Wall" +include="-I$dir/../prb" +lflags="" + +srcs=' +camera +context +input +model +' + +compile $srcs + +archive prge $srcs + +echorun "cd $start" |
