-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (29 loc) · 798 Bytes
/
Makefile
File metadata and controls
40 lines (29 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# SPDX-License-Identifier: GPL-2.0-only
TARGET = Boot2TargetDisplay.efi
TARGET_LIB = Boot2TargetDisplay.lib
VERSION_MAJOR = 0
VERSION_MINOR = 1
VERSION_PATCH = 0
DEFINES = -DVERSION_MAJOR=$(VERSION_MAJOR) -DVERSION_MINOR=$(VERSION_MINOR) -DVERSION_PATCH=$(VERSION_PATCH)
CC = clang
CFLAGS = -Iinclude \
-Iinclude/uefi \
-Iinclude/uefi/X64 \
-target x86_64-unknown-windows \
-O2 \
-fno-stack-protector \
-fshort-wchar \
-mno-red-zone \
-Wall \
$(DEFINES)
LD = lld-link
LDFLAGS = -subsystem:efi_application -nodefaultlib -dll
.PHONY: all clean
OBJS := boot2target.o smc.o cons.o baselibc_string.o tinyprintf.o
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
$(TARGET): $(OBJS)
$(LD) $(LDFLAGS) -entry:EfiMain $^ -out:$@
all: $(TARGET)
clean:
rm -f $(TARGET) $(TARGET_LIB) $(OBJS)