2
0

solaris.sh 827 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/sh
  2. echo "#define DATE \"`date`\"" >crypto/date.h
  3. major="0"
  4. minor="8.0"
  5. slib=libssl
  6. clib=libcrypto
  7. CC=gcc
  8. CPP='gcc -E'
  9. AS=as
  10. #FLAGS='-DTERMIO -O3 -DL_ENDIAN -fomit-frame-pointer -mv8 -Wall'
  11. FLAGS='-DTERMIO -g2 -ggdb -DL_ENDIAN -Wall -DREF_CHECK -DCRYPTO_MDEBUG'
  12. INCLUDE='-Iinclude -Icrypto -Issl'
  13. SHFLAGS='-DPIC -fpic'
  14. CFLAGS="$FLAGS $INCLUDE $SHFLAGS"
  15. ASM_OBJ="";
  16. echo compiling bignum assember
  17. $AS -o bn_asm.o crypto/bn/asm/sparc.s
  18. CFLAGS="$CFLAGS -DBN_ASM"
  19. ASM_OBJ="$ASM_OBJ bn_asm.o"
  20. echo compiling $clib
  21. $CC -c $CFLAGS -DCFLAGS="\"$FLAGS\"" -o crypto.o crypto/crypto.c
  22. echo linking $clib.so
  23. gcc $CFLAGS -shared -o $clib.so.$major.$minor crypto.o $ASM_OBJ -lnsl -lsocket
  24. echo compiling $slib.so
  25. $CC -c $CFLAGS -o ssl.o ssl/ssl.c
  26. echo building $slib.so
  27. gcc $CFLAGS -shared -o $slib.so ssl.o -L. -lcrypto