summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..475bf51
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,15 @@
+target = smallbrain
+
+CC = cc
+CFLAGS = -g -no-pie
+
+all: ${target}
+${target}: ${target}.s
+ m4 macros.m4 $< >out.s
+ ${CC} ${CFLAGS} -o $@ out.s
+
+.PHONY: bench clean
+bench:
+ hyperfine -S sh -w 200 -r 100000 "./smallbrain tests/towers-of-hanoi.bf"
+clean:
+ rm -f ${target} out.s