-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (27 loc) · 765 Bytes
/
Makefile
File metadata and controls
33 lines (27 loc) · 765 Bytes
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
.PHONY: build install clean test help
BINARY_NAME=cdp
BUILD_DIR=bin
help:
@echo "Available targets:"
@echo " build - Build the binary to ./$(BUILD_DIR)/$(BINARY_NAME)"
@echo " install - Install the binary to $$GOPATH/bin"
@echo " clean - Remove build artifacts"
@echo " test - Run tests"
build:
@mkdir -p $(BUILD_DIR)
@echo "Building $(BINARY_NAME)..."
@go build -o $(BUILD_DIR)/$(BINARY_NAME) .
@echo "Build complete: $(BUILD_DIR)/$(BINARY_NAME)"
install:
@echo "Installing $(BINARY_NAME)..."
@go install .
@echo "Installed to $$GOPATH/bin/$(BINARY_NAME)"
clean:
@echo "Cleaning build artifacts..."
@rm -rf $(BUILD_DIR)
@rm -f $(BINARY_NAME)
@go clean
@echo "Clean complete"
test:
@echo "Running tests..."
@go test -v ./...