aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandrewchambers <[email protected]>2021-10-11 11:02:43 +1300
committerGitHub <[email protected]>2021-10-11 11:02:43 +1300
commit4f8a2b735d047144f4caf87e73d8e055e4756f26 (patch)
tree8f8e4b8c65db78935ff18f2cd96a3c14b8716ac8
parent8dd8783aa5b28d4950b9debcf30bd30b367beb7f (diff)
parent16d87ef13b62ed1b6ddf4c84a00f7604e2a3beab (diff)
Merge pull request #1 from michaelforney/makefile
Add Makefile
-rw-r--r--Makefile27
-rw-r--r--README.md6
2 files changed, 33 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..94f3a7a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+.POSIX:
+.PHONY: all clean
+
+CFLAGS+=-D _GNU_SOURCE
+
+-include config.mk
+
+OBJ=\
+ main.o\
+ util.o
+
+all: minias
+
+minias: $(OBJ)
+ $(CC) $(LDFLAGS) -o $@ $(OBJ)
+
+asm.peg.inc: asm.peg
+ leg -o $@ asm.peg
+
+main.o: asm.peg.inc
+main.o util.o: minias.h
+
+check:
+ sh test/test.sh
+
+clean:
+ rm -f $(OBJ) minias asm.peg.inc
diff --git a/README.md b/README.md
index f350c41..f80f75e 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,12 @@ Non Goals:
redo minias
```
+or
+
+```
+make
+```
+
or
```