.PHONY: build test clean install

BIN := parallel-executor
BUILD_DIR := ../../bin

## build: Compila el binario
build:
	@mkdir -p $(BUILD_DIR)
	go build -trimpath -ldflags="-s -w" -o $(BUILD_DIR)/$(BIN) .
	@echo "✓ Built $(BUILD_DIR)/$(BIN)"

## test: Ejecuta tests
test:
	go test ./core/... -v

## clean: Elimina artefactos
clean:
	rm -f $(BUILD_DIR)/$(BIN)

## install: Copia binario a la skill
install: build
	@echo "✓ Binary at $(BUILD_DIR)/$(BIN)"
	@echo "  Use: $(BUILD_DIR)/$(BIN) --help"

## tidy: go mod tidy
tidy:
	go mod tidy

## help: Muestra ayuda
help:
	@grep -E '^## ' Makefile | sed 's/## //' | column -t -s ':'
