diff options
Diffstat (limited to 'kc/boot/Makefile')
| -rw-r--r-- | kc/boot/Makefile | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/kc/boot/Makefile b/kc/boot/Makefile new file mode 100644 index 0000000..76bd4d4 --- /dev/null +++ b/kc/boot/Makefile @@ -0,0 +1,37 @@ +include ../../defaults.mk + +VPATH := ../../lib ../ + +TARGET := efi.os +.DEFAULT: $(TARGET) + +# EFI API for temporary things + +EFIAPIDIR := /usr/local/include/efi + +CPPFLAGS += -I../../api -I$(EFIAPIDIR) -I$(EFIAPIDIR)/$(ARCH) -I$(EFIAPIDIR)/protocol +CFLAGS += -Wno-unused-const-variable -Wno-unused-function -fvisibility=hidden \ + -g -fshort-wchar -mgeneral-regs-only + +LIBDIRS += -L$(dir $(shell $(CC) -print-libgcc-file-name)) +LDSCRIPT := ../component.ld +LDFLAGS += -z max-page-size=4096 --export-dynamic -pic --no-dynamic-linker +LOADLIBES := -lgcc + +OBJS := entry_x86_64.o reloc_x86_64.o kc_main.o elf64.o memcmp.o memcpy.o \ + memmove.o memset.o +$(OBJS): CFLAGS += -fPIC + +DEPS := $(patsubst %.o,%.d,$(OBJS)) + +$(TARGET): $(LDSCRIPT) $(MAKEFILE_LIST) +$(TARGET): $(OBJS) + +CLEANLIST := $(wildcard $(OBJS) $(TARGET)) +DCLEANLIST := $(wildcard $(DEPS)) + +include ../../rules.mk +-include $(DEPS) + +.DEFAULT: $(TARGET) + |
