-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.build
33 lines (28 loc) · 1012 Bytes
/
Makefile.build
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
# Copyright (C) 2016 wikiwi.io
#
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
# go build targets
#
BUILD_CMD = CGO_ENABLED=0 ${GO} build -ldflags "-X ${GO_PACKAGE}/pkg/version.Version=${BUILD_VERSION}" -o "$@" ${GO_PACKAGE}/cmd/$(basename $(notdir $@))
# arm
${BINARIES:%=bin/linux/arm/5/%}:
GOOS=linux GOARCH=arm GOARM=5 ${BUILD_CMD}
${BINARIES:%=bin/linux/arm/7/%}:
GOOS=linux GOARCH=arm GOARM=7 ${BUILD_CMD}
# 386
${BINARIES:%=bin/darwin/386/%}:
GOOS=darwin GOARCH=386 ${BUILD_CMD}
${BINARIES:%=bin/linux/386/%}:
GOOS=linux GOARCH=386 ${BUILD_CMD}
${BINARIES:%=bin/windows/386/%}:
GOOS=windows GOARCH=386 ${BUILD_CMD}
# amd64
${BINARIES:%=bin/linux/amd64/%}:
GOOS=linux GOARCH=amd64 ${BUILD_CMD}
${BINARIES:%=bin/freebsd/amd64/%}:
GOOS=freebsd GOARCH=amd64 ${BUILD_CMD}
${BINARIES:%=bin/darwin/amd64/%}:
GOOS=darwin GOARCH=amd64 ${BUILD_CMD}
${BINARIES:%=bin/windows/amd64/%.exe}:
GOOS=windows GOARCH=amd64 ${BUILD_CMD}