From ee4026a89ea415e395e8616c35ccf34d20038c76 Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Thu, 12 Sep 2019 11:46:41 -0700 Subject: [PATCH 1/2] restructuring build setup --- framebuffer.c => core/framebuffer.c | 0 framebuffer.h => core/framebuffer.h | 0 core/kernel.c | 1 + makefile | 6 +++--- 4 files changed, 4 insertions(+), 3 deletions(-) rename framebuffer.c => core/framebuffer.c (100%) rename framebuffer.h => core/framebuffer.h (100%) create mode 100644 core/kernel.c diff --git a/framebuffer.c b/core/framebuffer.c similarity index 100% rename from framebuffer.c rename to core/framebuffer.c diff --git a/framebuffer.h b/core/framebuffer.h similarity index 100% rename from framebuffer.h rename to core/framebuffer.h diff --git a/core/kernel.c b/core/kernel.c new file mode 100644 index 0000000..4ded313 --- /dev/null +++ b/core/kernel.c @@ -0,0 +1 @@ +// Main kernel code (duh) diff --git a/makefile b/makefile index b0b0478..128fea4 100644 --- a/makefile +++ b/makefile @@ -3,7 +3,7 @@ ASM=nasm LINK=ld ISO=genisoimage -OBJECTS=loader.o framebuffer.o +OBJECTS=core/loader.o core/framebuffer.o AFLAGS=-f elf32 CFLAGS=-m32 -nostdlib -nostdinc -fno-builtin -fno-stack-protector -nostartfiles \ -nodefaultlibs -Wall -Wextra -Werror -c @@ -29,11 +29,11 @@ os.iso: kernel.elf iso # Building C objecets -%.o: %.c +core/%.o: %.c $(CC) $(CFLAGS) $< -o $@ # Builind asm objects -%.o: %.asm +core/%.o: %.asm $(ASM) $(AFLAGS) $< -o $@ # Running (no recipes called) From c1254944ab4b4859e3145ee5b1c7f5887e96bad8 Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Thu, 12 Sep 2019 11:51:47 -0700 Subject: [PATCH 2/2] more core things for building --- io.asm => core/io.asm | 0 io.h => core/io.h | 0 makefile | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename io.asm => core/io.asm (100%) rename io.h => core/io.h (100%) diff --git a/io.asm b/core/io.asm similarity index 100% rename from io.asm rename to core/io.asm diff --git a/io.h b/core/io.h similarity index 100% rename from io.h rename to core/io.h diff --git a/makefile b/makefile index 128fea4..264e21d 100644 --- a/makefile +++ b/makefile @@ -41,4 +41,4 @@ run: os.iso bochs -f bochsrc.conf -q clean: - rm -rf *.o kernel.elf os.iso bochslog.txt + rm -rf core/*.o kernel.elf os.iso bochslog.txt