#!/bin/sh

lib="$1"
shift

so1=`cat scripts/sharedlib-so1`
soname=`cat scripts/sharedlib-soname`
opts=`cat scripts/sharedlib-opts`

scripts/cdcompile . $opts \
  -Wl,-"$soname","$lib"."$so1" \
  -o package/lib/"$lib"."$so1" \
  ofiles/*.o "$@"
chmod 644 package/lib/"$lib"."$so1"
