Latest update.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
## -*- mode: perl; -*-
|
||||
# Windows OneCore targets.
|
||||
#
|
||||
# OneCore is new API stability "contract" that transcends Desktop, IoT and
|
||||
@@ -10,6 +11,25 @@
|
||||
# TODO: extend error handling to use ETW based eventing
|
||||
# (Or rework whole error messaging)
|
||||
|
||||
my $UWP_info = {};
|
||||
sub UWP_info {
|
||||
unless (%$UWP_info) {
|
||||
my $SDKver = `powershell -Command \"& {\$(Get-Item \\\"hklm:\\SOFTWARE\\WOW6432Node\\Microsoft\\Microsoft SDKs\\Windows\\\").GetValue(\\\"CurrentVersion\\\")}\"`;
|
||||
$SDKver =~ s|\R$||;
|
||||
my @SDKver_split = split(/\./, $SDKver);
|
||||
# SDK version older than 10.0.17763 don't support our ASM builds
|
||||
if ($SDKver_split[0] < 10
|
||||
|| ($SDKver_split[0] == 10
|
||||
&& $SDKver_split[1] == 0
|
||||
&& $SDKver_split[2] < 17763)) {
|
||||
$UWP_info->{disable} = [ 'asm' ];
|
||||
} else {
|
||||
$UWP_info->{disable} = [ ];
|
||||
}
|
||||
}
|
||||
return $UWP_info;
|
||||
}
|
||||
|
||||
my %targets = (
|
||||
"VC-WIN32-ONECORE" => {
|
||||
inherit_from => [ "VC-WIN32" ],
|
||||
@@ -80,7 +100,8 @@ my %targets = (
|
||||
defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",
|
||||
"_WIN32_WINNT=0x0A00"),
|
||||
dso_scheme => "",
|
||||
disable => [ 'ui-console', 'stdio', 'async', 'uplink' ],
|
||||
disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink',
|
||||
@{ UWP_info()->{disable} } ] },
|
||||
ex_libs => "WindowsApp.lib",
|
||||
},
|
||||
"VC-WIN64A-UWP" => {
|
||||
@@ -89,7 +110,8 @@ my %targets = (
|
||||
defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",
|
||||
"_WIN32_WINNT=0x0A00"),
|
||||
dso_scheme => "",
|
||||
disable => [ 'ui-console', 'stdio', 'async', 'uplink' ],
|
||||
disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink',
|
||||
@{ UWP_info()->{disable} } ] },
|
||||
ex_libs => "WindowsApp.lib",
|
||||
},
|
||||
"VC-WIN32-ARM-UWP" => {
|
||||
@@ -98,7 +120,8 @@ my %targets = (
|
||||
defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",
|
||||
"_WIN32_WINNT=0x0A00"),
|
||||
dso_scheme => "",
|
||||
disable => [ 'ui-console', 'stdio', 'async', 'uplink' ],
|
||||
disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink',
|
||||
@{ UWP_info()->{disable} } ] },
|
||||
ex_libs => "WindowsApp.lib",
|
||||
},
|
||||
"VC-WIN64-ARM-UWP" => {
|
||||
@@ -107,7 +130,8 @@ my %targets = (
|
||||
defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP",
|
||||
"_WIN32_WINNT=0x0A00"),
|
||||
dso_scheme => "",
|
||||
disable => [ 'ui-console', 'stdio', 'async', 'uplink' ],
|
||||
disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink',
|
||||
@{ UWP_info()->{disable} } ] },
|
||||
ex_libs => "WindowsApp.lib",
|
||||
},
|
||||
);
|
||||
@@ -114,6 +114,7 @@ BLDDIR={- $config{builddir} -}
|
||||
# Allow both V and VERBOSE to indicate verbosity. This only applies
|
||||
# to testing.
|
||||
VERBOSE=$(V)
|
||||
VERBOSE_FAILURE=$(VF)
|
||||
|
||||
VERSION={- "$config{full_version}" -}
|
||||
MAJOR={- $config{major} -}
|
||||
@@ -435,10 +436,12 @@ test : tests
|
||||
DEFINE BLDTOP {- builddir() -}
|
||||
DEFINE RESULT_D {- builddir(qw(test test-runs)) -}
|
||||
DEFINE OPENSSL_ENGINES {- builddir("engines") -}
|
||||
DEFINE OPENSSL_MODULES {- builddir("providers") -}
|
||||
DEFINE OPENSSL_DEBUG_MEMORY "on"
|
||||
IF "$(VERBOSE)" .NES. "" THEN DEFINE VERBOSE "$(VERBOSE)"
|
||||
$(PERL) {- sourcefile("test", "run_tests.pl") -} $(TESTS)
|
||||
DEASSIGN OPENSSL_DEBUG_MEMORY
|
||||
DEASSIGN OPENSSL_MODULES
|
||||
DEASSIGN OPENSSL_ENGINES
|
||||
DEASSIGN BLDTOP
|
||||
DEASSIGN SRCTOP
|
||||
@@ -784,15 +787,6 @@ $target : $args{generator}->[0] $deps
|
||||
EOF
|
||||
}
|
||||
} else {
|
||||
my $target = platform->asm($args{src});
|
||||
if ($args{generator}->[0] =~ /\.pl$/) {
|
||||
$generator = '$(PERL)'.$generator_incs.' '.$generator;
|
||||
} elsif ($args{generator}->[0] =~ /\.S$/) {
|
||||
$generator = undef;
|
||||
} else {
|
||||
die "Generator type for $src unknown: $generator\n";
|
||||
}
|
||||
|
||||
my $cppflags = {
|
||||
shlib => '$(LIB_CFLAGS) $(LIB_CPPFLAGS)',
|
||||
lib => '$(LIB_CFLAGS) $(LIB_CPPFLAGS)',
|
||||
@@ -809,6 +803,17 @@ EOF
|
||||
my $incs_on = join("\n\t\@ ", @{$incs_cmds[0]}) || '!';
|
||||
my $incs_off = join("\n\t\@ ", @{$incs_cmds[1]}) || '!';
|
||||
my $defs = join("", map { ",".$_ } @{$args{defs}});
|
||||
my $target = platform->asm($args{src});
|
||||
|
||||
if ($args{generator}->[0] =~ /\.pl$/) {
|
||||
$generator = '$(PERL)'.$generator_incs.' '.$generator
|
||||
.' '.$cppflags;
|
||||
} elsif ($args{generator}->[0] =~ /\.S$/) {
|
||||
$generator = undef;
|
||||
} else {
|
||||
die "Generator type for $src unknown: $generator\n";
|
||||
}
|
||||
|
||||
if (defined($generator)) {
|
||||
# If the target is named foo.S in build.info, we want to
|
||||
# end up generating foo.s in two steps.
|
||||
@@ -829,7 +834,11 @@ EOF
|
||||
# Otherwise....
|
||||
return <<"EOF";
|
||||
$target : $args{generator}->[0] $deps
|
||||
\@ $incs_on
|
||||
\@ extradefines = "$defs"
|
||||
$generator \$\@
|
||||
\@ DELETE/SYMBOL/LOCAL extradefines
|
||||
\@ $incs_off
|
||||
EOF
|
||||
}
|
||||
return <<"EOF";
|
||||
|
||||
@@ -352,6 +352,7 @@ test: tests
|
||||
PERL="$(PERL)" \
|
||||
EXE_EXT={- platform->binext() -} \
|
||||
OPENSSL_ENGINES=`cd ../$(BLDDIR)/engines 2>/dev/null && pwd` \
|
||||
OPENSSL_MODULES=`cd ../$(BLDDIR)/providers 2>/dev/null && pwd` \
|
||||
OPENSSL_DEBUG_MEMORY=on \
|
||||
$(PERL) ../$(SRCDIR)/test/run_tests.pl $(TESTS) )
|
||||
@ : {- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
|
||||
@@ -391,13 +392,13 @@ libclean:
|
||||
clean: libclean
|
||||
$(RM) $(PROGRAMS) $(TESTPROGS) $(MODULES) $(SCRIPTS)
|
||||
$(RM) $(GENERATED_MANDATORY) $(GENERATED)
|
||||
-$(RM) `find . -name .git -prune -o -name '*{- platform->depext() -}' -print`
|
||||
-$(RM) `find . -name .git -prune -o -name '*{- platform->objext() -}' -print`
|
||||
-$(RM) `find . -name '*{- platform->depext() -}' \! -name '.*' -print`
|
||||
-$(RM) `find . -name '*{- platform->objext() -}' \! -name '.*' -print`
|
||||
$(RM) core
|
||||
$(RM) tags TAGS doc-nits
|
||||
$(RM) -r test/test-runs
|
||||
$(RM) openssl.pc libcrypto.pc libssl.pc
|
||||
-$(RM) `find . -name .git -prune -o -type l -print`
|
||||
-$(RM) `find . -type l \! -name '.*' -print`
|
||||
$(RM) $(TARFILE)
|
||||
|
||||
distclean: clean
|
||||
@@ -728,9 +729,7 @@ generate: generate_apps generate_crypto_bn generate_crypto_objects \
|
||||
|
||||
.PHONY: doc-nits
|
||||
doc-nits: build_generated
|
||||
(cd $(SRCDIR); $(PERL) util/find-doc-nits -n -p -s ) >doc-nits
|
||||
@if [ -s doc-nits ] ; then cat doc-nits ; exit 1; \
|
||||
else echo 'doc-nits: no errors.'; rm doc-nits ; fi
|
||||
(cd $(SRCDIR); $(PERL) util/find-doc-nits -n -p -s )
|
||||
|
||||
# Test coverage is a good idea for the future
|
||||
#coverage: $(PROGRAMS) $(TESTPROGRAMS)
|
||||
@@ -742,6 +741,12 @@ lint:
|
||||
generate_apps:
|
||||
( cd $(SRCDIR); $(PERL) VMS/VMSify-conf.pl \
|
||||
< apps/openssl.cnf > apps/openssl-vms.cnf )
|
||||
@ : {- output_off() if $disabled{apps}; "" -}
|
||||
( b=`pwd`; cd $(SRCDIR); \
|
||||
$(PERL) -I$$b apps/progs.pl -H $(APPS_OPENSSL) > apps/progs.h )
|
||||
( b=`pwd`; cd $(SRCDIR); \
|
||||
$(PERL) -I$$b apps/progs.pl -C $(APPS_OPENSSL) > apps/progs.c )
|
||||
@ : {- output_on() if $disabled{apps}; "" -}
|
||||
|
||||
generate_crypto_bn:
|
||||
( cd $(SRCDIR); $(PERL) crypto/bn/bn_prime.pl > crypto/bn/bn_prime.h )
|
||||
@@ -973,8 +978,16 @@ $args{src}: $args{generator}->[0] $deps
|
||||
EOF
|
||||
}
|
||||
} else {
|
||||
my $cppflags = {
|
||||
shlib => '$(LIB_CFLAGS) $(LIB_CPPFLAGS)',
|
||||
lib => '$(LIB_CFLAGS) $(LIB_CPPFLAGS)',
|
||||
dso => '$(DSO_CFLAGS) $(DSO_CPPFLAGS)',
|
||||
bin => '$(BIN_CFLAGS) $(BIN_CPPFLAGS)'
|
||||
} -> {$args{intent}};
|
||||
|
||||
if ($args{generator}->[0] =~ /\.pl$/) {
|
||||
$generator = 'CC="$(CC)" $(PERL)'.$generator_incs.' '.$generator;
|
||||
$generator = 'CC="$(CC)" $(PERL)'.$generator_incs.' '.$generator
|
||||
.' "$(PERLASM_SCHEME)"'.$incs.' '.$cppflags.$defs.' $(PROCESSSOR)';
|
||||
} elsif ($args{generator}->[0] =~ /\.m4$/) {
|
||||
$generator = 'm4 -B 8192'.$generator_incs.' '.$generator.' >'
|
||||
} elsif ($args{generator}->[0] =~ /\.S$/) {
|
||||
@@ -983,12 +996,6 @@ EOF
|
||||
die "Generator type for $args{src} unknown: $generator\n";
|
||||
}
|
||||
|
||||
my $cppflags = {
|
||||
shlib => '$(LIB_CFLAGS) $(LIB_CPPFLAGS)',
|
||||
lib => '$(LIB_CFLAGS) $(LIB_CPPFLAGS)',
|
||||
dso => '$(DSO_CFLAGS) $(DSO_CPPFLAGS)',
|
||||
bin => '$(BIN_CFLAGS) $(BIN_CPPFLAGS)'
|
||||
} -> {$args{intent}};
|
||||
if (defined($generator)) {
|
||||
return <<"EOF";
|
||||
$args{src}: $args{generator}->[0] $deps
|
||||
|
||||
@@ -369,6 +369,7 @@ test: tests
|
||||
set RESULT_D=$(BLDDIR)\test\test-runs
|
||||
set PERL=$(PERL)
|
||||
set OPENSSL_ENGINES=$(MAKEDIR)\engines
|
||||
set OPENSSL_MODULES=$(MAKEDIR)\providers
|
||||
set OPENSSL_DEBUG_MEMORY=on
|
||||
"$(PERL)" "$(SRCDIR)\test\run_tests.pl" $(TESTS)
|
||||
@{- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
|
||||
@@ -569,22 +570,23 @@ $target: "$args{generator}->[0]" $deps
|
||||
EOF
|
||||
}
|
||||
} else {
|
||||
my $cppflags = {
|
||||
shlib => '$(LIB_CFLAGS) $(LIB_CPPFLAGS)',
|
||||
lib => '$(LIB_CFLAGS) $(LIB_CPPFLAGS)',
|
||||
dso => '$(DSO_CFLAGS) $(DSO_CPPFLAGS)',
|
||||
bin => '$(BIN_CFLAGS) $(BIN_CPPFLAGS)'
|
||||
} -> {$args{intent}};
|
||||
my $target = platform->asm($args{src});
|
||||
|
||||
if ($args{generator}->[0] =~ /\.pl$/) {
|
||||
$generator = '"$(PERL)"'.$generator_incs.' '.$generator;
|
||||
$generator = '"$(PERL)"'.$generator_incs.' '.$generator
|
||||
.' "$(PERLASM_SCHEME)"'.$incs.' '.$cppflags.$defs.' $(PROCESSSOR)';
|
||||
} elsif ($args{generator}->[0] =~ /\.S$/) {
|
||||
$generator = undef;
|
||||
} else {
|
||||
die "Generator type for $src unknown: $generator\n";
|
||||
}
|
||||
|
||||
my $cppflags = $incs;
|
||||
$cppflags .= {
|
||||
shlib => ' $(LIB_CFLAGS) $(LIB_CPPFLAGS)',
|
||||
lib => ' $(LIB_CFLAGS) $(LIB_CPPFLAGS)',
|
||||
dso => ' $(DSO_CFLAGS) $(DSO_CPPFLAGS)',
|
||||
bin => ' $(BIN_CFLAGS) $(BIN_CPPFLAGS)'
|
||||
} -> {$args{intent}};
|
||||
if (defined($generator)) {
|
||||
# If the target is named foo.S in build.info, we want to
|
||||
# end up generating foo.s in two steps.
|
||||
@@ -593,7 +595,7 @@ EOF
|
||||
$target: "$args{generator}->[0]" $deps
|
||||
set ASM=\$(AS)
|
||||
$generator \$@.S
|
||||
\$(CPP) $cppflags $defs \$@.S > \$@.i && move /Y \$@.i \$@
|
||||
\$(CPP) $incs $cppflags $defs \$@.S > \$@.i && move /Y \$@.i \$@
|
||||
del /Q \$@.S
|
||||
EOF
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user