CCFLAGS += -Wno-enum-conversion \
			-Wpointer-to-int-cast \
			-Wstringop-overflow	\
			-Wint-to-pointer-cast \

EXTRA_CFLAGS = -I./include/

TESTS = test_gdt test_tools test_string test_stdlib test_lists test_pagetables \
		test_heap test_mm test_pm

all: $(TESTS)

test_gdt: test_gdt.c
	gcc -o test_gdt kunit.c test_gdt.c gdt.c $(EXTRA_CFLAGS) $(CCFLAGS)

test_tools: test_tools.c
	gcc -o test_tools kunit.c test_tools.c $(EXTRA_CFLAGS) $(CCFLAGS)

test_string: test_string.c
	gcc -o test_string test_string.c strdup.c kunit.c $(EXTRA_CFLAGS) $(CCFLAGS)

test_stdlib: test_stdlib.c
	gcc -o test_stdlib test_stdlib.c kunit.c stdlib.c $(EXTRA_CFLAGS) $(CCFLAGS)

test_lists: test_lists.c
	gcc -o test_lists test_lists.c kunit.c $(EXTRA_CFLAGS) $(CCFLAGS)

test_pagetables: test_pagetables.c
	gcc -o test_pagetables test_pagetables.c pagetables.c kunit.c $(EXTRA_CFLAGS) $(CCFLAGS)

test_heap: test_heap.c
	gcc -o test_heap test_heap.c heap.c kunit.c kprintf.c $(EXTRA_CFLAGS) $(CCFLAGS)

test_mm: test_mm.c
	gcc -o test_mm test_mm.c mm.c pagetables.c kprintf.c heap.c kunit.c $(EXTRA_CFLAGS) $(CCFLAGS)

test_pm: test_pm.c
	gcc -o test_pm test_pm.c pm.c kprintf.c sigreturn.S kunit.c $(EXTRA_CFLAGS) $(CCFLAGS)

clean:
	rm -f $(TESTS) $(INTERACTIVE) *.o
