aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile19
-rw-r--r--src/conf.h.in4
2 files changed, 23 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..4c47e20
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,19 @@
+include ../${ARCH}/toolchain.mk
+include ../rules.mk
+
+CCFLAGS += -I. -I../grub/include -I../${ARCH} -I../lib -I..
+
+all: kernel.a
+
+kernel,SRCS = multiboot2.c mmap.c kernel.c isr.c mem/vmm.c
+kernel,OBJS = $(kernel,SRCS:%.c=%.o)
+kernel.a: conf.h ${kernel,OBJS}
+ @echo ' AR $@'
+ @${AR} ${ARFLAGS} $@ ${kernel,OBJS}
+
+conf.h: conf.h.in
+ cp conf.h.in conf.h
+
+clean:
+ @rm -rf ${kernel,OBJS}
+
diff --git a/src/conf.h.in b/src/conf.h.in
new file mode 100644
index 0000000..9ae9bac
--- /dev/null
+++ b/src/conf.h.in
@@ -0,0 +1,4 @@
+#pragma once
+
+#define VERSION "0.0.0"
+#define CC "gcc xyz"