Files
pig-farm-controller/Makefile
2025-09-13 19:48:13 +08:00

33 lines
610 B
Makefile

# Makefile for pig-farm-controller
# 默认目标
.PHONY: help
help:
@echo "Usage: make [target]"
@echo
@echo "Targets:"
@echo " run Run the application"
@echo " build Build the application"
@echo " clean Clean generated files"
@echo " test Run all tests"
@echo " help Show this help message"
# 运行应用
.PHONY: run
run:
go run main.go
# 构建应用
.PHONY: build
build:
go build -o bin/pig-farm-controller .
# 清理生成文件
.PHONY: clean
clean:
rm -f bin/pig-farm-controller
# 运行所有测试
.PHONY: test
test:
go test --count=1 ./...