Hello, world!

This commit is contained in:
2025-10-07 16:17:24 -04:00
commit 22f1cae833
4 changed files with 39 additions and 0 deletions

18
Makefile Normal file
View File

@@ -0,0 +1,18 @@
.PHONY: all clean
SRC := $(wildcard *.asm)
OBJDIR := build
OBJS := $(SRC:%.asm=$(OBJDIR)/%.o)
BINS := $(SRC:%.asm=$(OBJDIR)/%)
all: $(BINS)
$(OBJDIR)/%: $(OBJDIR)/%.o
ld -m elf_i386 $< -o $@
$(OBJDIR)/%.o: %.asm
mkdir -p $(OBJDIR)
nasm -f elf $< -o $@
clean:
rm -rf $(OBJDIR)