stage0-uefi/amd64/Development/Makefile

27 lines
648 B
Makefile
Raw Permalink Normal View History

# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu>
#
# SPDX-License-Identifier: GPL-3.0-or-later
targets = kaem-optional hex0 hex1 hex2 catm M0 cc_amd64
2022-08-14 17:25:28 +01:00
cc = clang
cflags = -ffreestanding -MMD -mno-red-zone -target x86_64-unknown-windows-coff -fno-PIE -fno-stack-protector
ld = lld-link
lflags = -subsystem:efi_application -nodefaultlib -dll
build = build
2022-08-14 17:25:28 +01:00
targets2 = $(addsuffix .efi, $(addprefix $(build)/, $(targets)))
2022-08-14 17:25:28 +01:00
all: $(targets2)
$(build)/%.o : %.S
mkdir -p $(build)
$(cc) $(cflags) -c $< -o $@
$(build)/%.efi : $(build)/%.o
2022-07-10 22:08:36 +01:00
$(ld) $(lflags) -entry:_start $< -out:$@
. PHONY : clean all
clean:
2022-07-10 22:08:36 +01:00
rm -rf $(build)