Make FPU version run fast
[dormin.git] / tbs
blob9fd9f2416896d4e07acc1577e817ea76b91c60a3
1 #!/bin/sh
3 #set -x
4 set -e
6 h=$(readlink -f $(dirname $0))
7 r=$(readlink -f $h/../..)
8 t=$r/tbs
9 d=MD5
11 export OCAMLRUNPARAM=b
13 if test $h = $PWD; then
14 mkdir -p build
15 cd build
18 if ! md5sum --status -c $d; then
19 md5sum $h/build.ml $h/tbs $t/tbs.cma >$d.tmp
20 ocamlc.opt -o build.cmo -c -g -I $t $h/build.ml
21 ocamlc.opt -g -thread -I $t unix.cma threads.cma tbs.cma build.cmo -o b
22 mv $d.tmp $d
25 cc="cc"
26 ccopt="-O"
27 test $(hostname) = "linmac" && {
28 cc="$HOME/x/dev/gcc-4.3.0/bin/gcc";
29 ccopt="-Wall -Werror -Wextra -O3 -mabi=altivec -maltivec -Wno-unused-function";
30 ccopt="$ccopt -fprefetch-loop-arrays -mtune=power6 -mcpu=G4 -funroll-all-loops"
31 ccopt="$ccopt -ftree-loop-linear -ftree-vectorize"
32 # ccopt="$ccopt -DUSE_ALTIVEC"
33 ccopt="$ccopt -DTIMING"
36 targets="dormin"
37 ./b -O src:$h -r -O ccopt:"$ccopt" -O cc:$cc $* $targets