# common makegen stuff for the "testworks libraries" under d2c.
# each makegen should &makegen_include("../common-Makegen").

$D2C = '$(BUILDROOT)/d2c/compiler/main/d2c';
$D2C .= ' -p$(SRCROOT)/d2c/compiler/platforms.descr';

$CPPFLAGS = '-I$(SRCROOT)/d2c/runtime';

$testflags = '-profiling';

sub emit_run_tests_rule {
    local (@tests) = @_;
    local ($test);
    print "run_tests : ";
    foreach $test (@tests) {
	print "$test$dot_exe " if ($enable_d2c);
    }
    print "\n";

    foreach $test (@tests) {
	local ($test) = &convert_path_separator("./$test");
	print "\t$test $testflags\n" if ($enable_d2c);
    }
    push(@compile_dependencies, "run_tests");
}
