summaryrefslogtreecommitdiff
path: root/Makefile
blob: f3d4925b76f5c4df2cb6f3f7c1565bc692cfeb80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Binary name
BINARY_NAME=claude-proxy

# Go build flags
GO_FLAGS=-ldflags="-s -w"

# Default model to use with Ollama (can override via CLI)
DEFAULT_MODEL=codellama

# Default port
PORT=8081

.PHONY: all build run clean fmt test

# Default target
all: build

# Build the binary
build:
	go build $(GO_FLAGS) -o $(BINARY_NAME) ./cmd/claude-proxy/main.go

# Run the server with environment variables
run:
	OLLAMA_MODEL=$(DEFAULT_MODEL) BIND_ADDR=":$(PORT)" ./$(BINARY_NAME)

# Format all Go files
fmt:
	go fmt ./...

# Run Go tests
test:
	go test ./...

# Clean build artifacts
clean:
	rm -f $(BINARY_NAME)