.PHONY: build test fmt lint clean doc examples help

# Default target
help:
	@echo "GmSSL Rust Bindings - Development Commands"
	@echo ""
	@echo "Available targets:"
	@echo "  build       - Build the project"
	@echo "  release     - Build release version"
	@echo "  test        - Run all tests"
	@echo "  test-verbose - Run tests with output"
	@echo "  integration - Run integration tests only"
	@echo "  fmt         - Format code with rustfmt"
	@echo "  lint        - Run clippy linter"
	@echo "  doc         - Generate and open documentation"
	@echo "  clean       - Remove build artifacts"
	@echo "  examples    - Run example programs"
	@echo "  deps        - Check dependencies"
	@echo "  update      - Update dependencies"
	@echo ""

# Build targets
build:
	cargo build

release:
	cargo build --release

# Test targets
test:
	cargo test --lib

test-verbose:
	cargo test -- --nocapture

integration:
	cargo test --test integration_tests

# Code quality
fmt:
	cargo fmt

lint:
	cargo clippy -- -D warnings

fmt-check:
	cargo fmt -- --check

# Documentation
doc:
	cargo doc --open

# Clean
clean:
	cargo clean

# Examples
examples:
	cargo run --example main

# Dependencies
deps:
	cargo tree

update:
	cargo update

# Combined CI target
ci: fmt-check lint test doc
	@echo "✓ All CI checks passed!"

# Development setup
dev-setup: build test doc
	@echo "✓ Development environment ready!"
