emmychen writes:
> >While packaging ssleay for Debian Linux, I did some patches to the
> >Makefiles to have shared library support using libtool. The patches
> >should be fairly generic, so it should work on most plattforms. If
> >you are interested in it, I can send them out to the list. It supports
> >static and shared libraries.
>
> Great. Dose it work on NT also?
I don't know
> Go ahead to send them out.
>
--- ssleay-0.9.0b.orig/Configure
+++ ssleay-0.9.0b/Configure
@@ -124,6 +124,15 @@
"alpha-cc", "cc:-O2::SIXTY_FOUR_BIT_LONGS DES_INT DES_PTR DES_RISC2:asm/alpha.o::",
"alpha400-cc", "cc:-arch host -tune host -fast -std -O4 -inline
speed::SIXTY_FOUR_BIT_LONG:asm/alpha.o::",
+# Debian Linux (various architectures)
+"debian-alpha","gcc:-DTERMIO -O3::SIXTY_FOUR_BITS DES_INT:",
+"debian-i386","\$(TOP)/debian/libtool gcc:-DL_ENDIAN -DTERMIO -O3::BN_LLONG MD2_CHAR
+RC4_INDEX:",
+"debian-m68k","gcc:-DB_ENDIAN -DTERMIO -O3::BN_LLONG MD2_CHAR RC4_INDEX:",
+"debian-powerpc","gcc:-DB_ENDIAN -DTERMIO -O3::BN_LLONG DES_UNROLL DES_RISC2 DES_PTR
+MD2_CHAR RC4_INDEX:",
+
+# Sparc is new and untested...
+"debian-sparc","gcc:-DTERMIO -O3 -fomit-frame-pointer -mv8 -Wall::BN_LLONG RC4_CHAR
+DES_UNROLL BF_PTR:::",
+
# The intel boxes :-), It would be worth seeing if bsdi-gcc can use the
# bn86-elf.o file file since it is hand tweaked assembler.
"linux-elf", "gcc:-DL_ENDIAN -DTERMIO -DBN_ASM -O3 -fomit-frame-pointer -m486 -Wall
-Wuninitialized::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm",
--- ssleay-0.9.0b.orig/Makefile.ssl
+++ ssleay-0.9.0b/Makefile.ssl
@@ -58,13 +58,13 @@
# SHA1_ASM needs to be defined to use the x86 assembler for SHA1
# RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160
-
-CC= cc
+TOP=$(shell pwd)
+CC= $(TOP)/debian/libtool gcc
#CFLAG= -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -Wuninitialized
-DMD5_ASM -DSHA1_ASM -DRMD160_ASM
-CFLAG= -O -DNOPROTO
-PEX_LIBS= -L. -L.. -L../.. -L../../..
+CFLAG= -DL_ENDIAN -DTERMIO -O3
+#PEX_LIBS= -L. -L.. -L../.. -L../../..
EX_LIBS=
-AR=ar r
+AR=$(TOP)/debian/libtool gcc -rpath /usr/lib -version-info 9:0:9 -o
# Set BN_MULW to bn_mulw.o if you want to use the C version
BN_MULW= bn_mulw.o
@@ -167,7 +167,7 @@
MAN3=3
SHELL=/bin/sh
-TOP= .
+#TOP= .
ONEDIRS=out tmp
EDIRS= times doc bugs util include certs ms shlib mt demos perl dep
MISC= COPYRIGHT Configure HISTORY.066 INSTALL Makefile.ssl Makefile \
@@ -208,6 +208,7 @@
/bin/rm -f $(LIBS); \
done;
/bin/rm -f *.a *.o speed.* *.map *.so .pure core
+ /bin/rm -f *.so.* *.old util/*.old
/bin/rm -f $(TARFILE)
@for i in $(ONEDIRS) ;\
do \
@@ -253,8 +254,9 @@
tests:
(cd test; echo "testing $$i..."; \
+ LD_LIBRARY_PATH=$(TOP)/crypto/.libs:$(TOP)/ssl/.libs; export LD_LIBRARY_PATH; \
$(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}'
PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_MULW='${BN_MULW}' DES_ENC='${DES_ENC}'
BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}'
SDIRS='${SDIRS}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}'
RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' tests );
- @apps/ssleay version -a
+ @(LD_LIBRARY_PATH=$(TOP)/crypto/.libs:$(TOP)/ssl/.libs apps/ssleay version -a)
depend:
@for i in $(DIRS) ;\
@@ -320,12 +322,11 @@
(cd $$i; echo "installing $$i..."; \
$(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}'
EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' install ); \
done
- @for i in $(LIBS) ;\
+ @for i in crypto ssl ;\
do \
( echo installing $$i; \
- cp $$i $(INSTALLTOP)/lib; \
- sh util/ranlib.sh $(INSTALLTOP)/lib/$$i; \
- chmod 644 $(INSTALLTOP)/lib/$$i ); \
+ debian/libtool cp $$i/lib$$i.la $(INSTALLTOP)/lib; \
+ ); \
done
# DO NOT DELETE THIS LINE -- make depend depends on it.
--- ssleay-0.9.0b.orig/crypto/Makefile.ssl
+++ ssleay-0.9.0b/crypto/Makefile.ssl
@@ -38,7 +38,7 @@
GENERAL=Makefile README
-LIB= $(TOP)/libcrypto.a
+LIB= libcrypto.la
LIBSRC= cryptlib.c mem.c cversion.c ex_data.c $(ERRC).c
LIBOBJ= cryptlib.o mem.o cversion.o ex_data.o $(ERRC).o
@@ -61,8 +61,9 @@
@for i in $(SDIRS) ;\
do \
(cd $$i; echo "making all in $$i..."; \
- $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}'
INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}'
BN_MULW='${BN_MULW}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}'
MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}'
CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' all ); \
+ $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}'
+INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}'
+BN_MULW='${BN_MULW}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}'
+MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}'
+CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='true' all ); \
done;
+ $(AR) $(LIB) *.lo */*.lo
files:
perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
@@ -86,8 +87,6 @@
done;
lib: $(LIBOBJ)
- $(AR) $(LIB) $(LIBOBJ)
- sh $(TOP)/util/ranlib.sh $(LIB)
@touch lib
libs:
@@ -133,6 +132,8 @@
clean:
/bin/rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
+ $(RM) -f *.lo */*.lo *.la
+ $(RM) -rf .libs
@for i in $(SDIRS) ;\
do \
(cd $$i; echo "making clean in $$i..."; \
--- ssleay-0.9.0b.orig/ssl/Makefile.ssl
+++ ssleay-0.9.0b/ssl/Makefile.ssl
@@ -21,7 +21,7 @@
TEST=ssltest.c
APPS=
-LIB=$(TOP)/libssl.a
+LIB=libssl.la
LIBSRC= \
s2_meth.c s2_srvr.c s2_clnt.c s2_lib.c s2_enc.c s2_pkt.c \
s3_meth.c s3_srvr.c s3_clnt.c s3_lib.c s3_enc.c s3_pkt.c s3_both.c \
@@ -54,8 +54,7 @@
all: lib
lib: $(LIBOBJ)
- $(AR) $(LIB) $(LIBOBJ)
- sh $(TOP)/util/ranlib.sh $(LIB)
+ $(AR) $(LIB) *.lo
@touch lib
files:
@@ -92,6 +91,8 @@
clean:
/bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
+ /bin/rm -f *.lo *.la
+ /bin/rm -rf .libs
errors:
perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h
--- ssleay-0.9.0b.orig/rsaref/Makefile.ssl
+++ ssleay-0.9.0b/rsaref/Makefile.ssl
@@ -21,7 +21,8 @@
TEST=
APPS=
-LIB=$(TOP)/libRSAglue.a
+#LIB=$(TOP)/libRSAglue.a
+LIB=libRSAglue.la
LIBSRC= rsaref.c $(ERRC).c
LIBOBJ= rsaref.o $(ERRC).o
@@ -38,8 +39,7 @@
all: lib
lib: $(LIBOBJ)
- $(AR) $(LIB) $(LIBOBJ)
- sh $(TOP)/util/ranlib.sh $(LIB)
+ $(AR) $(LIB) *.lo
@touch lib
files:
@@ -77,6 +77,8 @@
clean:
/bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
+ /bin/rm -f *.lo *.la
+ /bin/rm -fr .libs
errors:
perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h
--- ssleay-0.9.0b.orig/apps/Makefile.ssl
+++ ssleay-0.9.0b/apps/Makefile.ssl
@@ -3,7 +3,7 @@
#
DIR= apps
-TOP= ..
+TOP= $(shell pwd)/..
CC= cc
INCLUDES= -I../include
CFLAG= -g -static
@@ -20,10 +20,11 @@
GENERAL=Makefile
-DLIBCRYPTO=../libcrypto.a
-DLIBSSL=../libssl.a
-LIBCRYPTO=-L.. -lcrypto
-LIBSSL=-L.. -lssl
+TOP=$(shell pwd)/..
+DLIBCRYPTO=../crypto/.libs/libcrypto.a
+DLIBSSL=../ssl/.libs/libssl.a
+LIBCRYPTO=-L$(TOP)/crypto/.libs -lcrypto
+LIBSSL=-L$(TOP)/ssl/.libs -lssl
SSLEAY= ssleay
@@ -123,6 +124,8 @@
clean:
/bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE)
/bin/rm -f req
+ /bin/rm -f *.lo
+ /bin/rm -fr .libs
$(DLIBSSL):
(cd ../ssl; $(MAKE))
--- ssleay-0.9.0b.orig/test/Makefile.ssl
+++ ssleay-0.9.0b/test/Makefile.ssl
@@ -3,7 +3,7 @@
#
DIR= test
-TOP= ..
+TOP= $(shell pwd)/..
CC= cc
INCLUDES= -I../include
CFLAG= -g
@@ -19,10 +19,10 @@
GENERAL=Makefile.ssl
-DLIBCRYPTO= ../libcrypto.a
-DLIBSSL= ../libssl.a
-LIBCRYPTO= -L.. -lcrypto
-LIBSSL= -L.. -lssl
+DLIBCRYPTO= ../crypto/.libs/libcrypto.a
+DLIBSSL= ../ssl/.libs/libssl.a
+LIBCRYPTO= -L$(TOP)/crypto/.libs -lcrypto
+LIBSSL= -L$(TOP)/ssl/.libs -lssl
BNTEST= bntest
EXPTEST= exptest
@@ -221,6 +221,7 @@
clean:
/bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss
log
+ /bin/rm -f *.lo
$(DLIBSSL):
(cd ../ssl; $(MAKE))
--- ssleay-0.9.0b.orig/util/ranlib.sh
+++ ssleay-0.9.0b/util/ranlib.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-
+exit
cwd=`pwd`
cd /tmp
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]