Skip to content

Commit

Permalink
Updated makefile and added build instructions, assume GOBIN is set
Browse files Browse the repository at this point in the history
  • Loading branch information
Ted Ostrem committed Mar 14, 2017
1 parent 74579d8 commit b73066b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,2 +1,3 @@
*.swp
.xcompile
cli/bin
7 changes: 7 additions & 0 deletions README.md
Expand Up @@ -35,6 +35,13 @@ Use "mind [command] --help" for more information about a command.
* Windows
* Windows + Hyper-V

### Build instructions (macOS/Linux)
```
$ cd mindsdk/cli
$ make build install
```
*To install your `$GOBIN` has to be set.*

## [XCompile](xcompile)
A Docker image with everything needed to cross-compile C/C++ and Golang applications to the ARM architecture.

Expand Down
21 changes: 11 additions & 10 deletions cli/Makefile
@@ -1,32 +1,33 @@
NAME := vincross/mindcli

GOBIN ?= ${GOPATH}/bin

ARTIFACTS := \
${GOBIN}/mind \
${GOBIN}/mind-Darwin-x86_64 \
${GOBIN}/mind-Linux-x86_64 \
${GOBIN}/mind.exe


.PHONY : install build clean attach

build :
build : main.go
docker build -t ${NAME} .
mkdir -p bin
go build -i -o bin/mind mindsdk/cli
GOOS=darwin GOARCH=amd64 go build -i -o bin/mind-Darwin-x86_64 mindsdk/cli
GOOS=linux GOARCH=amd64 go build -i -o bin/mind-Linux-x86_64 mindsdk/cli
GOOS=windows GOARCH=amd64 go build -i -o bin/mind.exe mindsdk/cli

push :
docker push ${NAME}

install : main.go
go build -i -o ${GOBIN}/mind mindsdk/cli
GOOS=darwin GOARCH=amd64 go build -i -o ${GOBIN}/mind-Darwin-x86_64 mindsdk/cli
GOOS=linux GOARCH=amd64 go build -i -o ${GOBIN}/mind-Linux-x86_64 mindsdk/cli
GOOS=windows GOARCH=amd64 go build -i -o ${GOBIN}/mind.exe mindsdk/cli
install : bin/mind
cp bin/* ${GOBIN}

upload : ${ARTIFACTS}
scp ${ARTIFACTS} root@vcrxyz.com:/mindcli

clean :
rm -rf bin

uninstall :
rm -f ${ARTIFACTS}

attach :
Expand Down

0 comments on commit b73066b

Please sign in to comment.