builddir = $builddir/{{ target }}
target = {{ target }}

{% block variables %}
{% endblock %}

{% block binaries %}
cc = clang
cxx = clang++
ld = clang++
ar = ar
nasm = nasm
objcopy = objcopy
{% endblock %}

{% for module in modules %}
subninja {{ module.name }}.ninja
{% endfor %}

build ${builddir}/cc.defs : dump_cc_defs | {{ buildfile }}
build ${builddir}/cxx.defs : dump_cxx_defs | {{ buildfile }}
build ${builddir}/cc.run : dump_cc_run | {{ buildfile }}
build ${builddir}/cxx.run : dump_cxx_run | {{ buildfile }}

