-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
27 lines (20 loc) · 909 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
.PHONY : doc
level = info
file = log.log
players = 4
fac = 9
port = 9000
run: ## Run the game
@swipl --quiet -t "main($(level), \"$(file)\", $(players), $(fac))" -s game.pl
test: ## Run tests
@swipl -g "load_test_files([]), run_tests." -g halt -s game.pl
coverage: ## Run tests and display coverage
@swipl -g "use_module(library(test_cover)), load_test_files([]), show_coverage(run_tests)." -g halt -s game.pl
install: ## Install dependencies
sudo apt-get install swi-prolog
doc: ## Install the documentation server
@echo Open the server at http://localhost:$(port)/azul/help
@echo Close the below process when you read the documentation
@swipl -g "use_module(library(http/http_path)), doc_server($(port))" -s game.pl
help: ## List available commands
@grep -E '^[a-zA-Z_-%]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'