1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
# loaded and called from program's build scripts once icm-spch
# and icm-multicomp are available
# $1 is, e.g., /usr/libexec/icmake/icm-dep
. ../buildscripts/precomp
jobs()
{
count=0 # use o-file numbers to avoid name collisions
# all directories to process
rm -f jobs
for dir in `find ./ -mindepth 1 -maxdepth 1 -type d | sed 's;./;;'`
do
[ $dir == "xerr" ] && continue
cd $dir
ls *.cc > /dev/null 2>&1
if [ $? -eq 0 ] ;
then
echo : $dir . $count >> ../jobs
for file in *.cc # compile all .cc files in $dir
do
echo $file >> ../jobs
done
fi
cd ..
let count=$count+1 # next directory nr.
done
}
build()
{
precomp -n # construct the .gch file and soft-links
jobs # make the multicomp jobs file
# use -O2
export ICMAKE_CPPSTD="${ICMAKE_CPPSTD} -O2"
# multi-compile
../tmp/usr/libexec/icmake/icm-multicomp -q jobs
# created the o-files .tgz
# tar czf ../tmp/usr/share/icmake/ofiles.tgz *.o
# clean up
# rm -rf spch *.o */*.gch tmp
}
|