-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (36 loc) · 984 Bytes
/
Makefile
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
42
43
44
45
46
47
48
49
50
AGENT_RUNNER := ./cmd/nms/agent/runner.go
SERVER_RUNNER := ./cmd/nms/server/runner.go
.PHONY: rebuild build build-agent build-server agent server clean
build: build-agent build-server
rebuild: clean build-agent build-server
agent: build-agent run-agent
agent-verbose: build-agent run-agent-verbose
server: build-server run-server
server-verbose: build-server run-server-verbose
build-agent:
@echo "Building agent..."
@mkdir -p out/bin
@mkdir -p output
go build -o out/bin/agent $(AGENT_RUNNER)
build-server:
@echo "Building server..."
@mkdir -p out/bin
@mkdir -p output
go build -o out/bin/server $(SERVER_RUNNER)
run-agent:
@echo "Running agent..."
@./out/bin/agent
run-server:
@echo "Running server..."
@./out/bin/server
run-agent-verbose:
@echo "Running agent..."
@./out/bin/agent --verbose
run-server-verbose:
@echo "Running server..."
@./out/bin/server --verbose
clean:
@echo "Cleaning up..."
rm -rf out
rm -rf output
@echo "Clean complete."