stage0-uefi/amd64/Development/Makefile

24 lines
507 B
Makefile
Raw Normal View History

# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu>
#
# SPDX-License-Identifier: GPL-3.0-or-later
cc = clang
cflags = -ffreestanding -MMD -mno-red-zone -std=c11 -target x86_64-unknown-windows
ld = lld-link
lflags = -subsystem:efi_application -nodefaultlib -dll
build = build
all: $(build)/hex0.efi
$(build)/%.o : %.S
mkdir -p $(build)
$(cc) $(cflags) -c $< -o $@
$(build)/%.efi : $(build)/%.o
$(ld) $(lflags) -entry:efi_main $< -out:$@
. PHONY : clean all
clean:
rm -f $(build)