-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
33 lines (24 loc) · 803 Bytes
/
Copy pathmakefile
File metadata and controls
33 lines (24 loc) · 803 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
all: hello dump_log system_monitor
# 定义hello的目标文件
hello: ./bin/hello
# 目标文件生成规则,并设置目标依赖
./bin/hello: ./tests/hello/*.go
go build -o ./bin/hello ./tests/hello
# 给出清理规则
clean_hello:
rm -f ./bin/hello
dump_log: ./bin/dump_log
./bin/dump_log: ./tests/dump_log/*.go
go build -o ./bin/dump_log ./tests/dump_log
clean_dump_log:
rm -f ./bin/dump_log
system_monitor: ./bin/system_monitor
./bin/system_monitor: ./tests/system_monitor/*.go
go build -o ./bin/system_monitor ./tests/system_monitor
clean_system_monitor:
rm -f ./bin/system_monitor
# build:
# go build -o ./bin/hello ./tests/hello
# .PHONY 定义虚拟目标?
.PHONY: clean clean_hello clean_dump_log clean_system_monitor
clean: clean_hello clean_dump_log clean_system_monitor