diff options
Diffstat (limited to 'kernel/Makefile')
-rw-r--r-- | kernel/Makefile | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/kernel/Makefile b/kernel/Makefile index bdf89ff..a907986 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -1,8 +1,6 @@ # MIT License, Copyright (c) 2020 Marvin Borner -COBJS = main.o \ - test.o \ - drivers/interrupts.o \ +COBJS = drivers/interrupts.o \ drivers/interrupts_asm.o \ drivers/keyboard.o \ drivers/mouse.o \ @@ -39,12 +37,15 @@ bootloader: @mkdir -p ../build/ @$(AS) -f bin entry.asm -o ../build/boot.bin -compile: $(COBJS) +compile: main.o $(COBJS) @mkdir -p ../build/ @$(LD) -N -ekernel_main -Ttext 0x00050000 -o ../build/kernel.bin -L../build/ $+ -lk --oformat binary @$(CC) $(CFLAGS) -o ../build/debug.o -L../build/ $+ -lk -compile_test: CFLAGS += -Dtest -compile_test: compile +compile_test: CFLAGS += -Dtest -Wl,-etest_all +compile_test: test.o $(COBJS) + @mkdir -p ../build/ + @$(LD) -N -etest_all -Ttext 0x00050000 -o ../build/kernel.bin -L../build/ $+ -lk --oformat binary + @$(CC) $(CFLAGS) -o ../build/debug.o -L../build/ $+ -lk .PHONY: test compile_test |