From 28fe545925732a5cadd1f5b55fe9324778da25e5 Mon Sep 17 00:00:00 2001 From: aqua Date: Sat, 29 Oct 2022 15:27:06 +0300 Subject: Remove meson.build files --- src/Makefile | 6 ++++-- src/conf.h.in | 4 ++-- src/kernel.c | 10 ---------- 3 files changed, 6 insertions(+), 14 deletions(-) (limited to 'src') 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 -#include #include - #include "devices/pic.h" #include "devices/uart_16550.h" #include "devices/vga.h" - #include #include 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"); -- cgit v1.2.1