summaryrefslogtreecommitdiffstats
path: root/Configurations/windows-makefile.tmpl
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-10-04 17:41:12 +0200
committerRichard Levitte <levitte@openssl.org>2018-10-05 08:22:42 +0200
commit66a24ab86816c240279d238aca41c68d57ead35c (patch)
treeebfcac2ce4f4993bb078ea000fe8c0ccce5ba356 /Configurations/windows-makefile.tmpl
parented57d89bd18f6f4b3db52567f9a718c31d717aa8 (diff)
Add build file support for generic symbol exports with DSOs
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7347)
Diffstat (limited to 'Configurations/windows-makefile.tmpl')
-rw-r--r--Configurations/windows-makefile.tmpl25
1 files changed, 15 insertions, 10 deletions
diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl
index 46f564dc55..6ab298e4ee 100644
--- a/Configurations/windows-makefile.tmpl
+++ b/Configurations/windows-makefile.tmpl
@@ -512,9 +512,12 @@ reconfigure reconf:
my $mkdef = abs2rel(rel2abs(catfile($config{sourcedir},
"util", "mkdef.pl")),
rel2abs($config{builddir}));
+ my $ord_ver = $args{intent} eq 'lib' ? ' --version $(VERSION)' : '';
+ my $ord_name =
+ $args{generator}->[1] || basename($args{product}, $dsoext);
return <<"EOF";
-$target: $args{generator}->[0] $deps
- \$(PERL) $mkdef --ordinals $args{generator}->[0] --name $args{generator}->[1] --OS windows > $target
+$target: $args{generator}->[0] $deps $mkdef
+ \$(PERL) $mkdef$ord_ver --ordinals $args{generator}->[0] --name $ord_name --OS windows > $target
EOF
} elsif ($args{src} !~ /\.[sS]$/) {
my $target = $args{src};
@@ -670,20 +673,22 @@ EOF
my %args = @_;
my $dso = $args{lib};
my $dso_n = basename($dso);
- my @objs = map { (my $x = $_) =~ s|\.o$|$objext|; $x } @{$args{objs}};
+ my @objs = map { (my $x = $_) =~ s|\.o$|$objext|; $x }
+ grep { $_ =~ m/\.(?:o|res)$/ }
+ @{$args{objs}};
+ my @defs = map { (my $x = $_) =~ s|\.ld$|$defext|; $x }
+ grep { $_ =~ /\.ld$/ }
+ @{$args{objs}};
my @deps = compute_lib_depends(@{$args{deps}});
my $objs = join("\n", @objs);
my $linklibs = join("", map { "$_\n" } @deps);
- my $deps = join(" ", @objs, @deps);
+ my $deps = join(" ", @objs, @defs, @deps);
+ my $shared_def = join("", map { " /def:$_" } @defs);
return <<"EOF";
$dso$dsoext: $deps
IF EXIST $dso$dsoext.manifest DEL /F /Q $dso$dsoext.manifest
- \$(LD) \$(LDFLAGS) \$(DSO_LDFLAGS) \$(LDOUTFLAG)$dso$dsoext /def:<< @<<
-LIBRARY $dso_n
-EXPORTS
- bind_engine @1
- v_check @2
-<<
+ \$(LD) \$(LDFLAGS) \$(DSO_LDFLAGS) \\
+ \$(LDOUTFLAG)$dso$dsoext$shared_def @<< || (DEL /Q \$(\@B).* $dso.* && EXIT 1)
$objs
$linklibs \$(DSO_EX_LIBS)
<<