back to nasm

This commit is contained in:
nub31
2025-08-31 18:50:44 +02:00
parent 8bb4af6cca
commit cc7b16ee1e
4 changed files with 111 additions and 115 deletions

View File

@@ -1,16 +1,14 @@
CC = i386-elf-gcc
AS = i386-elf-as
LD = i386-elf-ld
CFLAGS = -m32 -ffreestanding -fno-builtin -Wall -Wextra -Wshadow -std=c23
LDFLAGS =
ASFLAGS =
SRC_C := src/kernel.c src/string.c src/vga.c
SRC_ASM := src/boot.s
SRC_ASM := src/boot.asm
OBJ_C := $(SRC_C:src/%.c=.build/%.o)
OBJ_ASM := $(SRC_ASM:src/%.s=.build/%.o)
OBJ_ASM := $(SRC_ASM:src/%.asm=.build/%.o)
OBJS := $(OBJ_C) $(OBJ_ASM)
kernel: .build/kernel
@@ -37,5 +35,5 @@ build-dir:
.build/%.o: src/%.c | build-dir
$(CC) $(CFLAGS) -c -o $@ $<
.build/%.o: src/%.s | build-dir
$(AS) $(ASFLAGS) -o $@ $<
.build/%.o: src/%.asm | build-dir
nasm -f elf32 -o $@ $<