source: trunk/base/scripts/link.sh @ 2379

Last change on this file since 2379 was 2379, checked in by jkh, 18 years ago

Move all the scripts into a common location in preparation for making
darwinports more tcl version-agile.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 699 bytes
Line 
1#!/bin/sh
2
3# This is just for linking Pextlib!  It's not a more generic wrapper.
4# Real simple for now, just come up with compilation flags for Darwin
5# or for FreeBSD.  Could obviously be extended later for other OSen.
6
7if [ "$1" = "-n" ]; then
8        case `uname -s` in
9                Darwin) echo $2.dylib ;;
10                FreeBSD) echo $2.so ;;
11                NetBSD) echo $2.so ;;
12                Linux) echo $2.so ;;
13        esac
14        exit 0
15fi
16
17LIB=$1; shift
18
19case `uname -s` in
20        Darwin)
21                cc -dynamiclib $* -o ${LIB}.dylib -ltcl -framework CoreFoundation
22        ;;
23
24        FreeBSD)
25                cc -shared $* -o ${LIB}.so -L/usr/local/lib -ltcl83
26        ;;
27        NetBSD)
28                cc -shared $* -o ${LIB}.so -L/usr/pkg/lib -ltcl83
29        ;;
30        Linux)
31                cc -shared $* -o ${LIB}.so -L/usr/lib/ -ltcl8.3
32        ;;
33esac
Note: See TracBrowser for help on using the repository browser.