diff options
Diffstat (limited to 'Configurations/windows-makefile.tmpl')
-rw-r--r-- | Configurations/windows-makefile.tmpl | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl index bf214b0ee2..1e3d63f8d1 100644 --- a/Configurations/windows-makefile.tmpl +++ b/Configurations/windows-makefile.tmpl @@ -860,18 +860,22 @@ EOF my $deps = join(" ", @objs, @defs, @deps); my $import = platform->sharedlib_import($lib); my $dll = platform->sharedlib($lib); - my $shared_def = join("", map { " /def:$_" } @defs); + my $shared_def = join("", map { " $target{lddefflag}$_" } @defs); + my $implib_rule = $target{ld_implib_rule} || ""; + my $implib_flag = $target{ld_implib_flag} + ? "$target{ld_implib_flag}$import" + : ""; return <<"EOF" # The import library may look like a static library, but it is not. # We MUST make the import library depend on the DLL, in case someone # mistakenly removes the latter. $import: $dll + $implib_rule $dll: $deps IF EXIST $full.manifest DEL /F /Q $full.manifest IF EXIST \$@ DEL /F /Q \$@ - \$(LD) \$(LDFLAGS) \$(LIB_LDFLAGS) \\ - /implib:$import \$(LDOUTFLAG)$dll$shared_def @<< || (DEL /Q \$(\@B).* $import; EXIT 1) -$objs$target{ld_resp_delim}$linklibs\$(LIB_EX_LIBS) + \$(LD) \$(LDFLAGS) \$(LIB_LDFLAGS) @<< $implib_flag || (DEL /Q \$(\@B).* $import; EXIT 1) +$objs$target{ld_resp_delim}\$(LDOUTFLAG)$dll$target{ldpostoutflag}$target{ld_resp_delim}$linklibs\$(LIB_EX_LIBS)$shared_def << IF EXIST $dll.manifest \\ \$(MT) \$(MTFLAGS) \$(MTINFLAG)$dll.manifest \$(MTOUTFLAG)$dll @@ -897,13 +901,12 @@ EOF my $objs = join($target{ld_resp_delim}, @objs); my $linklibs = join("", map { "$_$target{ld_resp_delim}" } @deps); my $deps = join(" ", @objs, @defs, @deps); - my $shared_def = join("", map { " /def:$_" } @defs); + my $shared_def = join("", map { " $target{lddefflag}$_" } @defs); return <<"EOF"; $dso: $deps IF EXIST $dso.manifest DEL /F /Q $dso.manifest - \$(LD) \$(LDFLAGS) \$(DSO_LDFLAGS) \\ - \$(LDOUTFLAG)$dso$shared_def @<< || (DEL /Q \$(\@B).* $dso_n.*; EXIT 1) -$objs$target{ld_resp_delim}$linklibs \$(DSO_EX_LIBS) + \$(LD) \$(LDFLAGS) \$(DSO_LDFLAGS) @<< || (DEL /Q \$(\@B).* $dso_n.*; EXIT 1) +$objs$target{ld_resp_delim}\$(LDOUTFLAG)$dso$target{ldpostoutflag}$target{ld_resp_delim}$linklibs \$(DSO_EX_LIBS)$shared_def << IF EXIST $dso.manifest \\ \$(MT) \$(MTFLAGS) \$(MTINFLAG)$dso.manifest \$(MTOUTFLAG)$dso |