.PHONY: build run test lint clean help

BINARY_NAME=apex
GO=go
GOFLAGS=-v

help:
	@echo "Apex — TUI-first AI Job Search Platform"
	@echo ""
	@echo "Targets:"
	@echo "  make build      Build the binary"
	@echo "  make run        Build and run"
	@echo "  make test       Run tests"
	@echo "  make lint       Run go vet"
	@echo "  make fmt        Format code"
	@echo "  make clean      Remove binaries"

build:
	$(GO) build $(GOFLAGS) -o $(BINARY_NAME) ./cmd/apex

run: build
	./$(BINARY_NAME)

test:
	$(GO) test $(GOFLAGS) ./...

lint:
	$(GO) vet ./...
	$(GO) fmt ./...

fmt:
	$(GO) fmt ./...

clean:
	rm -f $(BINARY_NAME)
	$(GO) clean
