summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kc/api/core/memory.h (renamed from api/kc/core/memory.h)2
-rw-r--r--kc/api/kc.h (renamed from api/kc/kc.h)0
-rw-r--r--kc/api/lib.h (renamed from api/kc/lib.h)0
-rw-r--r--kc/boot/Makefile2
-rw-r--r--kc/core/Makefile2
-rw-r--r--kc/core/kcc_memory.c2
-rw-r--r--kc/core/kprint.c2
-rw-r--r--kc/core/memory.c2
-rw-r--r--kc/core/memory.h2
-rw-r--r--kc/defaults.mk3
-rw-r--r--kc/kc.ld (renamed from kc/component.ld)0
-rw-r--r--kc/reloc_x86_64.c2
-rw-r--r--lib/string.c2
13 files changed, 11 insertions, 10 deletions
diff --git a/api/kc/core/memory.h b/kc/api/core/memory.h
index d6f1cd6..b428b15 100644
--- a/api/kc/core/memory.h
+++ b/kc/api/core/memory.h
@@ -3,7 +3,7 @@
*/
#pragma once
-#include <kc/kc.h>
+#include <kc.h>
#include <stdint.h>
diff --git a/api/kc/kc.h b/kc/api/kc.h
index c3390b2..c3390b2 100644
--- a/api/kc/kc.h
+++ b/kc/api/kc.h
diff --git a/api/kc/lib.h b/kc/api/lib.h
index 3bf0eca..3bf0eca 100644
--- a/api/kc/lib.h
+++ b/kc/api/lib.h
diff --git a/kc/boot/Makefile b/kc/boot/Makefile
index 506c12b..36d069e 100644
--- a/kc/boot/Makefile
+++ b/kc/boot/Makefile
@@ -7,7 +7,7 @@ VPATH := ../../lib ../
TARGET := efi.os
.DEFAULT: $(TARGET)
-CPPFLAGS += -I../../api
+CPPFLAGS += -I../../api -I ../api
OBJS := entry_x86_64.o reloc_x86_64.o kc_main.o elf64.o memcmp.o memcpy.o \
memmove.o memset.o
diff --git a/kc/core/Makefile b/kc/core/Makefile
index 589616f..6651ca6 100644
--- a/kc/core/Makefile
+++ b/kc/core/Makefile
@@ -6,7 +6,7 @@ VPATH := ../../lib ../ cpu/
TARGET := kernel.os
.DEFAULT: $(TARGET)
-CPPFLAGS += -I../../api -I.
+CPPFLAGS += -I../../api -I../api -I.
CFLAGS += -Wno-unused-const-variable -Wno-unused-function -fvisibility=hidden -g
SOBJS :=
diff --git a/kc/core/kcc_memory.c b/kc/core/kcc_memory.c
index 68aa1d4..1f3a813 100644
--- a/kc/core/kcc_memory.c
+++ b/kc/core/kcc_memory.c
@@ -1,6 +1,6 @@
#include "memory.h"
-#include <kc/core/memory.h>
+#include <core/memory.h>
KC_EXPORT
kc_phys_addr kcc_page_alloc(void)
diff --git a/kc/core/kprint.c b/kc/core/kprint.c
index 5d2fbdc..762f99f 100644
--- a/kc/core/kprint.c
+++ b/kc/core/kprint.c
@@ -1,7 +1,7 @@
#include "kprint.h"
#include "serial.h"
-#include <kc/lib.h>
+#include <lib.h>
#include <stdint.h>
#include <stdbool.h>
diff --git a/kc/core/memory.c b/kc/core/memory.c
index 2dac707..bef6cd2 100644
--- a/kc/core/memory.c
+++ b/kc/core/memory.c
@@ -7,7 +7,7 @@
#include <stdint.h>
-#include <kc/kc.h>
+#include <kc.h>
/* kernel virtual space guarantees
*
diff --git a/kc/core/memory.h b/kc/core/memory.h
index 5deda81..526d8ca 100644
--- a/kc/core/memory.h
+++ b/kc/core/memory.h
@@ -1,6 +1,6 @@
#pragma once
-#include <kc/lib.h>
+#include <lib.h>
#include <kernel/entry.h>
#include <kernel/memory/paging.h>
diff --git a/kc/defaults.mk b/kc/defaults.mk
index 4464801..588b9b0 100644
--- a/kc/defaults.mk
+++ b/kc/defaults.mk
@@ -1,5 +1,6 @@
+
LIBDIRS += -L$(dir $(shell $(CC) -print-libgcc-file-name))
-LDSCRIPT := ../component.ld
+LDSCRIPT := ../kc.ld
LDFLAGS += -z max-page-size=4096 --export-dynamic -pic --no-dynamic-linker \
-z separate-code
LOADLIBES := -lgcc
diff --git a/kc/component.ld b/kc/kc.ld
index dc158f3..dc158f3 100644
--- a/kc/component.ld
+++ b/kc/kc.ld
diff --git a/kc/reloc_x86_64.c b/kc/reloc_x86_64.c
index dfc6df6..c70027f 100644
--- a/kc/reloc_x86_64.c
+++ b/kc/reloc_x86_64.c
@@ -1,4 +1,4 @@
-#include <kc/kc.h>
+#include <kc.h>
#include <elf/elf64.h>
diff --git a/lib/string.c b/lib/string.c
index 968467e..c4764ce 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -1,4 +1,4 @@
-#include <kc/lib.h>
+#include <lib.h>
size_t strlen(const char *s)
{