aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2022-10-29 15:27:06 +0300
committeraqua <aqua@iserlohn-fortress.net>2022-10-29 17:09:05 +0300
commit28fe545925732a5cadd1f5b55fe9324778da25e5 (patch)
tree025dca4c74b3b7721d1573e2d292ad6c9ae8b67a /src
parentmakefile: add src/kernel.a target (diff)
downloadkernel-28fe545925732a5cadd1f5b55fe9324778da25e5.tar.xz
Remove meson.build files
Diffstat (limited to 'src')
-rw-r--r--src/Makefile6
-rw-r--r--src/conf.h.in4
-rw-r--r--src/kernel.c10
3 files changed, 6 insertions, 14 deletions
diff --git a/src/Makefile b/src/Makefile
index 4c47e20..f9d3a28 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,7 +1,7 @@
include ../${ARCH}/toolchain.mk
include ../rules.mk
-CCFLAGS += -I. -I../grub/include -I../${ARCH} -I../lib -I..
+CCFLAGS += -I. -isystem../grub/include -I../${ARCH} -I../lib -I..
all: kernel.a
@@ -12,7 +12,9 @@ kernel.a: conf.h ${kernel,OBJS}
@${AR} ${ARFLAGS} $@ ${kernel,OBJS}
conf.h: conf.h.in
- cp conf.h.in conf.h
+ @cp conf.h.in conf.h
+ @sed -i 's/@VERSION@/$(shell git describe)/' conf.h
+ @sed -i 's/@CC@/$(shell ${CC} --version | head -n1)/' conf.h
clean:
@rm -rf ${kernel,OBJS}
diff --git a/src/conf.h.in b/src/conf.h.in
index 9ae9bac..52093a8 100644
--- a/src/conf.h.in
+++ b/src/conf.h.in
@@ -1,4 +1,4 @@
#pragma once
-#define VERSION "0.0.0"
-#define CC "gcc xyz"
+#define VERSION "@VERSION@"
+#define CC "@CC@"
diff --git a/src/kernel.c b/src/kernel.c
index b652c23..a9fc126 100644
--- a/src/kernel.c
+++ b/src/kernel.c
@@ -5,24 +5,14 @@
//=====================================================================
#include "mem.h"
-
-#include <gdt.h>
-#include <idt.h>
#include <stdio.h>
-
#include "devices/pic.h"
#include "devices/uart_16550.h"
#include "devices/vga.h"
-
#include <conf.h>
#include <sys/cpuid.h>
void kmain() {
- pic_init();
-
- gdt_install();
- idt_install();
-
if (uart_init(COM1) != 0) printf("UART self-test failed.\r\n");
printf("glitch [version " VERSION "] [" CC "]\n");