Add Makefile
This commit is contained in:
parent
3e51dae89a
commit
c931215aa9
22
Makefile
Normal file
22
Makefile
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user