From b7b3568d557c51714d3edb24ef2d8a63b8fb4a14 Mon Sep 17 00:00:00 2001 From: Siesta <124433727+siestaw@users.noreply.github.com> Date: Sun, 27 Jul 2025 21:24:37 +0200 Subject: [PATCH] chore: improve makefile --- Makefile | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index ad05263..ff3f716 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,19 @@ -BINARY_NAME=laterna +MAIN_PKG=./cmd/server + +BIN_NAME ?= laterna +BIN_DIR=build + build: - mkdir -p build + @mkdir -p ${BIN_DIR} + @echo "🔧 Building binary using the standard go compiler..." cp config.json build - go build -o ./build/${BINARY_NAME} ./cmd/server - + go build -o $(BIN_DIR)/$(BIN_NAME) $(MAIN_PKG) + @echo "✅ Build complete: $(BIN_DIR)/$(BIN_NAME)" + run: go run ./cmd/server/ - clean: - rm -rf build/ + rm -rf ${BIN_DIR} rm -rf logs/ - go mod tidy \ No newline at end of file + go mod tidy