-
Notifications
You must be signed in to change notification settings - Fork 103
/
Makefile
26 lines (17 loc) · 823 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
TARGET_EXEC := server
.PHONY: all changelog clean install build
all: clean install build-linux build-linux-arm64 build-osx build-win
changelog:
conventional-changelog -p angular -o CHANGELOG.md -w -r 0
clean:
go clean -cache
install: clean
go install -ldflags="-s -w" -trimpath ./cmd/iocgo
build-linux:
GOARCH=amd64 GOOS=linux go build -toolexec iocgo -ldflags="-s -w" -o bin/linux/${TARGET_EXEC} -trimpath main.go
build-linux-arm64:
GOARCH=arm64 GOOS=linux go build -toolexec iocgo -ldflags="-s -w" -o bin/linux/${TARGET_EXEC}-arm64 -trimpath main.go
build-osx:
GOARCH=amd64 GOOS=darwin go build -toolexec iocgo -ldflags="-s -w" -o bin/osx/${TARGET_EXEC} -trimpath main.go
build-win:
GOARCH=amd64 GOOS=windows go build -toolexec iocgo -ldflags="-s -w" -o bin/windows/${TARGET_EXEC}.exe -trimpath main.go