Skip to content
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*.out

# Ouput of the build-binaries script
build/_output
build/dist

# .DS_Store file of MacOS
.DS_Store
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
PACKAGE=github.com/microcks/microcks-cli
CURRENT_DIR=$(shell pwd)
DIST_DIR=${CURRENT_DIR}/build/dist
CLI_NAME=microcks
BIN_NAME=microcks

HOST_OS=$(shell go env GOOS)
HOST_ARCH=$(shell go env GOARCH)

.PHONY: build-local
build-local:
go build -o ${DIST_DIR}/${BIN_NAME}

.PHONY: clean
clean:
rm -rf ${CURRENT_DIR}/build/dist

.PHONY: build-binaries
build-binaries:
make BIN_NAME=${CLI_NAME}-linux-amd64 GOOS=linux build-local
make BIN_NAME=${CLI_NAME}-linux-arm64 GOOS=linux GOARCH=arm64 build-local
make BIN_NAME=${CLI_NAME}-darwin-amd64 GOOS=darwin build-local
make BIN_NAME=${CLI_NAME}-darwin-arm64 GOOS=darwin GOARCH=arm64 build-local
make BIN_NAME=${CLI_NAME}-windows-amd64.exe GOOS=windows build-local
make BIN_NAME=${CLI_NAME}-windows-386.exe GOOS=windows GOARCH=386 build-local