diff --git a/.gitignore b/.gitignore index 5761abc..b672fde 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -*.o +obj diff --git a/Makefile b/Makefile index 050746b..243e459 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,9 @@ -SRC=$(wildcard src/*.c) -BOOT=$(wildcard boot/*.s) -INCLUDE=include/ -FLAGS=-g -Wall -Wextra -Ffreestanding -m32 -BIN=boot.img +include sys/Makefile +CC=cc -all: boot - $(CC) $(FLAGS) $(SRC) -I $(INCLUDE) -o $(BIN) -boot: - nasm -Fl32 - -install: all - ./installgrub.sh +all: vga.o + $(CC) sys/drv/vga/vga.o + + diff --git a/sys/Makefile b/sys/Makefile new file mode 100644 index 0000000..ba85f1b --- /dev/null +++ b/sys/Makefile @@ -0,0 +1 @@ +include drv/vga/Makefile diff --git a/sys/drv/vga/Makefile b/sys/drv/vga/Makefile index 833e2a6..41fdbb7 100644 --- a/sys/drv/vga/Makefile +++ b/sys/drv/vga/Makefile @@ -3,7 +3,7 @@ FLAGS=-Wall -c -g -Wextra -ffreestanding -m32 -nostdlib SRCS=$(wildcard *.c) INCLUDE=include/ MAIN_INCLUDE=../../include/ -BIN=vga.o +BIN=../../../obj/drv/vga.o all: $(CC) $(FLAGS) -I $(INCLUDE) -I $(MAIN_INCLUDE) $(SRCS) -o $(BIN) diff --git a/sys/drv/vga/vga.o b/sys/drv/vga/vga.o deleted file mode 100644 index 95df105..0000000 Binary files a/sys/drv/vga/vga.o and /dev/null differ diff --git a/sys/drv/vga/video.c b/sys/drv/vga/video.c index c960043..1ace1b4 100644 --- a/sys/drv/vga/video.c +++ b/sys/drv/vga/video.c @@ -17,6 +17,6 @@ vga_write(s8 *sequence, s8 flags) void vga_clearscreen() { for (int i = 0; i <= SIZE; i++) { - VGA_START[i] = 0; + vga_vidmem[i] = 0; } -} \ No newline at end of file +}