program = day-01 GO = go SRC_DIR := src BIN_DIR := bin EXE := $(BIN_DIR)/$(program) .DEFAULT_GOAL := build .PHONY: fmt vet build clean fmt: $(GO) fmt ./... vet: fmt $(GO) vet ./... build: vet | $(BIN_DIR) $(GO) build -o $(EXE) . $(BIN_DIR): @mkdir -p $@ clean: @rm -rv $(BIN_DIR)