2024-11-16 19:02:46 +00:00
|
|
|
# Variables
|
|
|
|
CLIENT_PKG := ./cmd/eia-client
|
2024-11-15 21:30:45 +00:00
|
|
|
|
2024-11-16 19:02:46 +00:00
|
|
|
.PHONY: all generate build install clean
|
2024-11-15 21:30:45 +00:00
|
|
|
|
2024-11-16 19:02:46 +00:00
|
|
|
# Default target
|
|
|
|
all: generate build
|
2024-11-15 21:30:45 +00:00
|
|
|
|
2024-11-16 19:02:46 +00:00
|
|
|
# Generate code
|
|
|
|
generate:
|
|
|
|
go generate ./...
|
2024-11-15 21:30:45 +00:00
|
|
|
|
2024-11-16 19:02:46 +00:00
|
|
|
# Build the client command binary
|
|
|
|
build: generate
|
|
|
|
go build -o bin/eia-client $(CLIENT_PKG)
|
2024-11-15 21:30:45 +00:00
|
|
|
|
2024-11-16 19:02:46 +00:00
|
|
|
# Install the client command binary
|
|
|
|
install: generate
|
|
|
|
go install $(CLIENT_PKG)
|
2024-11-15 21:30:45 +00:00
|
|
|
|
2024-11-16 19:02:46 +00:00
|
|
|
# Clean up generated files and build artifacts
|
2024-11-15 21:30:45 +00:00
|
|
|
clean:
|
2024-11-16 19:02:46 +00:00
|
|
|
rm -rf bin/eia-client
|