{% extends "exe.default.j2" %}
{% block variables %}
{{ super() }}

ld = ld
cc = clang
cxx = clang++

ccflags = $ccflags $
    -DKERNEL_FILENAME=L\"popcorn.elf\" $
    -DGNU_EFI_USE_MS_ABI $
    -DHAVE_USE_MS_ABI $
    -DEFI_DEBUG=0 $
    -DEFI_DEBUG_CLEAR_MEMORY=0 $
	-DBOOTLOADER_DEBUG $
    -fPIC

ldflags = $ldflags $
    -T ${srcroot}/src/arch/x86_64/boot.ld $
    -shared

{% endblock %}

{% block extra %}

build $builddir/boot.efi : makeefi ${builddir}/{{ module.output }}
    name = boot.efi

{% endblock %}
