From 3bc136900763f119480f9e9481ad1725421cd256 Mon Sep 17 00:00:00 2001 From: "Sunrim KIM (keen)" <3han5chou7@gmail.com> Date: Thu, 2 Oct 2014 11:39:58 +0900 Subject: [PATCH] add profiling build script Usage: cd build ../etc/build.sh ./picrin file gprof picirn gmon.out | less --- etc/build.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 etc/build.sh diff --git a/etc/build.sh b/etc/build.sh new file mode 100755 index 00000000..fed0f61a --- /dev/null +++ b/etc/build.sh @@ -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