Link examples with -lm, as some examples use functions like sin()

master
Martin Pitt 2013-03-24 13:36:07 +00:00 committed by Rob Sykes
parent aaee21bb8c
commit fe6ca521e2
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ build_examples() {
for f in ?$2-*.[cC]; do
cc=cc; echo $f | grep -q C$ && cc=c++
out=$tmp/`echo $f | sed "s/.[cC]$//"`
cmd="$cc $cflags -o $out $f $libs"
cmd="$cc $cflags -o $out $f $libs -lm"
echo $cmd; $cmd
done
}