diff options
| author | Ada Christine <adachristine18@gmail.com> | 2024-03-03 08:44:42 +0000 |
|---|---|---|
| committer | Ada Christine <adachristine18@gmail.com> | 2024-03-03 08:44:42 +0000 |
| commit | f61da8be06fdfebc598cba783e78117319231140 (patch) | |
| tree | 0ef21f89e98a985ab5d985aaac1e032c868e8b81 /boot/Makefile | |
| parent | 9681d6a6cbde12b00beab62683b8db98f680ba2b (diff) | |
build changes
Diffstat (limited to 'boot/Makefile')
| -rw-r--r-- | boot/Makefile | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/boot/Makefile b/boot/Makefile new file mode 100644 index 0000000..482744f --- /dev/null +++ b/boot/Makefile @@ -0,0 +1,37 @@ +include ../defaults.mk + +%.efi: + $(CC.info) + @$(CC) $(LDFLAGS) -o $@ $^ + +VPATH := ../lib efi/ + +IMAGE := kjarna.efi + +CPPFLAGS += -I../api -I../lib + +CFLAGS += --target=$(ARCH)-unknown-windows -fshort-wchar -mno-avx \ + -mno-sse -mno-mmx -funsigned-char -Wno-pointer-sign -ggdb \ + -fno-ms-extensions + +LDFLAGS := --target=$(ARCH)-unknown-windows -nostdlib -ggdb \ + -Wl,-entry:_start,-subsystem:efi_application -fuse-ld=lld-link + +all: $(IMAGE) + +CRT_OBJS := start.o +LIB_OBJS := memcmp.o memset.o memcpy.o memmove.o string.o elf64.o +EFI_OBJS := file.o memory.o protocol.o image.o +APP_OBJS := main.o + +OBJS := $(CRT_OBJS) $(LIB_OBJS) $(EFI_OBJS) $(APP_OBJS) +DEPS := $(OBJS:.o=.d) + +$(IMAGE): $(OBJS) + +CLEANLIST := $(wildcard $(BUILD) $(OBJS) $(IMAGE) $(IMAGE:.efi=.pdb)) +DCLEANLIST := $(CLEANLIST) $(wildcard $(DEPS)) + +include ../rules.mk +-include $(DEPS) + |
