Last change
on this file since 594 was
465,
checked in by rybkin, 16 years ago
|
See C.L. 366
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
|
File size:
1.5 KB
|
Line | |
---|
1 | #!/bin/sh -f |
---|
2 | |
---|
3 | #set -x |
---|
4 | export LC_ALL=C |
---|
5 | : ${CMTMSGPREFIX:=$0:} |
---|
6 | |
---|
7 | lib=$1 |
---|
8 | |
---|
9 | d=`/bin/pwd` |
---|
10 | a=`basename $d` |
---|
11 | if test "${a}" = "shlib" ; then |
---|
12 | cd .. |
---|
13 | fi |
---|
14 | |
---|
15 | if test `uname` = "HP-UX" ; then |
---|
16 | mkdir -p shlib |
---|
17 | /bin/rm -f shlib/* |
---|
18 | |
---|
19 | /bin/rm -f lib${lib}.sl |
---|
20 | |
---|
21 | cd shlib |
---|
22 | ar x ../lib${lib}.a |
---|
23 | ##### ld -b -a shared -o ../lib${lib}.sl `ls` $2 |
---|
24 | aCC -Wl,-a,shared -b +Z -q -Wl,+s -Wl,+vallcompatwarnings -o ../lib${lib}.sl `ls` $2 |
---|
25 | |
---|
26 | cd ../ |
---|
27 | |
---|
28 | /bin/rm -rf shlib |
---|
29 | |
---|
30 | fi |
---|
31 | |
---|
32 | if test `uname` = "OSF1" ; then |
---|
33 | /bin/rm -f lib${lib}.so |
---|
34 | ld -expect_unresolved '*' -shared -o lib${lib}.so -all lib${lib}.a \ |
---|
35 | $2 -rpath `/bin/pwd` |
---|
36 | fi |
---|
37 | |
---|
38 | if test `uname` = "Linux" ; then |
---|
39 | if test "${cmtmsg}"; then |
---|
40 | echo "${CMTMSGPREFIX}" "BUILDING SHARED LIBRARY ${lib}" |
---|
41 | fi |
---|
42 | # ATTEMPT 2: temp for sharedlin force |
---|
43 | # cp lib${lib}.a lib${lib}.so |
---|
44 | |
---|
45 | # ATTEMPT 1: |
---|
46 | # mkdir -p tmpShlib |
---|
47 | # cd tmpShlib |
---|
48 | # /bin/rm -f lib${lib}.so |
---|
49 | # |
---|
50 | # ld -shared -o lib${lib}.so --whole-archive ../lib${lib}.a $2 -rpath `/bin/pwd` |
---|
51 | # mv lib${lib}.so .. |
---|
52 | # cd ../ |
---|
53 | # /bin/rm -rf tmpShlib |
---|
54 | |
---|
55 | # ATTEMPT 3: (Time consummibg but seems to work...) |
---|
56 | # CMT should do this differently!!!! |
---|
57 | /bin/rm -f lib${lib}.so |
---|
58 | mkdir -p tmpShlib |
---|
59 | cd tmpShlib |
---|
60 | ar x ../lib${lib}.a |
---|
61 | |
---|
62 | # ld -shared -o lib${lib}.so `ls` $2 -rpath `/bin/pwd` |
---|
63 | g++ -shared `ls` $2 -o lib${lib}.so |
---|
64 | mv lib${lib}.so .. |
---|
65 | cd ../ |
---|
66 | /bin/rm -rf tmpShlib |
---|
67 | |
---|
68 | fi |
---|
69 | |
---|
70 | if test `uname` = "SunOS" ; then |
---|
71 | echo 'not yet implemented on SunOS' |
---|
72 | # objs=`ls *.o` |
---|
73 | # if test ! "$objs" = "" ; then |
---|
74 | # /bin/rm -f *.o |
---|
75 | # endif |
---|
76 | # ar x ../lib${lib}.a |
---|
77 | # $CILINK -o lib${lib}.so *.o $2 -lc |
---|
78 | # /bin/rm -f *.o |
---|
79 | fi |
---|
80 | |
---|
81 | |
---|
Note: See
TracBrowser
for help on using the repository browser.