-
Notifications
You must be signed in to change notification settings - Fork 122
/
Copy pathMakefile
27 lines (18 loc) · 872 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
TARGET_EXEC := server
ENV := CGO_ENABLED=0
.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:
${ENV} GOARCH=amd64 GOOS=linux go build -toolexec iocgo -ldflags="-s -w" -o bin/linux/${TARGET_EXEC} -trimpath main.go
build-linux-arm64:
${ENV} GOARCH=arm64 GOOS=linux go build -toolexec iocgo -ldflags="-s -w" -o bin/linux/${TARGET_EXEC}-arm64 -trimpath main.go
build-osx:
${ENV} GOARCH=amd64 GOOS=darwin go build -toolexec iocgo -ldflags="-s -w" -o bin/osx/${TARGET_EXEC} -trimpath main.go
build-win:
${ENV} GOARCH=amd64 GOOS=windows go build -toolexec iocgo -ldflags="-s -w" -o bin/windows/${TARGET_EXEC}.exe -trimpath main.go