From c931215aa986c172d08965f085d74d964ba46e22 Mon Sep 17 00:00:00 2001 From: Paul Mathieu Date: Thu, 15 Aug 2024 14:23:29 +0200 Subject: [PATCH] Add Makefile --- Makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..670a859 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +sources := $(wildcard *.java) +objects := $(sources:.java=.class) + +%.class: %.java + javac $^ + +.PHONY: build +build: $(objects) ## Build the game + +.PHONY: clean +clean: + rm -rf *.class + +.PHONY: run +run: ## Run the game + java Jeu + +.PHONY: help +help: ## Show this help + @echo Noteworthy targets: + @egrep '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' +.DEFAULT_GOAL := help