-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (32 loc) · 709 Bytes
/
Copy pathMakefile
File metadata and controls
40 lines (32 loc) · 709 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
34
35
36
37
38
39
40
.PHONY: build run clean dev test
# Binary name
BINARY_NAME=fms
# Build the application
build:
@echo "Building $(BINARY_NAME)..."
@go build -o bin/$(BINARY_NAME) main.go
@echo "Build complete: bin/$(BINARY_NAME)"
# Build and run the application
run: build
@echo "Starting $(BINARY_NAME)..."
@./bin/$(BINARY_NAME)
# Clean build artifacts
clean:
@echo "Cleaning..."
@rm -rf bin/
@go clean
@echo "Clean complete"
# Run with go run (no build)
dev:
@echo "Running in development mode..."
@go run main.go
# Run tests
test:
@echo "Running tests..."
@go test -v ./...
# Download dependencies
deps:
@echo "Downloading dependencies..."
@go mod download
@go mod tidy
@echo "Dependencies updated"