From ee4026a89ea415e395e8616c35ccf34d20038c76 Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Thu, 12 Sep 2019 11:46:41 -0700 Subject: [PATCH] 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)