r9514: Automated commit for Debian build of clsql upstream-version-2.11.3
[clsql/s11.git] / uffi / make.sh
blob3b792ce781cbd9ba0ae388ff994cd531f08e6916
1 #!/bin/sh
3 case "`uname`" in
4 Linux) os_linux=1 ;;
5 FreeBSD) os_freebsd=1 ;;
6 Darwin) os_darwin=1 ;;
7 SunOS) os_sunos=1 ;;
8 AIX) os_aix=1 ;;
9 *) echo "Unable to identify uname " `uname`
10 exit 1 ;;
11 esac
13 if [ "$os_linux" -o "$os_freebsd" ]; then
14 gcc -fPIC -DPIC -c $SOURCE -o $OBJECT
15 gcc -shared $OBJECT -o $SHARED_LIB
16 elif [ "$os_darwin" ]; then
17 cc -dynamic -c $SOURCE -o $OBJECT
18 ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress -o $BASE.dylib $OBJECT
19 ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress /usr/lib/libz.dylib -o z.dylib
21 elif [ "$os_sunos" ]; then
22 cc -KPIC -c $SOURCE -o $OBJECT
23 cc -G $OBJECT -o $SHARED_LIB
25 elif [ "$os_aix" ]; then
26 gcc -c -D_BSD -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void $SOURCE
27 make_shared -o $SHARED_LIB $OBJECT
30 exit 0