aboutsummaryrefslogtreecommitdiff
path: root/kernel/Makefile
diff options
context:
space:
mode:
authorMarvin Borner2020-08-31 23:09:35 +0200
committerMarvin Borner2020-08-31 23:09:35 +0200
commitd79b7492910d4a77b8c3a70f28c5ea4c81a0b2e5 (patch)
tree3e7c6c864d984e1f0fc2533f4d4202833b6625a7 /kernel/Makefile
parent00adfffc296476f3fe247ce3f341c9f5addd190d (diff)
Abstracted tests from boot process
Diffstat (limited to 'kernel/Makefile')
-rw-r--r--kernel/Makefile13
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