summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-07-13 09:06:53 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-07-13 09:06:53 +0200
commited869aa3867d134fb37f586f1db029006677cebb (patch)
treea34cb31b0359d98e0be8a1269535f8f660c7db68 /tests
parent08487fb5bfd7f5e1d9564d4132d38592d2dd0cc2 (diff)
downloadabaos-ed869aa3867d134fb37f586f1db029006677cebb.tar.gz
abaos-ed869aa3867d134fb37f586f1db029006677cebb.tar.bz2
separated C library implementations with an OS_ABAOS define (for now),
we cannot test stdio and memory management in the hosted environment yet this way
Diffstat (limited to 'tests')
-rw-r--r--tests/libc/Makefile17
1 files changed, 4 insertions, 13 deletions
diff --git a/tests/libc/Makefile b/tests/libc/Makefile
index 2a7c53c..ce7e121 100644
--- a/tests/libc/Makefile
+++ b/tests/libc/Makefile
@@ -1,9 +1,6 @@
CC := gcc
CFLAGS := -std=c99 -m32 -ffreestanding -O0 -g -Wall -Werror
-# 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
+INCLUDES = -I../../src/libc
LD := ld
all: test
@@ -20,8 +17,8 @@ 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 ../../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: 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.o: test_itoa.c ../../src/libc/stdlib.o
$(CC) $(CFLAGS) $(INCLUDES) -c -o test_itoa.o test_itoa.c
@@ -32,16 +29,10 @@ test_itoa.o: test_itoa.c ../../src/libc/stdlib.o
../../src/libc/stdlib.o: ../../src/libc/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
./test_strlcat
./test_itoa
clean:
- -rm -f test_strlcpy test_strlcat test_itoa *.o
+ -rm -f test_strlcpy test_strlcat test_itoa ../../src/libc/stdlib.o ../../src/libc/string.o *.o