mk1mf: dtlstest needs ssltestlib, include it with a hack
authorRichard Levitte <levitte@openssl.org>
Fri, 19 Aug 2016 14:53:54 +0000 (16:53 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 22 Aug 2016 22:09:40 +0000 (00:09 +0200)
We don't really have a mechanism to include other object files into a given
test program.  For now, a simple hack in mk1mf.pl will do.

RT#4653

Reviewed-by: Rich Salz <rsalz@openssl.org>
util/mk1mf.pl

index 128a405efc353abc0aac887caf149b1fd6093fac..4eded5aafe58f020818272aa3e89135d2dd98c38 100755 (executable)
@@ -692,8 +692,8 @@ $rules.=&do_copy_rule("\$(INCL_D)",$header,"");
 $defs.=&do_defs("EXHEADER",$exheader,"\$(INCO_D)","");
 $rules.=&do_copy_rule("\$(INCO_D)",$exheader,"");
 
-$defs.=&do_defs("T_OBJ",$test,"\$(OBJ_D)",$obj);
-$rules.=&do_compile_rule("\$(OBJ_D)",$test,"\$(APP_CFLAGS)");
+$defs.=&do_defs("T_OBJ","$test test${o}ssltestlib","\$(OBJ_D)",$obj);
+$rules.=&do_compile_rule("\$(OBJ_D)","$test test${o}ssltestlib","\$(APP_CFLAGS)");
 
 $defs.=&do_defs("E_OBJ",$e_exe,"\$(OBJ_D)",$obj);
 $rules.=&do_compile_rule("\$(OBJ_D)",$e_exe,'-DMONOLITH $(APP_CFLAGS)');
@@ -764,6 +764,7 @@ foreach (split(/\s+/,$test))
        {
        $t=&bname($_);
        $tt="\$(OBJ_D)${o}$t${obj}";
+       $tt.=" \$(OBJ_D)${o}ssltestlib${obj}" if $t eq "dtlstest";
        $rules.=&do_link_rule("\$(TEST_D)$o$t$exep",$tt,"\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)");
        }