From 113fdb379b19fd7ecb58066df8f4afc21a307a59 Mon Sep 17 00:00:00 2001 From: spikey Date: Sat, 17 Feb 2024 18:06:01 -0500 Subject: [PATCH] fixed MAKE!!! YAYY!!Y!Y!Y! --- Makefile | 8 ++------ sys/drv/vga/Makefile | 12 ++++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 243e459..14ed073 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,5 @@ -include sys/Makefile +include sys/drv/vga/Makefile CC=cc - all: vga.o - $(CC) sys/drv/vga/vga.o - - - + $(CC) sys/drv/vga/vga.o -o boot.img diff --git a/sys/drv/vga/Makefile b/sys/drv/vga/Makefile index 41fdbb7..7fc9c59 100644 --- a/sys/drv/vga/Makefile +++ b/sys/drv/vga/Makefile @@ -1,10 +1,10 @@ CC=cc FLAGS=-Wall -c -g -Wextra -ffreestanding -m32 -nostdlib -SRCS=$(wildcard *.c) -INCLUDE=include/ -MAIN_INCLUDE=../../include/ -BIN=../../../obj/drv/vga.o +SRCS=$(wildcard sys/drv/vga/*.c) +INC=sys/drv/vga/include/ sys/include/ +INC_PARAMS=$(INC:%=-I%) +BIN=obj/vga.o -all: - $(CC) $(FLAGS) -I $(INCLUDE) -I $(MAIN_INCLUDE) $(SRCS) -o $(BIN) +vga.o: + $(CC) $(FLAGS) $(INC_PARAMS) $(SRCS) -o $(BIN)