File: sco5-shared.sh

package info (click to toggle)
openssl097 0.9.7k-3.1
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 18,564 kB
  • ctags: 24,034
  • sloc: ansic: 178,335; asm: 19,384; perl: 17,782; makefile: 13,645; cpp: 4,379; sh: 2,687; lisp: 23
file content (48 lines) | stat: -rwxr-xr-x 816 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh

major="0"
minor="9.7b"

slib=libssl
sh_slib=$slib.so.$major.$minor

clib=libcrypto
sh_clib=$clib.so.$major.$minor

FLAGS="-O -DFILIO_H -Kalloca"
SHFLAGS="-Kpic -DPIC"

touch $sh_clib
touch $sh_slib

echo collecting all object files for $clib.so
OBJS=
find . -name \*.o -print > allobjs
for obj in `ar t libcrypto.a`
do
	OBJS="$OBJS `grep $obj allobjs`"
done

echo linking $clib.so
cc -G -o $sh_clib -h $sh_clib $OBJS -lnsl -lsocket

rm -f $clib.so
ln -s $sh_clib $clib.so

echo collecting all object files for $slib.so
OBJS=
for obj in `ar t libssl.a`
do
	OBJS="$OBJS `grep $obj allobjs`"
done

echo linking $slib.so
cc -G -o $sh_slib -h $sh_slib $OBJS -L. -lcrypto

rm -f $slib.so
ln -s $sh_slib $slib.so

mv libRSAglue.a libRSAglue.a.orig
mv libcrypto.a  libcrypto.a.orig
mv libssl.a     libssl.a.orig