Makefile: grouped targets for kernel.sym

This commit is contained in:
Mathieu Maret 2021-08-02 15:07:45 +02:00
parent 8bb6cdbad4
commit 5a078249d0
1 changed files with 4 additions and 4 deletions

View File

@ -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