diff options
author | Andy Polyakov <appro@openssl.org> | 2012-12-18 09:42:31 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2012-12-18 09:42:31 +0000 |
commit | 668bcfd5ca237fdf6fbef1ab463697a4a48caf39 (patch) | |
tree | 5eb66a95c4f32496930af138b8a9aba46aa30e37 | |
parent | 8774f78d1bacd056e7b2450b1529b381531cfc07 (diff) |
util/pl/VC-32.pl: refresh, switch to ws2, add crypt32, fix typo (based on
suggestions from Pierre Delaage).
-rw-r--r-- | util/pl/VC-32.pl | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl index 68865a8cc6..69197b0144 100644 --- a/util/pl/VC-32.pl +++ b/util/pl/VC-32.pl @@ -96,7 +96,7 @@ elsif ($FLAVOR =~ /CE/) $wcetgt = $ENV{'TARGETCPU'}; # just shorter name... SWITCH: for($wcetgt) { /^X86/ && do { $wcecdefs.=" -Dx86 -D_X86_ -D_i386_ -Di_386_"; - $wcelflag.=" /machine:IX86"; last; }; + $wcelflag.=" /machine:X86"; last; }; /^ARMV4[IT]/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt"; $wcecdefs.=" -DTHUMB -D_THUMB_" if($wcetgt=~/T$/); $wcecdefs.=" -QRarch4T -QRinterwork-return"; @@ -121,12 +121,12 @@ elsif ($FLAVOR =~ /CE/) $wcelflag.=" /machine:$wcetgt"; last; }; } - $cc='$(CC)'; + $cc=($ENV{CC} or "cl"); $base_cflags=' /W3 /WX /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT'; $base_cflags.=" $wcecdefs"; $base_cflags.=' -I$(WCECOMPAT)/include' if (defined($ENV{'WCECOMPAT'})); $base_cflags.=' -I$(PORTSDK_LIBPATH)/../../include' if (defined($ENV{'PORTSDK_LIBPATH'})); - if (`cl 2>&1` =~ /Version 1[4-9]\./) { + if ($cc =~ /\bcl(\.exe)*$/) { $base_cflags.=($shlib and !$fipscanisterbuild)?' /MD':' /MT'; } else { $base_cflags.=' /MC'; @@ -178,14 +178,26 @@ $rsc="rc"; $efile="/out:"; $exep='.exe'; if ($no_sock) { $ex_libs=''; } -elsif ($FLAVOR =~ /CE/) { $ex_libs='winsock.lib'; } +elsif ($FLAVOR =~ /CE/) { $ex_libs='ws2.lib'; } else { $ex_libs='ws2_32.lib'; } if ($FLAVOR =~ /CE/) { - $ex_libs.=' $(WCECOMPAT)/lib/wcecompatex.lib' if (defined($ENV{'WCECOMPAT'})); + $ex_libs.=' crypt32.lib'; # for e_capi.c + if (defined($ENV{WCECOMPAT})) + { + $ex_libs.= ' $(WCECOMPAT)/lib'; + if (-f "$ENV{WCECOMPAT}/lib/$ENV{TARGETCPU}/wcecompatex.lib") + { + $ex_libs.='/$(TARGETCPU)/whecompatex.lib'; + } + else + { + $ex_libs.='/wcecompatex.lib'; + } + } $ex_libs.=' $(PORTSDK_LIBPATH)/portlib.lib' if (defined($ENV{'PORTSDK_LIBPATH'})); - $ex_libs.=' /nodefaultlib:oldnames.lib coredll.lib corelibc.lib' if ($ENV{'TARGETCPU'} eq "X86"); + $ex_libs.=' /nodefaultlib coredll.lib corelibc.lib' if ($ENV{'TARGETCPU'} eq "X86"); } else { |