Files
Laterna/Makefile
T

27 lines
673 B
Makefile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
MAIN_PKG :=./cmd/server
BIN_NAME ?= laterna
BIN_DIR := bin
CONFIG_FILE := config.json
.DEFAULT_GOAL := build
build:
@mkdir -p $(BIN_DIR)
@echo "🔧 Building binary..."
@cp $(CONFIG_FILE) $(BIN_DIR)/
@go build -o $(BIN_DIR)/$(BIN_NAME) $(MAIN_PKG)
@echo "Build complete: $(BIN_DIR)/$(BIN_NAME)"
run:
@echo "Running server..."
@go run $(MAIN_PKG)
clean:
@echo "🧹 Cleaning up..."
@rm -rf $(BIN_DIR) logs/
@go mod tidy
help:
@echo "Makefile targets:"
@echo " build Build the binary"
@echo " run Run the development server"
@echo " clean Remove build artifacts and tidy modules"
@echo " help Show this help message"