aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-08 20:34:26 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-08 20:34:26 -0400
commiteb47f61450349b1be4e72ffe6f36273a1d01a428 (patch)
tree211c7a46c2ee20d03bc147e0bedb4eae43b36e5b /examples
parentba3413a9c91dca356db47e0e8db91216c4e3906b (diff)
Add Makefile
Diffstat (limited to 'examples')
-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.