From: Duje Mihanović <duje.mihanovic@skole.hr>
Date: Sat, 21 Aug 2021 11:00:34 +0000 (+0200)
Subject: Add Makefile
X-Git-Tag: 0.1.0~28
X-Git-Url: http://git.dujemihanovic.xyz/%22http:/www.sics.se/static/%7B%7B%20%24.Site.BaseURL%20%7D%7Dposts/%7B%7B%20%24style.Permalink%20%7D%7D?a=commitdiff_plain;h=73dce672626ceb415b49ff059092c48a2f7c3de3;p=nameless-os.git

Add Makefile

Can compile, clean and run the boot sector.
---

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..9d95b1e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,18 @@
+AS = yasm # choose yasm or nasm here
+ASFLAGS = -f bin # compile a raw binary
+
+boot: boot.s print.s
+	$(AS) $(ASFLAGS) -o $@ boot.s
+
+clean:
+	-rm boot
+
+run:
+	qemu-system-i386 boot
+
+help:
+	@echo "Run 'make' to compile."
+	@echo "Run 'make clean' to delete compiled objects."
+	@echo "Run 'make run' to run the compiled object. Must have qemu-system-i386 (but x86_64 should work too)."
+
+.PHONY = clean run help