about summary refs log tree commit diff
path: root/ach/Makefile
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2021-03-07T20·29-0500
committerGriffin Smith <root@gws.fyi>2021-03-07T20·29-0500
commit80f8ede0bbc9799d5199707e1e1ad8e80e4ca7ac (patch)
treecbb418b042583714fe09f946f1b9a03d1d98857f /ach/Makefile
Initial commit
Diffstat (limited to 'ach/Makefile')
-rw-r--r--ach/Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/ach/Makefile b/ach/Makefile
new file mode 100644
index 000000000000..869a0d0f8a3e
--- /dev/null
+++ b/ach/Makefile
@@ -0,0 +1,15 @@
+default: simple
+
+%.ll: %.ach
+	cargo run -- compile $< -o $@ -f llvm
+
+%.o: %.ll
+	llc $< -o $@ -filetype=obj
+
+%: %.o
+	clang $< -o $@
+
+.PHONY: clean
+
+clean:
+	@rm -f *.ll *.o simple