From 97e88b2fe3276937033c6d169548c944a437bd9e Mon Sep 17 00:00:00 2001 From: spikey Date: Sat, 17 Feb 2024 18:18:23 -0500 Subject: [PATCH] aand... i broke it again --- Makefile | 8 +++++--- sys/Makefile | 10 +++++++++- sys/{linkedlist.c => memory.c} | 4 +++- 3 files changed, 17 insertions(+), 5 deletions(-) rename sys/{linkedlist.c => memory.c} (70%) diff --git a/Makefile b/Makefile index 14ed073..960fb51 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ -include sys/drv/vga/Makefile +include sys/Makefile CC=cc +SRCS=$(wildcard sys/*.o) $(wildcard sys/*/*.o) $(wildcard sys/*/*/*.o) -all: vga.o - $(CC) sys/drv/vga/vga.o -o boot.img +all: vga.o sysinit.o + echo $(SRCS) + $(CC) $(SRCS) -o boot.img diff --git a/sys/Makefile b/sys/Makefile index ba85f1b..b87ea45 100644 --- a/sys/Makefile +++ b/sys/Makefile @@ -1 +1,9 @@ -include drv/vga/Makefile +include sys/drv/vga/Makefile +CC=cc +FLAGS=-Wall -c -g -Wextra -ffreestanding -m32 -nostdlib +SRCS=$(wildcard sys/*.c) +INC=sys/include/ +INC_PARAMS=$(INC:%=-I%) + +sysinit.o: + $(CC) $(FLAGS) $(INC_PARAMS) $(SRCS) diff --git a/sys/linkedlist.c b/sys/memory.c similarity index 70% rename from sys/linkedlist.c rename to sys/memory.c index 83c9f63..a769dea 100644 --- a/sys/linkedlist.c +++ b/sys/memory.c @@ -1,4 +1,6 @@ +#include + struct linkedlist { u32 node; linkedlist *next; -}; \ No newline at end of file +};