diff options
author | Marvin Borner | 2020-08-30 09:59:03 +0200 |
---|---|---|
committer | Marvin Borner | 2020-08-30 09:59:03 +0200 |
commit | f73592503981eaacf1836f0d0049bed2f989212e (patch) | |
tree | b10ec58e932a94022c36fe6e1de2b7bbc20fc838 /kernel/Makefile | |
parent | e15051fd2d1d65af315ac4004256d5bc56a6dc67 (diff) |
Added kernel testing suit
Diffstat (limited to 'kernel/Makefile')
-rw-r--r-- | kernel/Makefile | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/Makefile b/kernel/Makefile index 07f985a..da6a26c 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -26,6 +26,7 @@ CFLAGS = $(CSFLAGS) -Wall -Wextra -nostdlib -nostdinc -ffreestanding -fno-builti ASFLAGS = -f elf32 all: compile bootloader +test: compile_test bootloader %.o: %.c @$(CC) -c $(CFLAGS) $< -o $@ @@ -41,3 +42,11 @@ compile: $(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 -Wl,-etest_all +compile_test: $(COBJS:main.o=test.o) + @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 |