-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (26 loc) · 756 Bytes
/
Makefile
File metadata and controls
44 lines (26 loc) · 756 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
42
43
CLI_BIN="zte-scanner-cli"
BOT_BIN="zte-scanner-bot"
BUILD_FLAGS="-s -w"
.PHONY: all
all: cli/build
.PHONY: cli/build
cli/build:
@CGO_ENABLED=0 go build -o $(CLI_BIN) -ldflags $(BUILD_FLAGS) ./cmd/cli
.PHONY: cli/build/pi
cli/build/pi:
env GOOS="linux" GOARCH="arm64" GOARM=7 CGO_ENABLED=0 go build -o $(CLI_BIN) -ldflags $(BUILD_FLAGS) ./cmd/cli
.PHONY: cli/run
cli/run: build
./$(BIN)
.PHONY: bot/build
bot/build:
@CGO_ENABLED=0 go build -o $(BOT_BIN) -ldflags $(BUILD_FLAGS) ./cmd/bot
.PHONY: bot/run
bot/run: bot/build
./$(BOT_BIN)
.PHONY: bot/build/pi
bot/build/pi:
env GOOS="linux" GOARCH="arm64" GOARM=7 CGO_ENABLED=0 go build -o $(BOT_BIN) -ldflags $(BUILD_FLAGS) ./cmd/bot
.PHONY: clean
clean:
@rm -f $(CLI_BIN) $(BOT_BIN)