go.sh scripts of several benchmarks modified to pick up $CC, $CFLAGS, $CXXFLAGS,...
[phoronix-static.git] / graphics-magick / go.sh
blobeb9c9fb001d2b930555623a2531cb9000e44f846
1 #!/bin/bash -x
3 # Copyright (C) 2011 Sebastian Pop <sebpop@gmail.com>.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details. A copy of this license
13 # can be downloaded from http://www.gnu.org/copyleft/gpl.html
15 p=`pwd`
16 rm -rf usr libpng-1.2.39 GraphicsMagick-1.3.12
17 mkdir -p usr
18 tar -zxf libpng-1.2.39.tar.gz
19 tar -jxf GraphicsMagick-1.3.12.tar.bz2
20 cd libpng-1.2.39
21 ./configure --prefix=$p/usr/
22 make -j $procs CFLAGS="$CFLAGS"
23 make install
24 cd ../GraphicsMagick-1.3.12
25 LDFLAGS="-L$p/usr/lib" CPPFLAGS="-I$p/usr/include" ./configure --without-perl --prefix=$p/usr --with-png=yes
26 make -j $procs CFLAGS="$CFLAGS"
27 make install
28 > $p/log
29 before=`date +%s.%N`
30 for arg in {"-colorspace HWB","-blur 0x1.0","-lat 10x10-5%","-resize 50%","-sharpen 0x1.0"}; do
31 OMP_NUM_THREADS=$procs $p/usr/bin/gm benchmark -duration 60 convert $p/../extra/DSC_6782.png $arg null: >> $p/log 2>&1
32 done
33 after=`date +%s.%N`
34 echo "graphics-magick run time: `echo "$after - $before" | bc`" >> $p/log
35 cd $p; rm -rf usr libpng-1.2.39 GraphicsMagick-1.3.12