openssl的正常和交叉编译

来自这里:http://hi.baidu.com/lihuanhai1943/blog/item/00ef57fa9ee3d1d6b58f31d0.html

 

正常编译openssl-0.9.8a.tar.gz(成功)
./config shared --prefix=/home/design/md5
make
make install

openssl在arm下的交叉编译openssl-0.9.8d.tar.gz(成功)
1../config no-asm shared --prefix=/usr/local/openssl
2.修改Makefile, 将CC AR RANLIB 改为你的cross compile 工具,别忘了令EX_LIBS= -ldl(修改如下)
make
3.make install
编译出来动态链接库

修改makefile如下:
                                                                                                                                             
-CC= gcc
+CC= arm-linux-gcc
#CFLAG= -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -Wuninitialized -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
CFLAG= -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_NO_KRB5 -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
DEPFLAG=
PEX_LIBS=
-EX_LIBS=
+EX_LIBS= -ldl
EXE_EXT=
ARFLAGS=
-AR=ar $(ARFLAGS) r
-RANLIB= /usr/bin/ranlib
-PERL= /usr/local/bin/perl
+AR=arm-linux-ar $(ARFLAGS) r
+RANLIB= arm-linux-ranlib
+PERL= /usr/bin/perl
TAR= tar
TARFLAGS= --no-recursion
MAKEDEPPROG= gcc


你可能感兴趣的:(openssl的正常和交叉编译)