Modify existing Makefile to allow compilation of UEFI app.
Added targets for the main files - BOOTX64.EFI, data.c and entry.c Also minor formatting changes, but whatever.
This commit is contained in:
parent
ab9be9fd4f
commit
352db828e7
13
makefile
13
makefile
|
@ -33,7 +33,7 @@ $(KERNEL_ARCH_OBJS) \
|
|||
kernel/utils.o \
|
||||
kernel/serial.o \
|
||||
kernel/interrupts.o \
|
||||
kernel/descriptor_tables.o\
|
||||
kernel/descriptor_tables.o \
|
||||
kernel/kernel.o
|
||||
|
||||
OBJS=\
|
||||
|
@ -47,7 +47,7 @@ $(LIBS) \
|
|||
.PHONY: all clean install install-headers install-kernel
|
||||
.SUFFIXES: .o .c .s
|
||||
|
||||
all: red.kernel
|
||||
all: BOOTX64.EFI
|
||||
|
||||
red.kernel: $(OBJS) $(ARCHDIR)/linker.ld
|
||||
$(CC) -T $(ARCHDIR)/linker.ld -o $@ $(CFLAGS) $(LINK_LIST)
|
||||
|
@ -88,4 +88,13 @@ gen-iso:
|
|||
-o red.iso \
|
||||
iso
|
||||
|
||||
BOOTX64.EFI: arch/uefi/entry.o efi/lib/data.o
|
||||
$(EFI-CC) -nostdlib -Wl,-dll -shared -Wl,--subsystem,10 -e efi_main -o BOOTX64.EFI arch/uefi/entry.o data.o -lgcc
|
||||
|
||||
arch/uefi/entry.o:
|
||||
$(EFI-CC) -ffreestanding -Iinclude/efi/ -Iinclude/efi/x86_64 -Iinclude/efi/protocol -c -o arch/uefi/entry.o arch/uefi/entry.c
|
||||
|
||||
efi/lib/data.o:
|
||||
$(EFI-CC) -ffreestanding -Iinclude/efi/ -Iinclude/efi/x86_64 -Iinclude/efi/protocol -c -o data.o efi/lib/data.c
|
||||
|
||||
-include $(OBJS:.o=.d)
|
||||
|
|
Loading…
Reference in New Issue
Block a user