-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
36 lines (26 loc) · 1.25 KB
/
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
.PHONY: all test build build-linux-x86_64 build-linux-x86 build-osx-x86_64 build-osx-x86 build-win-x86_64 build-win-x86
all: test build build-linux-x86_64 build-linux-x86 build-osx-x86_64 build-osx-x86 build-win-x86_64 build-win-x86
test:
@echo "Running tests"
@go test -v -race ./...
build:
@echo "Building"
@go build -o gtw
build-linux-x86_64:
@echo "Building linux-x86_64 version"
@GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -tags netgo -installsuffix netgo -o gtw-linux-x86_64
build-linux-x86:
@echo "Building linux-x86 version"
@GOOS=linux GOARCH=386 CGO_ENABLED=0 go build -a -tags netgo -installsuffix netgo -o gtw-linux-x86
build-osx-x86_64:
@echo "Building osx-x86_64 version"
@GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -a -tags netgo -installsuffix netgo -o gtw-osx-x86_64
build-osx-x86:
@echo "Building osx-x86 version"
@GOOS=darwin GOARCH=386 CGO_ENABLED=0 go build -a -tags netgo -installsuffix netgo -o gtw-osx-x86
build-win-x86_64:
@echo "Building win-x86_64 version"
@GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -a -tags netgo -installsuffix netgo -o gtw-win-x86_64.exe
build-win-x86:
@echo "Building win-x86 version"
@GOOS=darwin GOARCH=386 CGO_ENABLED=0 go build -a -tags netgo -installsuffix netgo -o gtw-win-x86.exe