From 70320ceeaedf5686486ad01a5048aa1ce93ec00d Mon Sep 17 00:00:00 2001 From: Aron Date: Mon, 3 Jun 2019 20:59:48 +0200 Subject: [PATCH] Makefile: added support for "make swarm" command (#1412) --- Makefile | 11 +++++++++++ README.md | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..5fef15f722 --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +# This Makefile is meant to be used by people that do not usually work +# with Go source code. If you know what GOPATH is then you probably +# don't need to bother with make. + +GOBIN = $(shell pwd)/build/bin + +swarm: + build/env.sh go run build/ci.go install ./cmd/swarm + @echo "Done building." + @echo "Run \"$(GOBIN)/swarm\" to launch swarm." + diff --git a/README.md b/README.md index d726812dcf..4eafc16115 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,16 @@ Swarm is a distributed storage platform and content distribution service, a nati Building Swarm requires Go (version 1.11 or later). +To simply compile the `swarm` binary without a `GOPATH`: + + $ git clone https://github.com/ethersphere/swarm + $ cd swarm + $ make swarm + +You will find the binary under `./build/bin/swarm`. + +To build a vendored `swarm` using `go get` you must have `GOPATH` set. Then run: + go get -d github.com/ethersphere/swarm go install github.com/ethersphere/swarm/cmd/swarm