]> git.dujemihanovic.xyz Git - nameless-os.git/commitdiff
Add Makefile
authorDuje Mihanović <duje.mihanovic@skole.hr>
Sat, 21 Aug 2021 11:00:34 +0000 (13:00 +0200)
committerDuje Mihanović <duje.mihanovic@skole.hr>
Sat, 21 Aug 2021 11:00:34 +0000 (13:00 +0200)
Can compile, clean and run the boot sector.

Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
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