Moving to a ninja-based build system

This commit is contained in:
Justin C. Miller
2019-02-02 02:59:45 -08:00
parent 523d0b3b8c
commit 0f8efdb55e
24 changed files with 604 additions and 507 deletions

View File

@@ -0,0 +1,26 @@
moddir = ${builddir}/{{ name }}.dir
{% block variables %}
ccflags = $ccflags $
{%- for dep in module.deps %}
-I${srcroot}/src/libraries/{{ dep }}/include $
{%- endfor %}
-I${srcroot}/{{ module.path }} $
-I${srcroot}/{{ module.path }}/include
{% endblock %}
{% for source in sources %}
build ${moddir}/{{ source.output }} : {{ source.action }} {{ source.input }}
name = {{ source.name }}
{% endfor %}
build {% block artifact %} ${builddir}/lib{{ name }}.a : lib {% endblock %} $
{%- block extrasources %}{% endblock -%}
{%- for source in sources %}
${moddir}/{{ source.output }}{% if not loop.last %} ${% endif %}
{%- endfor -%}
{%- if module.deps %}| {% for dep in module.deps %} ${builddir}/lib{{ dep }}.a {% endfor %}{% endif %}
name = {{ name }}
# End