mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
24 lines
392 B
Makefile
24 lines
392 B
Makefile
|
XC_OS="linux darwin"
|
||
|
XC_ARCH="amd64"
|
||
|
XC_PARALLEL="2"
|
||
|
BIN="../bin"
|
||
|
SRC=$(shell find . -name "*.go")
|
||
|
|
||
|
ifeq (, $(shell which gox))
|
||
|
$(warning "could not find gox in $(PATH), run: go get github.com/mitchellh/gox")
|
||
|
endif
|
||
|
|
||
|
.PHONY: all build
|
||
|
|
||
|
default: all
|
||
|
|
||
|
all: build
|
||
|
|
||
|
build:
|
||
|
gox \
|
||
|
-os=$(XC_OS) \
|
||
|
-arch=$(XC_ARCH) \
|
||
|
-parallel=$(XC_PARALLEL) \
|
||
|
-output=$(BIN)/{{.Dir}}_{{.OS}}_{{.Arch}} \
|
||
|
;
|