summaryrefslogtreecommitdiffstats
path: root/Configurations/windows-makefile.tmpl
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-10-14 17:10:05 +0200
committerRichard Levitte <levitte@openssl.org>2018-11-05 08:13:04 +0100
commit21712b2fc1e9ad0fa7ff9d6086b4cc6be6cb76a9 (patch)
treeb79ebc64e1eed308f2f1727fe82f86eb163e16a2 /Configurations/windows-makefile.tmpl
parentBuild: adapt Unix Makefile template to use the extra macros (diff)
downloadopenssl-21712b2fc1e9ad0fa7ff9d6086b4cc6be6cb76a9.tar.xz
openssl-21712b2fc1e9ad0fa7ff9d6086b4cc6be6cb76a9.zip
Build: adapt Windows makefile template to use the extra macros
Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7553)
Diffstat (limited to '')
-rw-r--r--Configurations/windows-makefile.tmpl12
1 files changed, 7 insertions, 5 deletions
diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl
index 6344d1862e..45c928018d 100644
--- a/Configurations/windows-makefile.tmpl
+++ b/Configurations/windows-makefile.tmpl
@@ -501,6 +501,7 @@ reconfigure reconf:
my $generator = '"'.$gen0.'"'.join('', map { " $_" } @gens);
my $generator_incs = join("", map { " -I \"$_\"" } @{$args{generator_incs}});
my $incs = join("", map { " /I \"$_\"" } @{$args{incs}});
+ my $defs = join("", map { " /D".$_ } @{$args{defs}});
my $deps = @{$args{deps}} ?
'"'.join('" "', @{$args{generator_deps}}, @{$args{deps}}).'"' : '';
@@ -558,7 +559,7 @@ EOF
$target: "$args{generator}->[0]" $deps
set ASM=\$(AS)
$generator \$@.S
- \$(CPP) $cppflags \$@.S > \$@.i && move /Y \$@.i \$@
+ \$(CPP) $cppflags $defs \$@.S > \$@.i && move /Y \$@.i \$@
del /Q \$@.S
EOF
}
@@ -571,7 +572,7 @@ EOF
}
return <<"EOF";
$target: "$args{generator}->[0]" $deps
- \$(CPP) $incs $cppflags "$args{generator}->[0]" > \$@.i && move /Y \$@.i \$@
+ \$(CPP) $incs $cppflags $defs "$args{generator}->[0]" > \$@.i && move /Y \$@.i \$@
EOF
}
}
@@ -583,6 +584,7 @@ EOF
my $srcs = '"'.join('" "', @srcs).'"';
my $deps = '"'.join('" "', @srcs, @{$args{deps}}).'"';
my $incs = join("", map { ' /I "'.$_.'"' } @{$args{incs}});
+ my $defs = join("", map { " /D".$_ } @{$args{defs}});
my $cflags = { shlib => ' $(LIB_CFLAGS)',
lib => ' $(LIB_CFLAGS)',
dso => ' $(DSO_CFLAGS)',
@@ -612,15 +614,15 @@ EOF
} elsif ($srcs[0] =~ /.S$/) {
return <<"EOF";
$obj$objext: $deps
- \$(CC) /EP /D__ASSEMBLER__ $cflags $srcs > \$@.asm && \$(AS) $asflags \$(ASOUTFLAG)\$\@ \$@.asm
+ \$(CC) /EP /D__ASSEMBLER__ $cflags $defs $srcs > \$@.asm && \$(AS) $asflags \$(ASOUTFLAG)\$\@ \$@.asm
EOF
}
my $recipe = <<"EOF";
$obj$objext: $deps
- \$(CC) $cflags -c \$(COUTFLAG)\$\@ $srcs
+ \$(CC) $cflags $defs -c \$(COUTFLAG)\$\@ $srcs
EOF
$recipe .= <<"EOF" unless $disabled{makedepend};
- \$(CC) $cflags /Zs /showIncludes $srcs 2>&1 > $obj$depext
+ \$(CC) $cflags $defs /Zs /showIncludes $srcs 2>&1 > $obj$depext
EOF
return $recipe;
}