summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/graphics_context.h2
-rw-r--r--src/kernel/kernel.c2
-rw-r--r--tests/libc/Makefile19
3 files changed, 16 insertions, 7 deletions
diff --git a/src/gui/graphics_context.h b/src/gui/graphics_context.h
index 9a3c7b4..ba08273 100644
--- a/src/gui/graphics_context.h
+++ b/src/gui/graphics_context.h
@@ -1,7 +1,7 @@
#ifndef GRAPHICS_CONTEXT_H
#define GRAPHICS_CONTEXT_H
-#include "drivers/video/vga.h"
+#include "vga.h"
typedef vga_t graphics_context_t;
diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c
index a6594f6..a789139 100644
--- a/src/kernel/kernel.c
+++ b/src/kernel/kernel.c
@@ -18,7 +18,7 @@
#include "kernel.h"
// TODO: move away from main!
-#include "drivers/video/vga.h"
+#include "vga.h"
#include "graphics_context.h"
#include "widget.h"
#include "composite_widget.h"
diff --git a/tests/libc/Makefile b/tests/libc/Makefile
index 8e0c01d..2a7c53c 100644
--- a/tests/libc/Makefile
+++ b/tests/libc/Makefile
@@ -1,6 +1,9 @@
CC := gcc
CFLAGS := -std=c99 -m32 -ffreestanding -O0 -g -Wall -Werror
-INCLUDES = -I../../src/libc
+# TODO: make sure we can test the libc library without kernel code,
+# this means we have to separate initializers like __stdio_init..
+# from the rest, also we have to provide a stub for kernel_panic
+INCLUDES = -I../../src/libc -I../../src/kernel -I../../src/hardware -I../../src/drivers -I../../src/drivers/hdi/ps2 -I../../src/drivers/video -I../../src/gui
LD := ld
all: test
@@ -17,17 +20,23 @@ test_strlcat: test_strlcat.o ../../src/libc/string.o
test_strlcat.o: test_strlcat.c
$(CC) $(CFLAGS) $(INCLUDES) -c -o test_strlcat.o test_strlcat.c
-test_itoa: test_itoa.o ../../src/libc/stdlib.o ../../src/libc/string.o
- $(CC) -o test_itoa test_itoa.o ../../src/libc/stdlib.o ../../src/libc/string.o
+test_itoa: test_itoa.o ../../src/libc/stdlib.o ../../src/libc/string.o ../../src/kernel/memorymanagement.o ../../src/kernel/kernel.o
+ $(CC) -o test_itoa test_itoa.o ../../src/libc/stdlib.o ../../src/libc/string.o ../../src/kernel/memorymanagement.o ../../src/kernel/kernel.o
test_itoa.o: test_itoa.c ../../src/libc/stdlib.o
$(CC) $(CFLAGS) $(INCLUDES) -c -o test_itoa.o test_itoa.c
../../src/libc/string.o: ../../src/libc/string.c
- $(CC) $(CFLAGS) -c -o ../../src/libc/string.o ../../src/libc/string.c
+ $(CC) $(CFLAGS) $(INCLUDES) -c -o ../../src/libc/string.o ../../src/libc/string.c
../../src/libc/stdlib.o: ../../src/libc/stdlib.c
- $(CC) $(CFLAGS) -c -o ../src/stdlib.o ../src/stdlib.c
+ $(CC) $(CFLAGS) $(INCLUDES) -c -o ../../src/libc/stdlib.o ../../src/libc/stdlib.c
+
+../../src/kernel/memorymanagement.o: ../../src/kernel/memorymanagement.c
+ $(CC) $(CFLAGS) $(INCLUDES) -c -o ../../src/kernel/memorymanagement.o ../../src/kernel/memorymanagement.c
+
+../../src/kernel/kernel.o: ../../src/kernel/kernel.c
+ $(CC) $(CFLAGS) $(INCLUDES) -c -o ../../src/kernel/kernel.o ../../src/kernel/kernel.c
test: test_strlcpy test_strlcat test_itoa
./test_strlcpy