Makefile: grouped targets for kernel.sym
This commit is contained in:
parent
8bb6cdbad4
commit
5a078249d0
8
Makefile
8
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
|
cobj=$(csrc:%.c=%.o) arch/$(ARCH)/cpu_context_switch.o arch/$(ARCH)/irq_pit.o
|
||||||
deps = $(csrc:%.c=%.d)
|
deps = $(csrc:%.c=%.d)
|
||||||
|
|
||||||
kernel:$(asmobj) $(cobj) linker.ld
|
kernel kernel.sym &: $(asmobj) $(cobj) linker.ld
|
||||||
$(CC) -m32 -ffreestanding -nostdlib $(cobj) $(asmobj) -o $@ -T linker.ld -lgcc
|
$(CC) -m32 -ffreestanding -nostdlib $(cobj) $(asmobj) -o kernel -T linker.ld -lgcc
|
||||||
objcopy --only-keep-debug $@ $@.sym
|
objcopy --only-keep-debug kernel kernel.sym
|
||||||
objcopy --strip-debug $@
|
objcopy --strip-debug kernel
|
||||||
|
|
||||||
fd.iso: kernel
|
fd.iso: kernel
|
||||||
mkdir -p isodir/boot/grub
|
mkdir -p isodir/boot/grub
|
||||||
|
Loading…
Reference in New Issue
Block a user