diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2005-11-06 17:49:00 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2005-11-06 17:49:00 +0000 |
commit | abb0c2bba4d9970ac2e690b6aa115f33dccc3a14 (patch) | |
tree | 48dc4122bc3c65952eb4375c79f325c7861ab11b /util | |
parent | b3bdb474a9514b094aad304a63e6fa9a7cb2a475 (diff) |
Update VC++ build engine to include supported engine DLL builds.
Diffstat (limited to 'util')
-rwxr-xr-x | util/mk1mf.pl | 44 | ||||
-rwxr-xr-x | util/mkdef.pl | 2 | ||||
-rwxr-xr-x | util/mkdir-p.pl | 1 | ||||
-rw-r--r-- | util/pl/VC-32.pl | 16 |
4 files changed, 55 insertions, 8 deletions
diff --git a/util/mk1mf.pl b/util/mk1mf.pl index ff668375a0..b009072c83 100755 --- a/util/mk1mf.pl +++ b/util/mk1mf.pl @@ -10,6 +10,10 @@ $OPTIONS=""; $ssl_version=""; $banner="\t\@echo Building OpenSSL"; +my $no_static_engine = 0; +my $engines = ""; + + open(IN,"<Makefile") || die "unable to open Makefile!\n"; while(<IN>) { $ssl_version=$1 if (/^VERSION=(.*)$/); @@ -95,6 +99,8 @@ foreach (grep(!/^$/, split(/ /, $OPTIONS))) print STDERR "unknown option - $_\n" if !&read_options; } +$no_static_engine = 0 if (!$shlib); + $no_mdc2=1 if ($no_des); $no_ssl3=1 if ($no_md5 || $no_sha); @@ -214,6 +220,16 @@ $cflags.=" -DOPENSSL_NO_ECDSA" if $no_ecdsa; $cflags.=" -DOPENSSL_NO_ECDH" if $no_ecdh; $cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine; $cflags.=" -DOPENSSL_NO_HW" if $no_hw; + +if ($no_static_engine) + { + $cflags .= " -DOPENSSL_NO_STATIC_ENGINE"; + } +else + { + $cflags .= " -DOPENSSL_NO_DYNAMIC_ENGINE"; + } + #$cflags.=" -DRSAref" if $rsaref ne ""; ## if ($unix) @@ -288,8 +304,10 @@ for (;;) if ($key eq "HEADER") { $header.=&var_add($dir,$val, 1); } - if ($key eq "LIBOBJ") + if ($key eq "LIBOBJ" && ($dir ne "engines" || !$no_static_engine)) { $libobj=&var_add($dir,$val, 0); } + if ($key eq "LIBNAMES" && $dir eq "engines" && $no_static_engine) + { $engines.=$val } if (!($_=<IN>)) { $_="RELATIVE_DIRECTORY=FINISHED\n"; } @@ -385,12 +403,14 @@ CRYPTO=$crypto # BIN_D - Binary output directory # TEST_D - Binary test file output directory # LIB_D - library output directory +# ENG_D - dynamic engine output directory # Note: if you change these point to different directories then uncomment out # the lines around the 'NB' comment below. # BIN_D=\$(OUT_D) TEST_D=\$(OUT_D) LIB_D=\$(OUT_D) +ENG_D=\$(OUT_D) # INCL_D - local library directory # OBJ_D - temp object file directory @@ -446,7 +466,7 @@ $banner headers: \$(HEADER) \$(EXHEADER) @ -lib: \$(LIBS_DEP) +lib: \$(LIBS_DEP) \$(E_SHLIB) exe: \$(T_EXE) \$(BIN_D)$o\$(E_EXE)$exep @@ -617,6 +637,16 @@ foreach (split(/\s+/,$test)) $rules.=&do_link_rule("\$(TEST_D)$o$t$exep",$tt,"\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); } +$defs.=&do_defs("E_SHLIB",$engines,"\$(ENG_D)",$shlibp); + +foreach (split(/\s+/,$engines)) + { + $rules.=&do_compile_rule("\$(OBJ_D)","engines${o}e_$_",$lib); + $rules.= &do_lib_rule("\$(OBJ_D)${o}e_${_}.obj","\$(ENG_D)$o$_$shlibp","",$shlib,""); + } + + + $rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)"); $rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)"); @@ -777,7 +807,7 @@ sub do_defs elsif ($var eq "SSLOBJ") { $ret.="\$(OBJ_D)\\\$(SSL).res "; } } - chop($ret); + chomp($ret); $ret.="\n\n"; return($ret); } @@ -960,6 +990,14 @@ sub read_options { $xcflags = "-DZLIB_SHARED -DZLIB $xcflags"; } + elsif (/^no-static-engine/) + { + $no_static_engine = 1; + } + elsif (/^enable-static-engine/) + { + $no_static_engine = 0; + } # There are also enable-xxx options which correspond to # the no-xxx. Since the scalars are enabled by default # these can be ignored. diff --git a/util/mkdef.pl b/util/mkdef.pl index c9417d3b90..8be2e39f54 100755 --- a/util/mkdef.pl +++ b/util/mkdef.pl @@ -145,6 +145,8 @@ foreach (@ARGV, split(/ /, $options)) $do_crypto=1; $libname=$_; } + $no_static_engine=1 if $_ eq "no-static-engine"; + $no_static_engine=0 if $_ eq "enable-static-engine"; $do_update=1 if $_ eq "update"; $do_rewrite=1 if $_ eq "rewrite"; $do_ctest=1 if $_ eq "ctest"; diff --git a/util/mkdir-p.pl b/util/mkdir-p.pl index 6c69c2daa4..e73d02b073 100755 --- a/util/mkdir-p.pl +++ b/util/mkdir-p.pl @@ -8,6 +8,7 @@ my $arg; foreach $arg (@ARGV) { + $arg =~ tr|\\|/|; &do_mkdir_p($arg); } diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl index 938aff65f2..4b489bfc7a 100644 --- a/util/pl/VC-32.pl +++ b/util/pl/VC-32.pl @@ -235,10 +235,14 @@ $cflags.=" /Fd$out_def"; sub do_lib_rule { local($objs,$target,$name,$shlib)=@_; - local($ret,$Name); + local($ret); $taget =~ s/\//$o/g if $o ne '/'; - ($Name=$name) =~ tr/a-z/A-Z/; + if ($name ne "") + { + $name =~ tr/a-z/A-Z/; + $name = "/def:ms/${name}.def"; + } # $target="\$(LIB_D)$o$target"; $ret.="$target: $objs\n"; @@ -250,8 +254,10 @@ sub do_lib_rule } else { - local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':''; - if ($FLAVOR =~ /CE/) + local($ex)=($target =~ /O_CRYPTO/)?'':' $(L_CRYPTO)'; + if ($name eq "") + {} + elsif ($FLAVOR =~ /CE/) { $ex.=' winsock.lib $(WCECOMPAT)/lib/wcecompatex.lib'; } @@ -261,7 +267,7 @@ sub do_lib_rule $ex.=' wsock32.lib gdi32.lib advapi32.lib user32.lib'; $ex.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/); } - $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n"; + $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target $name @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n"; } $ret.="\n"; return($ret); |