-
Notifications
You must be signed in to change notification settings - Fork 0
/
MakeFile
30 lines (22 loc) · 849 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
BINARY=ansibleparser
all: build
build: build-x86_64 build-arm64
build-x86_64:
GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o $(BINARY)_x86_64
build-arm64:
GOOS=linux GOARCH=arm64 go build -ldflags "-s -w" -o $(BINARY)_arm64
clean:
@rm -f $(BINARY)_x86_64 $(BINARY)_arm64
debug-amd64:
@export GOFLAGS=-gcflags="all=-N -l"
@echo "Building Debug AMD64 Binary"
GOOS=linux GOARCH=amd64 go build -ldflags "-X main.BuildTime=`date -u '+%Y-%m-%d_%I:%M:%S%p'`" -o $(BINARY)-debug-amd64 main.go
debug-arm64:
@export GOFLAGS=-gcflags="all=-N -l"
@echo "Building Debug ARM64 Binary"
GOOS=linux GOARCH=arm64 go build -ldflags "-X main.BuildTime=`date -u '+%Y-%m-%d_%I:%M:%S%p'`" -o $(BINARY)-debug-arm64 main.go
# Clean Debug Binary
clean-debug:
@echo "Cleaning Debug Binaries"
@rm -f $(BINARY)-debug-amd64
@rm -f $(BINARY)-debug-arm64