about summary refs log blame commit diff
path: root/make/lib/make-library.sh
blob: a486a7bf740c3131b9cf43efe3860091bc86dbc3 (plain) (tree)



























                                                             
. $stdenv/setup

objs=
for i in $objects; do
    obj=$(echo $i/*.o)
    objs="$objs $obj"
done

echo "archiving object files into library \`$libraryName'..."

ensureDir $out

if test -z "$sharedLib"; then

    outPath=$out/lib${libraryName}.a

    ar crs $outPath $objs
    ranlib $outPath

else

    outPath=$out/lib${libraryName}.so

    gcc -shared -o $outPath $objs

fi