diff options
Diffstat (limited to 'ipl/cfuncs/mklib.sh')
-rwxr-xr-x | ipl/cfuncs/mklib.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ipl/cfuncs/mklib.sh b/ipl/cfuncs/mklib.sh index 533af0b..4caeca4 100755 --- a/ipl/cfuncs/mklib.sh +++ b/ipl/cfuncs/mklib.sh @@ -3,6 +3,7 @@ # mklib libname.so obj.o ... CC=${CC-cc} +BIN=${BIN-../../bin} LIBNAME=${1?"usage: $0 libname obj..."} shift @@ -11,9 +12,16 @@ SYS=`uname -s` set -x case "$SYS" in Linux*|*BSD*|GNU*) - gcc -shared -o $LIBNAME -fPIC "$@";; + $CC -shared -o $LIBNAME -fPIC "$@";; + CYGWIN*) + # move the win32 import library for iconx.exe callbacks + # created when iconx.exe was built + if [ -e $BIN/../src/runtime/iconx.a ]; then + mv $BIN/../src/runtime/iconx.a $BIN + fi + $CC -shared -Wl,--enable-auto-import -o $LIBNAME "$@" $BIN/iconx.a;; Darwin*) - cc -bundle -undefined suppress -flat_namespace -o $LIBNAME "$@";; + $CC -bundle -undefined suppress -flat_namespace -o $LIBNAME "$@";; SunOS*) $CC $CFLAGS -G -o $LIBNAME "$@" -lc -lsocket;; HP-UX*) |