diff --git a/Makefile b/Makefile index 9a312af..6ac13f7 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: all test build docker install clean proto check_protoc -CMD_NAME := demo-app # TODO: Update app name -VERSION ?= development # Default to "development" if VERSION is not set +CMD_NAME := demo-app +VERSION ?= development API_DIR := api/ PROTO_DIRS := $(wildcard proto/demo/app/*) # TODO: Update path (probably not demo) PLATFORMS := linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 @@ -28,7 +28,9 @@ build: test OS=$$(echo $$platform | cut -d/ -f1); \ ARCH=$$(echo $$platform | cut -d/ -f2); \ OUTPUT="$(OUTPUT_DIR)/$(CMD_NAME)-$$OS-$$ARCH"; \ - GOOS=$$OS GOARCH=$$ARCH go build -ldflags "-X $(VER_PKG)=$(VERSION)" -o $$OUTPUT; \ + mkdir -vp $(OUTPUT_DIR); \ + echo "Building for $$platform into $$OUTPUT"; \ + GOOS=$$OS GOARCH=$$ARCH go build -ldflags "-X $(VER_PKG)=$(VERSION)" -o $$OUTPUT .; \ echo "Built $$OUTPUT"; \ done go build -ldflags "-X $(VER_PKG)=$(VERSION)" -o bin/${CMD_NAME}