提交 8c3bc594 编写于 作者: R Richard Levitte

Processing GNU-style "make variables" - separate CPP flags from C flags

C preprocessor flags get separated from C flags, which has the
advantage that we don't get loads of macro definitions and inclusion
directory specs when linking shared libraries, DSOs and programs.

This is a step to add support for "make variables" when configuring.
Reviewed-by: NTim Hudson <tjh@openssl.org>
Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5177)
上级 df05f155
......@@ -4,6 +4,8 @@ my %targets=(
template => 1,
cflags => "",
cppflags => "",
lflags => "",
defines => [],
thread_scheme => "(unknown)", # Assume we don't know
thread_defines => [],
......
此差异已折叠。
......@@ -45,6 +45,19 @@ In each table entry, the following keys are significant:
Note: if the same feature is both enabled
and disabled, disable wins.
cpp => The C preprocessor command, normally not
given, as the build file defaults are
usually good enough.
cppflags => The C preprocessor flags.
defines => As an alternative, macro definitions may be
given here instead of in `cppflags'. If
given here, they MUST be as an array of the
string such as "MACRO=value", or just
"MACRO" for definitions without value.
includes => As an alternative, inclusion directories
may be given here instead of in `cppflags'.
If given here, the MUST be an array of
strings, one directory specification each.
cc => The C compiler command, usually one of "cc",
"gcc" or "clang". This command is normally
also used to link object files and
......@@ -59,11 +72,6 @@ In each table entry, the following keys are significant:
cxxflags => Flags that are used at all times when
compiling C++ object files. If unset, it
gets the same value as cflags.
defines => As an alternative, macro definitions may be
present here instead of in `cflags'. If
given here, they MUST be as an array of the
string such as "MACRO=value", or just
"MACRO" for definitions without value.
shared_cflag => Extra compilation flags used when
compiling for shared libraries, typically
something like "-fPIC".
......
......@@ -172,11 +172,20 @@ OPENSSLDIR_C={- $osslprefix -}DATAROOT:[000000]
ENGINESDIR_C={- $osslprefix -}ENGINES{- $sover_dirname.$target{pointer_size} -}:
CC= {- $target{cc} -}
CFLAGS= /DEFINE=({- join(",", @{$target{defines}}, @{$config{defines}},"OPENSSLDIR=\"\"\"\$(OPENSSLDIR_C)\"\"\"","ENGINESDIR=\"\"\"\$(ENGINESDIR_C)\"\"\"") -}) {- $target{cflags} -} {- $config{cflags} -}
CFLAGS_Q=$(CFLAGS)
DEPFLAG= /DEFINE=({- join(",", @{$config{depdefines}}) -})
DEFINES={- our $defines = join(",",
'__dummy', # To make comma processing easier
@{$target{defines}}, @{$config{defines}}) -}
CPPFLAGS={- our $cppflags = join('', $target{cppflags}, $config{cppflags}) -}
CPPFLAGS_Q={- $cppflags =~ s|"|""|g; $defines =~ s|"|""|g;
$cppflags."/DEFINE($defines)" -}
CFLAGS={- $target{cflags} -} {- $config{cflags} -}
LDFLAGS= {- $target{lflags} -}
EX_LIBS= {- $target{ex_libs} ? ",".$target{ex_libs} : "" -}{- $config{ex_libs} ? ",".$config{ex_libs} : "" -}
LIB_DEFINES={- join("",
(map { ",$_" }
@{$target{shared_defines}},
'OPENSSLDIR="""$(OPENSSLDIR_C)"""',
'ENGINESDIR="""$(ENGINESDIR_C)"""')) -}
LIB_CFLAGS={- $target{lib_cflags} // "" -}
DSO_CFLAGS={- $target{dso_cflags} // "" -}
BIN_CFLAGS={- $target{bin_cflags} // "" -}
......@@ -605,16 +614,26 @@ EOF
my $srcs =
join(", ",
map { abs2rel(rel2abs($_), rel2abs($forward)) } @{$args{srcs}});
my $ecflags;
my $cflags = '$(CFLAGS)';
if ($args{installed}) {
$ecflags = { lib => '$(LIB_CFLAGS)',
$cflags .= { lib => '$(LIB_CFLAGS)',
dso => '$(DSO_CFLAGS)',
bin => '$(BIN_CFLAGS)' } -> {$args{intent}};
} else {
$ecflags = { lib => '$(NO_INST_LIB_CFLAGS)',
$cflags .= { lib => '$(NO_INST_LIB_CFLAGS)',
dso => '$(NO_INST_DSO_CFLAGS)',
bin => '$(NO_INST_BIN_CFLAGS)' } -> {$args{intent}};
}
$cflags .= '$(CPPFLAGS)';
$cflags .= { lib => '$(LIB_CPPFLAGS)',
dso => '$(DSO_CPPFLAGS)',
bin => '$(BIN_CPPFLAGS)' } -> {$args{intent}};
my $defines = '$(DEFINES)';
$defines .= { lib => '$(LIB_DEFINES)',
dso => '$(DSO_DEFINES)',
bin => '$(BIN_DEFINES)' } -> {$args{intent}};
$cflags .= '/DEFINE=('.$defines.')';
my $incs_on = "\@ !";
my $incs_off = "\@ !";
my $incs = "";
......@@ -645,7 +664,7 @@ $obj.OBJ : $deps
${before}
SET DEFAULT $forward
$incs_on
\$(CC) \$(CFLAGS)${ecflags}${incs}${depbuild} /OBJECT=${objd}${objn}.OBJ /REPOSITORY=$backward $srcs
\$(CC) ${cflags}${incs}${depbuild} /OBJECT=${objd}${objn}.OBJ /REPOSITORY=$backward $srcs
$incs_off
SET DEFAULT $backward
${after}
......
......@@ -184,20 +184,33 @@ HTMLSUFFIX=html
ECHO = echo
CROSS_COMPILE= {- $config{cross_compile_prefix} -}
CPPFLAGS={- our $cppflags = join(" ",
(map { "-D".$_}
@{$target{defines}}, @{$config{defines}}),
(map { "-I".$_}
@{$target{includes}}, @{$config{includes}}),
$target{cppflags}, $config{cppflags}) -}
CPPFLAGS_Q={- $cppflags =~ s|([\\"])|\\$1|g; $cppflags -}
CC= $(CROSS_COMPILE){- $target{cc} -}
CFLAGS={- our $cflags2 = join(" ",(map { "-D".$_} @{$target{defines}}, @{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(ENGINESDIR)\\\"\"") -} {- $target{cflags} -} {- $config{cflags} -}
CFLAGS_Q={- $cflags2 =~ s|([\\"])|\\$1|g; $cflags2 -} {- $config{cflags} -}
CFLAGS={- $target{cflags} -} {- $config{cflags} -}
CXX= $(CROSS_COMPILE){- $target{cxx} -}
CXXFLAGS={- our $cxxflags2 = join(" ",(map { "-D".$_} @{$target{defines}}, @{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(ENGINESDIR)\\\"\"") -} {- $target{cxxflags} -} {- $config{cxxflags} -} -std=c++11
CXXFLAGS={- $target{cxxflags} -} {- $config{cxxflags} -} -std=c++11
LDFLAGS= {- $config{lflags} -} {- $target{lflags} -}
PLIB_LDFLAGS= {- $target{plib_lflags} -}
EX_LIBS= {- $target{ex_libs} -} {- $config{ex_libs} -}
LIB_CPPFLAGS={- join(" ",
(map { "-D".$_}
'OPENSSLDIR="\"$(OPENSSLDIR)\""',
'ENGINESDIR="\"$(ENGINESDIR)\""'),
$target{shared_cppflag} || "") -}
LIB_CFLAGS={- $target{shared_cflag} || "" -}
LIB_CXXFLAGS={- $target{shared_cxxflag} || "" -}
LIB_LDFLAGS={- $target{shared_ldflag}." ".$config{shared_ldflag} -}
DSO_CPPFLAGS={- $target{dso_cppflags} || "" -}
DSO_CFLAGS={- $target{dso_cflags} || "" -}
DSO_CXXFLAGS={- $target{dso_cxxflags} || "" -}
DSO_LDFLAGS={- $target{dso_lflags} || "" -}
BIN_CPPFLAGS={- $target{bin_cppflags} || "" -}
BIN_CFLAGS={- $target{bin_cflags} || "" -}
BIN_CXXFLAGS={- $target{bin_cxxflags} || "" -}
BIN_LDFLAGS={- $target{bin_lflags} || "" -}
......@@ -844,7 +857,7 @@ EOF
$target: $args{generator}->[0] $deps
( trap "rm -f \$@.*" INT 0; \\
$generator \$@.S; \\
\$(CC) $incs \$(CFLAGS) -E \$@.S | \\
\$(CC) $incs \$(CFLAGS) \$(CPPFLAGS) -E \$@.S | \\
\$(PERL) -ne '/^#(line)?\\s*[0-9]+/ or print' > \$@.i && \\
mv -f \$@.i \$@ )
EOF
......@@ -857,7 +870,7 @@ EOF
}
return <<"EOF";
$args{src}: $args{generator}->[0] $deps
\$(CC) $incs \$(CFLAGS) -E $args{generator}->[0] | \\
\$(CC) $incs \$(CFLAGS) \$(CPPFLAGS) -E $args{generator}->[0] | \\
\$(PERL) -ne '/^#(line)?\\s*[0-9]+/ or print' > \$@
EOF
}
......@@ -884,23 +897,34 @@ EOF
}
}
my $cmd = '$(CC)';
my $cmdflags = '$(CFLAGS) -c';
my $cmdflags = '$(CFLAGS)';
my $cmdcompile = ' -c';
my $makedepprog = $disabled{makedepend} ? undef : $config{makedepprog};
if (grep /\.rc$/, @srcs) {
$cmd = '$(RC)';
$cmdflags = '$(RCFLAGS)';
$cmdcompile = '';
$makedepprog = undef;
} elsif (grep /\.(cc|cpp)$/, @srcs) {
$cmd = '$(CXX)';
$cmdflags = '$(CXXFLAGS) -c';
$cmdflags = '$(CXXFLAGS)';
$cmdflags .= ' ' . { lib => '$(LIB_CXXFLAGS)',
dso => '$(DSO_CXXFLAGS)',
bin => '$(BIN_CXXFLAGS)' } -> {$args{intent}};
$cmdflags .= ' $(CPPFLAGS)';
$cmdflags .= ' ' . { lib => '$(LIB_CPPFLAGS)',
dso => '$(DSO_CPPFLAGS)',
bin => '$(BIN_CPPFLAGS)' } -> {$args{intent}};
} else {
$cmdflags .= ' ' . { lib => '$(LIB_CFLAGS)',
dso => '$(DSO_CFLAGS)',
bin => '$(BIN_CFLAGS)' } -> {$args{intent}};
$cmdflags .= ' $(CPPFLAGS)';
$cmdflags .= ' ' . { lib => '$(LIB_CPPFLAGS)',
dso => '$(DSO_CPPFLAGS)',
bin => '$(BIN_CPPFLAGS)' } -> {$args{intent}};
}
$cmdflags .= $cmdcompile;
my $recipe = <<"EOF";
$obj$objext: $deps
EOF
......
......@@ -160,7 +160,14 @@ ENGINESDIR=$(ENGINESDIR_dev)$(ENGINESDIR_dir)
!ENDIF
CC={- $target{cc} -}
CFLAGS={- join(" ",(map { "-D".$_} @{$target{defines}}, @{$config{defines}})) -} {- join(" ", quotify_l("-DENGINESDIR=\"$enginesdir\"", "-DOPENSSLDIR=\"$openssldir\"")) -} {- $target{cflags} -} {- $config{cflags} -}
CPPFLAGS={- our $cppflags = join(" ",
(map { "-D".$_}
@{$target{defines}}, @{$config{defines}}),
(map { " /I ".$_}
@{$target{includes}}, @{$config{includes}}),
$target{cppflags}, $config{cppflags}) -}
CPPFLAGS_Q={- $cppflags =~ s|([\\"])|\\$1|g; $cppflags -}
CFLAGS={- $target{cflags} -} {- $config{cflags} -}
COUTFLAG={- $target{coutflag} || "/Fo" -}$(OSSL_EMPTY)
RC={- $target{rc} || "rc" -}
RCOUTFLAG={- $target{rcoutflag} || "/fo" -}$(OSSL_EMPTY)
......@@ -168,10 +175,17 @@ LD={- $target{ld} || "link" -}
LDFLAGS={- $target{lflags} -}
LDOUTFLAG={- $target{loutflag} || "/out:" -}$(OSSL_EMPTY)
EX_LIBS={- $target{ex_libs} -}
LIB_CPPFLAGS={- join(" ",
$target{shared_cppflag} || "",
(map { quotiry_l("-D".$_) }
'OPENSSLDIR="$(OPENSSLDIR)"',
'ENGINESDIR="$(ENGINESDIR)"')) -}
LIB_CFLAGS={- join(" ", $target{lib_cflags}, $target{shared_cflag}) || "" -}
LIB_LDFLAGS={- $target{shared_ldflag} || "" -}
DSO_CPPFLAGS={- $target{dso_cppflags} || "" -}
DSO_CFLAGS={- $target{dso_cflags} || "" -}
DSO_LDFLAGS={- $target{dso_ldflag} || "" -}
BIN_CPPFLAGS={- $target{dso_cppflags} || "" -}
BIN_CFLAGS={- $target{bin_cflags} -}
BIN_LDFLAGS={- $target{bin_lflags} -}
......@@ -427,7 +441,7 @@ EOF
$target: "$args{generator}->[0]" $deps
set ASM=\$(AS)
$generator \$@.S
\$(CC) $incs \$(CFLAGS) /EP /C \$@.S > \$@.i && move /Y \$@.i \$@
\$(CC) $incs \$(CFLAGS) \$(CPPFLAGS) /EP /C \$@.S > \$@.i && move /Y \$@.i \$@
del /Q \$@.S
EOF
}
......@@ -440,7 +454,7 @@ EOF
}
return <<"EOF";
$target: "$args{generator}->[0]" $deps
\$(CC) $incs \$(CFLAGS) /EP /C "$args{generator}->[0]" > \$@.i && move /Y \$@.i \$@
\$(CC) $incs \$(CFLAGS) \$(CPPFLAGS) /EP /C "$args{generator}->[0]" > \$@.i && move /Y \$@.i \$@
EOF
}
}
......@@ -457,9 +471,15 @@ EOF
$incs .= ' /I "'.$withargs{zlib_include}.'"';
}
}
my $ecflags = { lib => '$(LIB_CFLAGS)',
dso => '$(DSO_CFLAGS)',
bin => '$(BIN_CFLAGS)' } -> {$args{intent}};
my $cflags = '$(CFLAGS)';
$cflags .= { lib => ' $(LIB_CFLAGS)',
dso => ' $(DSO_CFLAGS)',
bin => ' $(BIN_CFLAGS)' } -> {$args{intent}};
$cflags .= $incs;
$cflags .= ' $(CPPFLAGS)';
$cflags .= { lib => ' $(LIB_CPPFLAGS)',
dso => ' $(DSO_CPPFLAGS)',
bin => ' $(BIN_CPPFLAGS)' } -> {$args{intent}};
my $makedepprog = $config{makedepprog};
if ($srcs[0] =~ /\.rc$/) {
return <<"EOF";
......@@ -476,7 +496,7 @@ EOF
}
return <<"EOF" if (!$disabled{makedepend});
$obj$depext: $deps
\$(CC) \$(CFLAGS) $ecflags$inc /Zs /showIncludes $srcs 2>&1 | \\
\$(CC) $cflags /Zs /showIncludes $srcs 2>&1 | \\
"\$(PERL)" -n << > $obj$depext
chomp;
s/^Note: including file: *//;
......@@ -484,13 +504,13 @@ s/^Note: including file: *//;
END { print '$obj$objext: ',join(" ", sort keys \%collect),"\\n" }
<<
$obj$objext: $obj$depext
\$(CC) $incs \$(CFLAGS) $ecflags -c \$(COUTFLAG)\$\@ @<<
\$(CC) $cflags -c \$(COUTFLAG)\$\@ @<<
$srcs
<<
EOF
return <<"EOF" if ($disabled{makedepend});
$obj$objext: $deps
\$(CC) $incs \$(CFLAGS) $ecflags -c \$(COUTFLAG)\$\@ $srcs
\$(CC) $cflags -c \$(COUTFLAG)\$\@ $srcs
EOF
}
......
......@@ -520,7 +520,9 @@ my $no_sse2=0;
&usage if ($#ARGV < 0);
my $user_cflags="";
my $user_cppflags=();
my @user_defines=();
my @user_includes=();
$config{openssl_api_defines}=[];
$config{openssl_algorithm_defines}=[];
$config{openssl_thread_defines}=[];
......@@ -762,6 +764,14 @@ while (@argvcopy)
{
push @user_defines, $1;
}
elsif (/^-I(.*)$/)
{
push @user_includes, $1;
}
elsif (/^-Wp,$/)
{
$user_cppflags.=" ".$_;
}
else # common if (/^[-+]/), just pass down...
{
$_ =~ s/%([0-9a-f]{1,2})/chr(hex($1))/gei;
......@@ -1053,6 +1063,8 @@ $config{build_file} = $target{build_file};
# or release_ attributes.
# Do it in such a way that no spurious space is appended (hence the grep).
$config{defines} = [];
$config{includes} = [];
$config{cppflags} = "";
$config{cflags} = "";
$config{cxxflags} = "";
$config{lflags} = "";
......@@ -1099,10 +1111,6 @@ if ($target =~ /linux.*-mips/ && !$disabled{asm} && $user_cflags !~ /-m(ips|arch
$config{cflags}="-mips3 $config{cflags}" if ($target =~ /mips64/);
}
my $no_shared_warn=0;
my $no_user_cflags=0;
my $no_user_defines=0;
# The DSO code currently always implements all functions so that no
# applications will have to worry about that from a compilation point
# of view. However, the "method"s may return zero unless that platform
......@@ -1145,7 +1153,7 @@ unless ($disabled{threads}) {
# system-dependent compiler options that are necessary. We
# can't truly check that the given options are correct, but
# we expect the user to know what [s]He is doing.
if ($no_user_cflags && $no_user_defines) {
if (!$user_cflags && !@user_defines) {
die "You asked for multi-threading support, but didn't\n"
,"provide any system-specific compiler options\n";
}
......@@ -1166,6 +1174,7 @@ if (defined($disabled{"deprecated"})) {
$config{api} = $maxapi;
}
my $no_shared_warn=0;
if ($target{shared_target} eq "")
{
$no_shared_warn = 1
......@@ -1208,8 +1217,10 @@ unless ($disabled{"fuzz-libfuzzer"} && $disabled{"fuzz-afl"}
# This saves the build files from having to check
if ($disabled{pic})
{
foreach (qw(shared_cflag shared_cxxflag shared_ldflag
dso_cflags dso_cxxflags dso_lflags))
foreach (qw(shared_cflag shared_cxxflag shared_cppflag
shared_defines shared_includes shared_ldflag
dso_cflags dso_cxxflags dso_cppflags
dso_defines dso_includes dso_lflags))
{
$target{$_} = "";
}
......@@ -1378,10 +1389,11 @@ unless ($disabled{"crypto-mdebug-backtrace"})
}
}
if ($user_cflags ne "") { $config{cflags}="$config{cflags}$user_cflags"; $config{cxxflags}="$config{cxxflags}$user_cflags";}
else { $no_user_cflags=1; }
if (@user_defines) { $config{defines}=[ @{$config{defines}}, @user_defines ]; }
else { $no_user_defines=1; }
$config{cppflags}.=$user_cppflags;
push @{$config{defines}}, @user_defines;
push @{$config{includes}}, @user_includes;
$config{cflags}.=$user_cflags;
$config{cxxflags}.=$user_cflags;
# ALL MODIFICATIONS TO %config and %target MUST BE DONE FROM HERE ON
......@@ -2689,9 +2701,12 @@ sub print_table_entry
my @sequence = (
"sys_id",
"cpp",
"cppflags",
"defines",
"includes",
"cc",
"cflags",
"defines",
"unistd",
"ld",
"lflags",
......
......@@ -5,11 +5,17 @@ SOURCE[../../libcrypto]=\
GENERATE[aes-ia64.s]=asm/aes-ia64.S
GENERATE[aes-586.s]=asm/aes-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
GENERATE[aes-586.s]=asm/aes-586.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
DEPEND[aes-586.s]=../perlasm/x86asm.pl
GENERATE[vpaes-x86.s]=asm/vpaes-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
GENERATE[vpaes-x86.s]=asm/vpaes-x86.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
DEPEND[vpaes-586.s]=../perlasm/x86asm.pl
GENERATE[aesni-x86.s]=asm/aesni-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
GENERATE[aesni-x86.s]=asm/aesni-x86.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
DEPEND[aesni-586.s]=../perlasm/x86asm.pl
GENERATE[aes-x86_64.s]=asm/aes-x86_64.pl $(PERLASM_SCHEME)
......
......@@ -2,5 +2,7 @@ LIBS=../../libcrypto
SOURCE[../../libcrypto]=bf_skey.c bf_ecb.c bf_cfb64.c bf_ofb64.c \
{- $target{bf_asm_src} -}
GENERATE[bf-586.s]=asm/bf-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
GENERATE[bf-586.s]=asm/bf-586.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
DEPEND[bf-586.s]=../perlasm/x86asm.pl ../perlasm/cbc.pl
......@@ -11,16 +11,20 @@ INCLUDE[../../libcrypto]=../../crypto/include
INCLUDE[bn_exp.o]=..
GENERATE[bn-586.s]=asm/bn-586.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
DEPEND[bn-586.s]=../perlasm/x86asm.pl
GENERATE[co-586.s]=asm/co-586.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
DEPEND[co-586.s]=../perlasm/x86asm.pl
GENERATE[x86-mont.s]=asm/x86-mont.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
DEPEND[x86-mont.s]=../perlasm/x86asm.pl
GENERATE[x86-gf2m.s]=asm/x86-gf2m.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
DEPEND[x86-gf2m.s]=../perlasm/x86asm.pl
GENERATE[sparcv9a-mont.S]=asm/sparcv9a-mont.pl $(PERLASM_SCHEME)
......@@ -49,7 +53,8 @@ GENERATE[rsaz-x86_64.s]=asm/rsaz-x86_64.pl $(PERLASM_SCHEME)
GENERATE[rsaz-avx2.s]=asm/rsaz-avx2.pl $(PERLASM_SCHEME)
GENERATE[bn-ia64.s]=asm/ia64.S
GENERATE[ia64-mont.s]=asm/ia64-mont.pl $(CFLAGS) $(LIB_CFLAGS)
GENERATE[ia64-mont.s]=asm/ia64-mont.pl \
$(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS)
GENERATE[parisc-mont.s]=asm/parisc-mont.pl $(PERLASM_SCHEME)
......
......@@ -11,14 +11,16 @@ EXTRA= ../ms/uplink-x86.pl ../ms/uplink.c ../ms/applink.c \
ppccpuid.pl pariscid.pl alphacpuid.pl arm64cpuid.pl armv4cpuid.pl
DEPEND[cversion.o]=buildinf.h
GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(CFLAGS_Q)" "$(PLATFORM)"
GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)"
DEPEND[buildinf.h]=../configdata.pm
GENERATE[uplink-x86.s]=../ms/uplink-x86.pl $(PERLASM_SCHEME)
GENERATE[uplink-x86_64.s]=../ms/uplink-x86_64.pl $(PERLASM_SCHEME)
GENERATE[uplink-ia64.s]=../ms/uplink-ia64.pl $(PERLASM_SCHEME)
GENERATE[x86cpuid.s]=x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
GENERATE[x86cpuid.s]=x86cpuid.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
DEPEND[x86cpuid.s]=perlasm/x86asm.pl
GENERATE[x86_64cpuid.s]=x86_64cpuid.pl $(PERLASM_SCHEME)
......
......@@ -3,7 +3,9 @@ SOURCE[../../libcrypto]=\
cmll_ecb.c cmll_ofb.c cmll_cfb.c cmll_ctr.c \
{- $target{cmll_asm_src} -}
GENERATE[cmll-x86.s]=asm/cmll-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
GENERATE[cmll-x86.s]=asm/cmll-x86.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
DEPEND[cmll-x86.s]=../perlasm/x86asm.pl
GENERATE[cmll-x86_64.s]=asm/cmll-x86_64.pl $(PERLASM_SCHEME)
GENERATE[cmllt4-sparcv9.S]=asm/cmllt4-sparcv9.pl $(PERLASM_SCHEME)
......
......@@ -2,5 +2,7 @@ LIBS=../../libcrypto
SOURCE[../../libcrypto]=\
c_skey.c c_ecb.c {- $target{cast_asm_src} -} c_cfb64.c c_ofb64.c
GENERATE[cast-586.s]=asm/cast-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
GENERATE[cast-586.s]=asm/cast-586.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
DEPEND[cast-586.s]=../perlasm/x86asm.pl ../perlasm/cbc.pl
LIBS=../../libcrypto
SOURCE[../../libcrypto]={- $target{chacha_asm_src} -}
GENERATE[chacha-x86.s]=asm/chacha-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
GENERATE[chacha-x86.s]=asm/chacha-x86.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
GENERATE[chacha-x86_64.s]=asm/chacha-x86_64.pl $(PERLASM_SCHEME)
GENERATE[chacha-ppc.s]=asm/chacha-ppc.pl $(PERLASM_SCHEME)
GENERATE[chacha-armv4.S]=asm/chacha-armv4.pl $(PERLASM_SCHEME)
......
......@@ -11,7 +11,9 @@ GENERATE[des_enc-sparc.S]=asm/des_enc.m4
GENERATE[dest4-sparcv9.S]=asm/dest4-sparcv9.pl $(PERLASM_SCHEME)
INCLUDE[dest4-sparcv9.o]=..
GENERATE[des-586.s]=asm/des-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS)
GENERATE[des-586.s]=asm/des-586.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS)
DEPEND[des-586.s]=../perlasm/x86asm.pl ../perlasm/cbc.pl
GENERATE[crypt586.s]=asm/crypt586.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS)
GENERATE[crypt586.s]=asm/crypt586.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS)
DEPEND[crypt586.s]=../perlasm/x86asm.pl ../perlasm/cbc.pl
......@@ -8,7 +8,9 @@ SOURCE[../../libcrypto]=\
ecdsa_ossl.c ecdsa_sign.c ecdsa_vrf.c curve25519.c ecx_meth.c \
{- $target{ec_asm_src} -}
GENERATE[ecp_nistz256-x86.s]=asm/ecp_nistz256-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
GENERATE[ecp_nistz256-x86.s]=asm/ecp_nistz256-x86.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
GENERATE[ecp_nistz256-x86_64.s]=asm/ecp_nistz256-x86_64.pl $(PERLASM_SCHEME)
......
......@@ -2,7 +2,8 @@ LIBS=../../libcrypto
SOURCE[../../libcrypto]=\
md5_dgst.c md5_one.c {- $target{md5_asm_src} -}
GENERATE[md5-586.s]=asm/md5-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS)
GENERATE[md5-586.s]=asm/md5-586.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS)
GENERATE[md5-x86_64.s]=asm/md5-x86_64.pl $(PERLASM_SCHEME)
......
......@@ -6,8 +6,11 @@ SOURCE[../../libcrypto]=\
INCLUDE[gcm128.o]=..
GENERATE[ghash-ia64.s]=asm/ghash-ia64.pl $(CFLAGS) $(LIB_CFLAGS)
GENERATE[ghash-x86.s]=asm/ghash-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
GENERATE[ghash-ia64.s]=asm/ghash-ia64.pl \
$(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS)
GENERATE[ghash-x86.s]=asm/ghash-x86.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
GENERATE[ghash-x86_64.s]=asm/ghash-x86_64.pl $(PERLASM_SCHEME)
GENERATE[aesni-gcm-x86_64.s]=asm/aesni-gcm-x86_64.pl $(PERLASM_SCHEME)
GENERATE[ghash-sparcv9.S]=asm/ghash-sparcv9.pl $(PERLASM_SCHEME)
......
......@@ -6,7 +6,9 @@ SOURCE[../../libcrypto]=\
GENERATE[poly1305-sparcv9.S]=asm/poly1305-sparcv9.pl $(PERLASM_SCHEME)
INCLUDE[poly1305-sparcv9.o]=..
GENERATE[poly1305-x86.s]=asm/poly1305-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
GENERATE[poly1305-x86.s]=asm/poly1305-x86.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
GENERATE[poly1305-x86_64.s]=asm/poly1305-x86_64.pl $(PERLASM_SCHEME)
GENERATE[poly1305-ppc.s]=asm/poly1305-ppc.pl $(PERLASM_SCHEME)
GENERATE[poly1305-ppcfp.s]=asm/poly1305-ppcfp.pl $(PERLASM_SCHEME)
......
......@@ -2,7 +2,9 @@ LIBS=../../libcrypto
SOURCE[../../libcrypto]=\
{- $target{rc4_asm_src} -}
GENERATE[rc4-586.s]=asm/rc4-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
GENERATE[rc4-586.s]=asm/rc4-586.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
DEPEND[rc4-586.s]=../perlasm/x86asm.pl
GENERATE[rc4-x86_64.s]=asm/rc4-x86_64.pl $(PERLASM_SCHEME)
......
......@@ -2,5 +2,6 @@ LIBS=../../libcrypto
SOURCE[../../libcrypto]=\
rc5_skey.c rc5_ecb.c {- $target{rc5_asm_src} -} rc5cfb64.c rc5ofb64.c
GENERATE[rc5-586.s]=asm/rc5-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS)
GENERATE[rc5-586.s]=asm/rc5-586.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS)
DEPEND[rc5-586.s]=../perlasm/x86asm.pl ../perlasm/cbc.pl
......@@ -2,5 +2,6 @@ LIBS=../../libcrypto
SOURCE[../../libcrypto]=\
rmd_dgst.c rmd_one.c {- $target{rmd160_asm_src} -}
GENERATE[rmd-586.s]=asm/rmd-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS)
GENERATE[rmd-586.s]=asm/rmd-586.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS)
DEPEND[rmd-586.s]=../perlasm/x86asm.pl
......@@ -3,16 +3,25 @@ SOURCE[../../libcrypto]=\
sha1dgst.c sha1_one.c sha256.c sha512.c {- $target{sha1_asm_src} -} \
keccak1600.c
GENERATE[sha1-586.s]=asm/sha1-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
GENERATE[sha1-586.s]=asm/sha1-586.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
DEPEND[sha1-586.s]=../perlasm/x86asm.pl
GENERATE[sha256-586.s]=asm/sha256-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
GENERATE[sha256-586.s]=asm/sha256-586.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
DEPEND[sha256-586.s]=../perlasm/x86asm.pl
GENERATE[sha512-586.s]=asm/sha512-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
GENERATE[sha512-586.s]=asm/sha512-586.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
DEPEND[sha512-586.s]=../perlasm/x86asm.pl
GENERATE[sha1-ia64.s]=asm/sha1-ia64.pl $(CFLAGS) $(LIB_CFLAGS)
GENERATE[sha256-ia64.s]=asm/sha512-ia64.pl $(CFLAGS) $(LIB_CFLAGS)
GENERATE[sha512-ia64.s]=asm/sha512-ia64.pl $(CFLAGS) $(LIB_CFLAGS)
GENERATE[sha1-ia64.s]=asm/sha1-ia64.pl \
$(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS)
GENERATE[sha256-ia64.s]=asm/sha512-ia64.pl \
$(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS)
GENERATE[sha512-ia64.s]=asm/sha512-ia64.pl \
$(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS)
GENERATE[sha1-alpha.S]=asm/sha1-alpha.pl $(PERLASM_SCHEME)
......
LIBS=../../libcrypto
SOURCE[../../libcrypto]=wp_dgst.c {- $target{wp_asm_src} -}
GENERATE[wp-mmx.s]=asm/wp-mmx.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
GENERATE[wp-mmx.s]=asm/wp-mmx.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
DEPEND[wp-mmx.s]=../perlasm/x86asm.pl
GENERATE[wp-x86_64.s]=asm/wp-x86_64.pl $(PERLASM_SCHEME)
......@@ -37,6 +37,8 @@ IF[{- !$disabled{"engine"} -}]
INCLUDE[ossltest]=../include
ENDIF
GENERATE[e_padlock-x86.s]=asm/e_padlock-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(PROCESSOR)
GENERATE[e_padlock-x86.s]=asm/e_padlock-x86.pl \
$(PERLASM_SCHEME) $(CFLAGS) $(LIB_CFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) \
$(PROCESSOR)
GENERATE[e_padlock-x86_64.s]=asm/e_padlock-x86_64.pl $(PERLASM_SCHEME)
ENDIF
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册