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
11
makefile
11
makefile
|
@ -47,7 +47,7 @@ $(LIBS) \
|
||||||
.PHONY: all clean install install-headers install-kernel
|
.PHONY: all clean install install-headers install-kernel
|
||||||
.SUFFIXES: .o .c .s
|
.SUFFIXES: .o .c .s
|
||||||
|
|
||||||
all: red.kernel
|
all: BOOTX64.EFI
|
||||||
|
|
||||||
red.kernel: $(OBJS) $(ARCHDIR)/linker.ld
|
red.kernel: $(OBJS) $(ARCHDIR)/linker.ld
|
||||||
$(CC) -T $(ARCHDIR)/linker.ld -o $@ $(CFLAGS) $(LINK_LIST)
|
$(CC) -T $(ARCHDIR)/linker.ld -o $@ $(CFLAGS) $(LINK_LIST)
|
||||||
|
@ -88,4 +88,13 @@ gen-iso:
|
||||||
-o red.iso \
|
-o red.iso \
|
||||||
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)
|
-include $(OBJS:.o=.d)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user