update: Makefile with debug build target and update help text
Some checks failed
Go Build Multi-Platform / build (amd64, freebsd) (push) Failing after 55s
Go Build Multi-Platform / build (amd64, darwin) (push) Failing after 58s
Go Build Multi-Platform / build (amd64, linux) (push) Failing after 54s
Benchmark GC Performance / benchmark (push) Successful in 1m28s
Go Build Multi-Platform / build (arm, freebsd) (push) Failing after 48s
Go Build Multi-Platform / build (arm, linux) (push) Failing after 46s
Go Build Multi-Platform / build (arm64, darwin) (push) Failing after 29s
Go Build Multi-Platform / build (arm64, windows) (push) Failing after 28s
Go Test Multi-Platform / Test (ubuntu-latest, amd64) (push) Successful in 1m32s
Go Test Multi-Platform / Test (macos-latest, amd64) (push) Has been cancelled
Go Test Multi-Platform / Test (windows-latest, amd64) (push) Has been cancelled
Go Test Multi-Platform / Test (macos-latest, arm64) (push) Has been cancelled
Go Build Multi-Platform / build (amd64, windows) (push) Failing after 50s
Go Build Multi-Platform / build (arm, windows) (push) Failing after 36s
Go Build Multi-Platform / build (arm64, linux) (push) Failing after 38s
Go Build Multi-Platform / build (arm64, freebsd) (push) Failing after 40s
Go Test Multi-Platform / Test (ubuntu-latest, arm64) (push) Successful in 46s
Run Gosec / tests (push) Successful in 51s
Go Build Multi-Platform / Create Release (push) Has been skipped
Go Revive Lint / lint (push) Successful in 36s
Performance Monitor / performance-monitor (push) Has been cancelled

This commit is contained in:
2025-11-09 00:01:19 -06:00
parent 636d400f1e
commit fc95e54b2e

View File

@@ -1,7 +1,8 @@
GOCMD=go
GOBUILD=$(GOCMD) build
GOBUILD_EXPERIMENTAL=GOEXPERIMENT=greenteagc $(GOCMD) build
GOBUILD_DEBUG=$(GOCMD) build
GOBUILD_RELEASE=CGO_ENABLED=0 $(GOCMD) build -ldflags="-s -w"
GOBUILD_EXPERIMENTAL=GOEXPERIMENT=greenteagc $(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
@@ -15,13 +16,17 @@ MAIN_PACKAGE=./cmd/reticulum-go
ALL_PACKAGES=$$(go list ./... | grep -v /vendor/)
.PHONY: all build build-experimental experimental release lint bench bench-experimental bench-compare clean test coverage deps help tinygo-build tinygo-wasm
.PHONY: all build build-experimental experimental release debug lint bench bench-experimental bench-compare clean test coverage deps help tinygo-build tinygo-wasm run
all: clean deps build test
build:
@mkdir -p $(BUILD_DIR)
$(GOBUILD) -o $(BUILD_DIR)/$(BINARY_NAME) $(MAIN_PACKAGE)
$(GOBUILD_RELEASE) -o $(BUILD_DIR)/$(BINARY_NAME) $(MAIN_PACKAGE)
debug:
@mkdir -p $(BUILD_DIR)
$(GOBUILD_DEBUG) -o $(BUILD_DIR)/$(BINARY_NAME) $(MAIN_PACKAGE)
build-experimental:
@mkdir -p $(BUILD_DIR)
@@ -56,7 +61,11 @@ coverage:
$(GOCMD) tool cover -html=coverage.out
deps:
@GOPROXY=$${GOPROXY:-https://proxy.golang.org,direct}; \
export GOPROXY; \
$(GOMOD) download
@GOPROXY=$${GOPROXY:-https://proxy.golang.org,direct}; \
export GOPROXY; \
$(GOMOD) verify
build-linux:
@@ -103,7 +112,7 @@ build-riscv:
build-all: build-linux build-windows build-darwin build-freebsd build-openbsd build-netbsd build-arm build-riscv
run:
@./$(BUILD_DIR)/$(BINARY_NAME)
$(GOCMD) run $(MAIN_PACKAGE)
tinygo-build:
@mkdir -p $(BUILD_DIR)
@@ -119,10 +128,11 @@ install:
help:
@echo "Available targets:"
@echo " all - Clean, download dependencies, build and test"
@echo " build - Build binary"
@echo " build - Build release binary (no debug symbols, static)"
@echo " debug - Build debug binary"
@echo " build-experimental - Build binary with experimental features (GOEXPERIMENT=greenteagc)"
@echo " experimental - Alias for build-experimental"
@echo " release - Build stripped static binary for release"
@echo " release - Build stripped static binary for release (alias for build)"
@echo " lint - Run revive linter"
@echo " bench - Run benchmarks with standard GC"
@echo " bench-experimental - Run benchmarks with experimental GC"
@@ -140,7 +150,7 @@ help:
@echo " build-arm - Build for ARM architectures (arm, arm64)"
@echo " build-riscv - Build for RISC-V architecture (riscv64)"
@echo " build-all - Build for all platforms and architectures"
@echo " run - Run reticulum binary"
@echo " run - Run with go run"
@echo " tinygo-build - Build binary with TinyGo compiler"
@echo " tinygo-wasm - Build WebAssembly binary with TinyGo compiler"
@echo " install - Install dependencies"