commit 5cfff507503138a8e774e2fbf99434061cd132c2 parent 54d6654e91a007764957fc55bc0720190baa6e0f Author: Matsuda Kenji <info@mtkn.jp> Date: Sun, 31 Mar 2024 08:20:38 +0900 try to delete gnu make thing. need to delete inference rule for sub directories Diffstat:
M | Makefile | | | 13 | +++++++------ |
A | kernel/draw.c | | | 0 |
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile @@ -6,6 +6,7 @@ KERN_CC = tcc KERN_LD = ld KERN_CFLAGS = -nostdlib -fpic -mno-red-zone -ffreestanding -Wall -g KERN_LDFLAGS = -e kernel_main -static +KERN_OBJ = kernel/main.o kernel/draw.o OBJCOPY = objcopy all: disk.img @@ -24,13 +25,13 @@ uefi/uefi.dll: uefi/uefi.c uefi/uefi.h uefi/utils.c uefi/utils.h $(EFI_CC) $(EFI_CFLAGS) -o $@ uefi/uefi.c uefi/utils.c uefi/uefi.efi: uefi/uefi.dll - $(OBJCOPY) --target=efi-app-x86_64 $< $@ + $(OBJCOPY) --target=efi-app-x86_64 uefi/uefi.dll $@ %.o: %.c $(KERN_CC) $(KERN_CFLAGS) -c -o $@ $< -kernel/setos.elf: kernel/main.o kernel/memmap.ld - $(KERN_LD) $(KERN_LDFLAGS) -T kernel/memmap.ld -o $@ $< +kernel/setos.elf: $(KERN_OBJ) + $(KERN_LD) $(KERN_LDFLAGS) -T kernel/memmap.ld -o $@ $(KERN_OBJ) run: disk.img OVMF.fd qemu-system-x86_64 \ @@ -49,5 +50,5 @@ gdb: disk.img OVMF.fd clean: rm -rf *.o *.efi *.elf *.dll disk.img image - rm -r uefi/*.efi uefi/*.dll - rm -r kernel/*.o kernel/*.elf -\ No newline at end of file + rm -f uefi/*.efi uefi/*.dll + rm -f kernel/*.o kernel/*.elf +\ No newline at end of file diff --git a/kernel/draw.c b/kernel/draw.c