Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
update profiling build script
Browse files Browse the repository at this point in the history
  • Loading branch information
KeenS committed Jan 18, 2015
1 parent f2eb51e commit 592af90
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions etc/build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/usr/bin/zsh
project_root=$(dirname $(pwd))
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 &
#!/bin/sh
set -e
: ${GCC:=gcc}
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
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
rm *.o

0 comments on commit 592af90

Please sign in to comment.