# Makefile pour bench-client

BINARY_NAME=bench-client
VERSION=1.0.0
LDFLAGS=-ldflags "-X main.version=$(VERSION) -s -w"

.PHONY: all build clean run

all: clean build

build:
	@echo "Compilation Linux AMD64 statique..."
	CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a $(LDFLAGS) -o $(BINARY_NAME) main.go
	@echo "Terminé : ./$(BINARY_NAME)"

clean:
	@echo "Nettoyage..."
	@rm -f $(BINARY_NAME)
	@go clean

run: build
	@echo "Lancement test..."
	sudo ./$(BINARY_NAME) --dry-run --debug
