svr5-shared-gcc.sh 844 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/usr/bin/sh
  2. major="0"
  3. minor="9.7b"
  4. slib=libssl
  5. sh_slib=$slib.so.$major.$minor
  6. clib=libcrypto
  7. sh_clib=$clib.so.$major.$minor
  8. FLAGS="-O3 -DFILIO_H -fomit-frame-pointer -pthread"
  9. SHFLAGS="-DPIC -fPIC"
  10. touch $sh_clib
  11. touch $sh_slib
  12. echo collecting all object files for $clib.so
  13. OBJS=
  14. find . -name \*.o -print > allobjs
  15. for obj in `ar t libcrypto.a`
  16. do
  17. OBJS="$OBJS `grep $obj allobjs`"
  18. done
  19. echo linking $clib.so
  20. gcc -G -o $sh_clib -h $sh_clib $OBJS -lnsl -lsocket
  21. rm -f $clib.so
  22. ln -s $sh_clib $clib.so
  23. echo collecting all object files for $slib.so
  24. OBJS=
  25. for obj in `ar t libssl.a`
  26. do
  27. OBJS="$OBJS `grep $obj allobjs`"
  28. done
  29. echo linking $slib.so
  30. gcc -G -o $sh_slib -h $sh_slib $OBJS -L. -lcrypto
  31. rm -f $slib.so
  32. ln -s $sh_slib $slib.so
  33. mv libRSAglue.a libRSAglue.a.orig
  34. mv libcrypto.a libcrypto.a.orig
  35. mv libssl.a libssl.a.orig