Make Windows FIPS build work more like other builds. Add build_tests
authorDr. Stephen Henson <steve@openssl.org>
Thu, 17 May 2012 11:09:46 +0000 (11:09 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 17 May 2012 11:09:46 +0000 (11:09 +0000)
target to build FIPS test utilities and build_algvs target to build the
multicall fips_algvs utility.

CHANGES
util/mk1mf.pl

diff --git a/CHANGES b/CHANGES
index 3dd573b7096276457456770befb5a67299edf476..fe19d3a80c5430d8ff824717a5e214b2611f0d14 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,11 @@
 
  Changes between 1.0.1 and 1.1.0  [xx XXX xxxx]
 
+  *) Update Windows build system for FIPS. Don't compile algorithm test
+     utilties by default: the target build_tests is needed for that. Add
+     support for building fips_algvs with the build_algvs target.
+     [Steve Henson]
+
   *) Add initial cross compilation support for Windows build. The following
      environment variables should be set:
 
index 05ecd34e01111ab84862419612f4ada655c0ec84..70b176c872dbb3ec885137dd8e112d97ec69ddb7 100755 (executable)
@@ -554,7 +554,7 @@ if ($fips)
 
 if ($fipscanisteronly)
        {
-       $build_targets = "\$(O_FIPSCANISTER) \$(T_EXE)";
+       $build_targets = "\$(O_FIPSCANISTER)";
        $libs_dep = "";
        }
 
@@ -753,7 +753,11 @@ headers: \$(HEADER) \$(EXHEADER)
 
 lib: \$(LIBS_DEP) \$(E_SHLIB)
 
-exe: \$(T_EXE) \$(BIN_D)$o\$(E_EXE)$exep
+exe: \$(BIN_D)$o\$(E_EXE)$exep
+
+build_tests: \$(T_EXE)
+
+build_algvs: \$(T_SRC) \$(BIN_D)${o}fips_algvs$exep
 
 install: all
        \$(MKDIR) \"\$(INSTALLTOP)\"
@@ -855,6 +859,9 @@ if ($fips)
        $rules.=&cc_compile_target("\$(OBJ_D)${o}\$(E_PREMAIN_DSO)$obj",
                "fips${o}fips_premain.c",
                "-DFINGERPRINT_PREMAIN_DSO_LOAD \$(SHLIB_CFLAGS)");
+       $rules.=&cc_compile_target("\$(OBJ_D)${o}fips_algvs$obj",
+               "test${o}fips_algvs.c",
+               "\$(SHLIB_CFLAGS)");
        }
 
 foreach (values %lib_nam)
@@ -887,6 +894,7 @@ EOF
 }
 
 $defs.=&do_defs("T_EXE",$test,"\$(TEST_D)",$exep);
+$defs.=&do_defs("T_SRC",$test,"\$(TMP_D)",".c");
 foreach (split(/\s+/,$test))
        {
        my $t_libs;
@@ -908,8 +916,11 @@ foreach (split(/\s+/,$test))
 
        $tt="\$(OBJ_D)${o}$t${obj}";
        $rules.=&do_link_rule("\$(TEST_D)$o$t$exep",$tt,"\$(LIBS_DEP)","$t_libs \$(EX_LIBS)", $ltype);
+       $rules.=&do_copy_rule("\$(TMP_D)",$_,".c");
        }
 
+       $rules.=&do_link_rule("\$(TEST_D)${o}fips_algvs$exep","\$(OBJ_D)${o}fips_algvs$obj","\$(LIBS_DEP)","\$(O_FIPSCANISTER) \$(EX_LIBS)", 2) if $fips;
+
 $defs.=&do_defs("E_SHLIB",$engines . $otherlibs,"\$(ENG_D)",$shlibp);
 
 foreach (split(/\s+/,$engines))