aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/game/Makefile17
-rw-r--r--examples/game/README.md3
2 files changed, 20 insertions, 0 deletions
diff --git a/examples/game/Makefile b/examples/game/Makefile
new file mode 100644
index 00000000..7cf46ce6
--- /dev/null
+++ b/examples/game/Makefile
@@ -0,0 +1,17 @@
+
+
+game: game.tm box.tm color.tm player.tm world.tm
+ tomo -e game.tm
+
+# Disable built-in makefile rules:
+%: %.c
+%.o: %.c
+%: %.o
+
+clean:
+ rm -vf game *.tm.*
+
+play: game
+ ./game
+
+.PHONY: play, clean
diff --git a/examples/game/README.md b/examples/game/README.md
index cc9d3632..475a8299 100644
--- a/examples/game/README.md
+++ b/examples/game/README.md
@@ -8,3 +8,6 @@ interact with an external C library. To run the game:
```bash
tomo game.tm
```
+
+An example [Makefile](Makefile) is also provided if you want to use `make` to
+build the game and `make clean` to clean up the built files.