better folders structures
This commit is contained in:
parent
c6922febc1
commit
9415a40263
6 changed files with 10 additions and 3 deletions
9
Makefile
9
Makefile
|
@ -2,7 +2,8 @@ OBJECTS = loader.o framebuffer.o io.o kmain.o
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -m32 -nostdlib -nostdinc -fno-builtin -fno-stack-protector \
|
CFLAGS = -m32 -nostdlib -nostdinc -fno-builtin -fno-stack-protector \
|
||||||
-nostartfiles -nodefaultlibs -c #-Wall -Wextra -Werror -c
|
-nostartfiles -nodefaultlibs -Iinclude -Wall -Wextra -Werror -c \
|
||||||
|
-ansi -pedantic
|
||||||
|
|
||||||
LDFLAGS = -T link.ld -melf_i386
|
LDFLAGS = -T link.ld -melf_i386
|
||||||
|
|
||||||
|
@ -17,9 +18,15 @@ kernel.elf: $(OBJECTS)
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) $(CFLAGS) $< -o $@
|
$(CC) $(CFLAGS) $< -o $@
|
||||||
|
|
||||||
|
%.o: src/%.c
|
||||||
|
$(CC) $(CFLAGS) $< -o $@
|
||||||
|
|
||||||
%.o: %.s
|
%.o: %.s
|
||||||
$(AS) $(ASFLAGS) $< -o $@
|
$(AS) $(ASFLAGS) $< -o $@
|
||||||
|
|
||||||
|
%.o: src/%.s
|
||||||
|
$(AS) $(ASFLAGS) $< -o $@
|
||||||
|
|
||||||
os.iso: kernel.elf
|
os.iso: kernel.elf
|
||||||
cp kernel.elf iso/boot/kernel.elf
|
cp kernel.elf iso/boot/kernel.elf
|
||||||
mkisofs -R \
|
mkisofs -R \
|
||||||
|
|
4
kmain.c
4
kmain.c
|
@ -1,8 +1,8 @@
|
||||||
#include "framebuffer.h"
|
#include "framebuffer.h"
|
||||||
|
|
||||||
int write(char *buf, unsigned int len)
|
unsigned int write(char *buf, unsigned int len)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
unsigned int ret = 0;
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
fb_move_cursor(ret);
|
fb_move_cursor(ret);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue