From eb47f61450349b1be4e72ffe6f36273a1d01a428 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 8 Sep 2024 20:34:26 -0400 Subject: [PATCH] Add Makefile --- examples/game/Makefile | 17 +++++++++++++++++ examples/game/README.md | 3 +++ 2 files changed, 20 insertions(+) create mode 100644 examples/game/Makefile diff --git a/examples/game/Makefile b/examples/game/Makefile new file mode 100644 index 0000000..7cf46ce --- /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 cc9d363..475a829 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.