APP_NAME := scratchbox CMD_DIR := ./cmd/pastebin BIN_DIR := ./bin BIN := $(BIN_DIR)/$(APP_NAME) CONFIG ?= config.yaml .PHONY: help run build test fmt clean help: @echo "Targets:" @echo " make run - Run the server (CONFIG=$(CONFIG))" @echo " make build - Build binary to $(BIN)" @echo " make test - Run all Go tests" @echo " make fmt - Format Go code" @echo " make clean - Remove built artifacts" run: go run $(CMD_DIR) --config $(CONFIG) build: mkdir -p $(BIN_DIR) go build -o $(BIN) $(CMD_DIR) test: go test ./... fmt: go fmt ./... clean: rm -rf $(BIN_DIR)