Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable cross compile #17

Merged
merged 1 commit into from
May 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
# Inspiration from https://github.com/rightscale/go-boilerplate/blob/master/Makefile

NAME=$(shell find cmd -name ".gitkeep_provider" -exec dirname {} \; | sort -u | sed -e 's|cmd/||')
VERSION=0.0.1

# version shouldn't have 'v' prefix for >= 0.13
VERSION=$(shell cat ./version)
# Change DUMMY_PROVIDER below to reflect the name of the service under development. The
# value of this variable is used in LOCAL_LOCATION, and is also used in the
DUMMY_PROVIDER=metal
Expand Down Expand Up @@ -32,11 +34,14 @@ ifeq ($(UNAME_S),Darwin)
endif
TMPFILE := $(shell mktemp)

GOOSALT ?= 'linux'
GOOS='$(GOOSALT)'

LOCALIZATION_FILES := $(shell find . -name \*.toml | grep -v vendor | grep -v ./bin)

$(NAME): $(shell find . -name \*.go)
CGO_ENABLED=0 go build $(TAGS) -ldflags "$(VFLAG)" -o build/$@ .

CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=amd64 go build $(TAGS) -ldflags "$(VFLAG)" -o build/$@ .
default: all
.PHONY: default

Expand Down
1 change: 1 addition & 0 deletions version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.6