Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openssl/openssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>1999-07-27 13:10:36 +0400
committerBodo Möller <bodo@openssl.org>1999-07-27 13:10:36 +0400
commit2e0fc875992dc0b4a0d1372871e27c9ffa31ec3e (patch)
treec74532634aa762ca073d8a0e8ccc52b37ea02a42 /util
parent488c06579ea0f1dea01704ba9669f32da3510886 (diff)
Use correct CFLAG definition for makefile.one builds.
Diffstat (limited to 'util')
-rwxr-xr-xutil/mk1mf.pl36
1 files changed, 36 insertions, 0 deletions
diff --git a/util/mk1mf.pl b/util/mk1mf.pl
index 90f2dfca06..4647fc7a03 100755
--- a/util/mk1mf.pl
+++ b/util/mk1mf.pl
@@ -401,6 +401,41 @@ vclean:
\$(RM) \$(OUT_D)$o*.*
EOF
+
+my $platform_cpp_symbol = "MK1MF_PLATFORM_$platform";
+$platform_cpp_symbol =~ s/-/_/;
+if (open(IN,"crypto/mk1mfinf.h"))
+ {
+ # Remove entry for this platform in existing file mk1mfinf.h.
+
+ my $old_mk1mfinf_h = "";
+ while (<IN>)
+ {
+ if (/^\#ifdef $platform_cpp_symbol$/)
+ {
+ while (<IN>) { last if (/^\#endif/); }
+ }
+ else
+ {
+ $old_mk1mfinf_h .= $_;
+ }
+ }
+
+ open(OUT,">crypto/mk1mfinf.h") || die "Can't open mk1mfinf.h";
+ print OUT $old_mk1mfinf_h;
+ }
+
+open (OUT,">>crypto/mk1mfinf.h") || die "Can't open mk1mfinf.h";
+printf OUT <<EOF;
+#ifdef $platform_cpp_symbol
+ /* auto-generated and updated by util/mk1mf.pl for crypto/cversion.c */
+ /* (used in place of crypto/buildinf.h by mk1mf builds) */
+ #define CFLAGS "$cc $cflags"
+ #define PLATFORM "$platform"
+EOF
+printf OUT " #define DATE \"%s\"\n", scalar gmtime();
+printf OUT "#endif\n";
+close(OUT);
#############################################
# We parse in input file and 'store' info for later printing.
@@ -730,6 +765,7 @@ sub cc_compile_target
local($target,$source,$ex_flags)=@_;
local($ret);
+ $ex_flags.=" -DMK1MF_BUILD -D$platform_cpp_symbol" if ($source =~ /cversion/);
$target =~ s/\//$o/g if $o ne "/";
$source =~ s/\//$o/g if $o ne "/";
$ret ="$target: \$(SRC_D)$o$source\n\t";