
# Various Makegen stuff that's common to all Makegens for the
# compiler.  The compiler is more complicated than a simple
# emit_library_rule because of the need for bootstrapping.

# Your normal compiler Makegen file should simply set $D2CFLAGS and
# $CPPFLAGS, then call this subroutine, and finally a emit_library_rule
#
sub d2c_library {
    local ($lidfile_name, $more_flags) = @_;
    local (@makefile_targets)
	= &emit_library_rule($lidfile_name, '$(BUILDROOT)/force.timestamp', 
			     $more_flags, '');
    if (!$enable_mindy_bootstrap) {
	push(@compile_dependencies, $makefile_targets[0]);
    } else {
	push(@compile_dependencies, $makefile_targets[1]);
	print <<"EOF";

d2c-compile: $makefile_targets[0]

EOF
    }
    return @makefile_targets;
}

$D2CFLAGS = $d2c_runtime
    . '-L../../../common/streams '
    . '-L../../../common/standard-io -L../../../common/stream-ext '
    . '-L../../../common/print -L../../../common/format '
    . '-L../../runtime/random -L../../../common/coll-ext '
    . '-L../../../common/string-ext -L../../../common/table-ext '
    . '-L../../../common/regexp -L../../runtime/melange '
    . '-L../../runtime/garbage-collection '
    . '-L../../../common/getopt -L../../../common/file-system-base';
