-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (33 loc) · 966 Bytes
/
Makefile
File metadata and controls
41 lines (33 loc) · 966 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
41
# Makefile for the Go Benchmarking Tool
# Variables
BINARY_NAME=benchmarking-tool.out
CONFIG_FILE ?= config-examples/simple-example.yml
# Default target
.DEFAULT_GOAL := help
# Build the application
build:
@echo "Building the application..."
go mod tidy
go build -o $(BINARY_NAME) .
@echo "Build successful!"
# Run the application
run: build
@echo "Running the application with config: $(CONFIG_FILE)"
./$(BINARY_NAME) $(CONFIG_FILE)
# Run tests
test:
@echo "Running tests..."
go test -v ./...
# Clean up build artifacts
clean:
@echo "Cleaning up..."
rm -f $(BINARY_NAME)
# Display help
help:
@echo "Available commands:"
@echo " build - Build the application"
@echo " run - Run the application (default config: $(CONFIG_FILE))"
@echo " - To use a different config: make run CONFIG_FILE=path/to/your/config.yml"
@echo " test - Run tests"
@echo " clean - Clean up build artifacts"
.PHONY: build run test clean help