This commit is contained in:
Starnakin 2025-05-11 16:51:18 +02:00
commit aef04e7ac5
3 changed files with 47 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
build
obj

36
Makefile Normal file
View File

@ -0,0 +1,36 @@
NAME := bozOS
CC := gcc
CFLAGS := -Wall -Wextra -Werror
LD := $(CC)
LDFLAGS :=
SRC := $(shell find src -name '*.c')
OBJ := $(patsubst src/%.c,obj/%.o,$(SRC))
all: $(NAME)
obj/%.o: src/%.c
mkdir -p $(dir $@)
$(CC) $(CFLAGS) -c $< -o $@
$(NAME): $(OBJ)
mkdir -p build
$(LD) $(LDFLAGS) -o build/$(NAME).bin $(OBJ)
debug: fast-iso
qemu-system-i386 -s -S -cdrom build/$(NAME).iso -vga std -D qemu.log -d in_asm,int -M smm=off
clean:
rm -rf obj
fclean: clean
rm -rf build
re:
$(MAKE) fclean
$(MAKE) all
.PHONY: all clean fclean re
-include $(DEP)

9
src/main.c Normal file
View File

@ -0,0 +1,9 @@
#include <stdio.h>
int main(int ac, char **av)
{
(void)ac;
(void)av;
printf("PING TA MERE\n");
return 1;
}