update profiling build script
This commit is contained in:
parent
f2eb51e53d
commit
592af901e2
13
etc/build.sh
13
etc/build.sh
|
@ -1,9 +1,12 @@
|
||||||
#!/usr/bin/zsh
|
#!/bin/sh
|
||||||
project_root=$(dirname $(pwd))
|
set -e
|
||||||
for f in ${project_root}/src/*.c ${project_root}/extlib/benz/*.c ${project_root}/contrib/**/*.c;do
|
: ${GCC:=gcc}
|
||||||
cc -c -O2 -pg -std=c99 -I${project_root}/extlib/benz/include $f -o `basename $f`.o &
|
project_root=$(cd $(dirname $0); cd ../; pwd)
|
||||||
|
|
||||||
|
for f in ${project_root}/src/*.c ${project_root}/extlib/benz/*.c $(find ${project_root}/contrib/* -name '*.c');do
|
||||||
|
${GCC} -c -O2 -pg -std=c99 -I${project_root}/extlib/benz/include $f -o `basename $f`.o &
|
||||||
done
|
done
|
||||||
wait
|
wait
|
||||||
cc main.c.o $(find . -maxdepth 1 -name '*.o' | grep -v main.c.o | grep -v load_piclib.c.o | grep -v init_contrib.c.o) load_piclib.c.o init_contrib.c.o \
|
${GCC} main.c.o $(find . -maxdepth 1 -name '*.o' | grep -v main.c.o | grep -v load_piclib.c.o | grep -v init_contrib.c.o) load_piclib.c.o init_contrib.c.o \
|
||||||
-O2 -I${project_root}/extlib/benz/include -std=c99 -pg -lm -lreadline -o picrin
|
-O2 -I${project_root}/extlib/benz/include -std=c99 -pg -lm -lreadline -o picrin
|
||||||
rm *.o
|
rm *.o
|
||||||
|
|
Loading…
Reference in New Issue