noozoid/Makefile

26 lines
499 B
Makefile
Raw Normal View History

2021-01-02 15:23:32 +00:00
PROGNAME=noozoid
BUILD_DIR=_build
all: help
2021-01-03 05:14:01 +00:00
build: ## build binary
2021-01-02 15:23:32 +00:00
mkdir -p $(BUILD_DIR)
crystal build -o $(BUILD_DIR)/$(PROGNAME) src/main.cr
2021-01-03 05:14:01 +00:00
test: ## test binary
crystal spec
2021-01-02 15:23:32 +00:00
help: ## print this help
@echo "Usage: make <target>"
@echo ""
@echo "With one of following targets:"
@echo ""
@awk 'BEGIN {FS = ":.*?## "} \
/^[a-zA-Z_-]+:.*?## / \
{ sub("\\\\n",sprintf("\n%22c"," "), $$2); \
printf("\033[36m%-20s\033[0m %s\n", $$1, $$2); \
}' $(MAKEFILE_LIST)
@echo ""