]> git.saurik.com Git - wxWidgets.git/blame - distrib/mac/shared-ld-sh
Added another reference to adding the zip handler.
[wxWidgets.git] / distrib / mac / shared-ld-sh
CommitLineData
d5b7a472
GD
1#!/bin/sh
2#-----------------------------------------------------------------------------
3#-- Name: distrib/mac/shared-ld-sh
4#-- Purpose: Link a mach-o dynamic shared library for Darwin / Mac OS X
5#-- Author: Gilles Depeyrot
6#-- Modified by:
7#-- Created: 05.05.2002
8#-- RCS-ID: $Id$
9#-- Copyright: (c) 2002 Gilles Depeyrot
10#-- Licence: wxWindows licence
11#-----------------------------------------------------------------------------
12
13verbose=0
14args=""
15objects=""
16
17while test $# -gt 0; do
18 case $1 in
19
20 -v)
21 verbose=1
22 ;;
23
5266a983 24 -o|-compatibility_version|-current_version|-framework|-undefined)
d5b7a472
GD
25 # collect these options and values
26 args="$args $1 $2"
27 shift
28 ;;
29
5266a983 30 -l*|-L*|-flat_namespace)
d5b7a472
GD
31 # collect these options
32 args="$args $1"
33 ;;
34
35 -dynamiclib)
36 # skip these options
37 ;;
38
39 -*)
40 echo "shared-ld: unhandled option '$1'"
41 exit 1
42 ;;
43
44 *.o)
45 # collect object files
46 objects="$objects $1"
47 ;;
48
49 *)
50 echo "shared-ld: unhandled argument '$1'"
51 exit 1
52 ;;
53
54 esac
55 shift
56done
57
58#
59# Link one module containing all the others
60#
61if test $verbose = 1; then
62 echo "c++ -r -keep_private_externs -nostdlib $objects -o master.$$.o"
63fi
64c++ -r -keep_private_externs -nostdlib $objects -o master.$$.o
65status=$?
66if test $status != 0; then
67 exit $status
68fi
69
70#
71# Link the shared library from the single module created
72#
73if test $verbose = 1; then
74 echo "cc -dynamiclib master.$$.o $args"
75fi
76c++ -dynamiclib master.$$.o $args
77status=$?
78if test $status != 0; then
79 exit $status
80fi
81
82#
83# Remove intermediate module
84#
85rm -f master.$$.o
86
5266a983 87exit 0