add profiling build script
Usage: cd build ../etc/build.sh ./picrin file gprof picirn gmon.out | less
This commit is contained in:
parent
b7fca32f61
commit
3bc1369007
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
project_root=$(dirname $(pwd))
|
||||||
|
for f in ${project_root}/src/*.c ${project_root}/extlib/benz/*.c ${project_root}/contrib/**/*.c ;do
|
||||||
|
gcc -c -O2 -pg -std=c99 -I${project_root}/extlib/benz/include $f -o `basename $f`.o &
|
||||||
|
done
|
||||||
|
wait
|
||||||
|
gcc *.o -O2 -I${project_root}/src -I${project_root}/extlib/benz/include -std=c99 -pg -lm -lreadline -o picrin
|
||||||
|
rm *.o
|
Loading…
Reference in New Issue