summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Makefile18
2 files changed, 20 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2a90a45
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+asmnc
+*.o
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..7927d9c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,18 @@
+asm_files := $(wildcard *.asm)
+obj_files := $(patsubst %.asm,%.o,$(asm_files))
+bin_file := asmnc
+
+.PHONY: all clean remake
+
+all: $(bin_file)
+
+clean:
+ rm -f $(obj_files) $(bin_file)
+
+remake: clean all
+
+%.o: %.asm
+ nasm -f macho64 -w+all -o $@ $<
+
+$(bin_file): $(obj_files)
+ gcc $^ -o $@