nix-gh/lib/make-library.sh
Eelco Dolstra 17e20716c0 * A function to build libraries.
* The linker can link against libraries.
* C flags can be passed to the C compiler.
2004-07-06 17:25:10 +00:00

16 lines
242 B
Bash

. $stdenv/setup
objs=
for i in $objects; do
obj=$(echo $i/*.o)
objs="$objs $obj"
done
echo "archiving object files into library \`$libraryName'..."
outPath=$out/lib${libraryName}.a
mkdir $out
ar crs $outPath $objs
ranlib $outPath