update build.sh

This commit is contained in:
Sunrim KIM (keen) 2014-10-23 15:46:42 +09:00
parent ae450b95b9
commit f65e5784f3
1 changed files with 5 additions and 4 deletions

View File

@ -1,8 +1,9 @@
#!/usr/bin/bash
#!/usr/bin/zsh
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 &
for f in ${project_root}/src/*.c ${project_root}/extlib/benz/*.c ${project_root}/contrib/**/*.c;do
cc -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
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 \
-O2 -I${project_root}/extlib/benz/include -std=c99 -pg -lm -lreadline -o picrin
rm *.o