From 5a078249d084a2426e0b8d663abb5de1b845d5be Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Mon, 2 Aug 2021 15:07:45 +0200 Subject: [PATCH] Makefile: grouped targets for kernel.sym --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index b56b201..88a6116 100644 --- a/Makefile +++ b/Makefile @@ -19,10 +19,10 @@ csrc=$(shell find $(SUBDIRS) -type f -name "*.c")# $(wildcard *.c) cobj=$(csrc:%.c=%.o) arch/$(ARCH)/cpu_context_switch.o arch/$(ARCH)/irq_pit.o deps = $(csrc:%.c=%.d) -kernel:$(asmobj) $(cobj) linker.ld - $(CC) -m32 -ffreestanding -nostdlib $(cobj) $(asmobj) -o $@ -T linker.ld -lgcc - objcopy --only-keep-debug $@ $@.sym - objcopy --strip-debug $@ +kernel kernel.sym &: $(asmobj) $(cobj) linker.ld + $(CC) -m32 -ffreestanding -nostdlib $(cobj) $(asmobj) -o kernel -T linker.ld -lgcc + objcopy --only-keep-debug kernel kernel.sym + objcopy --strip-debug kernel fd.iso: kernel mkdir -p isodir/boot/grub