From 05703abd9f5f90fb40731a520e0274bf27ba7fdb Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Thu, 17 May 2012 11:09:46 +0000 Subject: [PATCH] Make Windows FIPS build work more like other builds. Add build_tests target to build FIPS test utilities and build_algvs target to build the multicall fips_algvs utility. --- CHANGES | 5 +++++ util/mk1mf.pl | 15 +++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 3dd573b709..fe19d3a80c 100644 --- 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: diff --git a/util/mk1mf.pl b/util/mk1mf.pl index 05ecd34e01..70b176c872 100755 --- a/util/mk1mf.pl +++ b/util/mk1mf.pl @@ -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)) -- 2.25.1