ssh-chat/Makefile
Nick Scheibenpflug 55c1def24d Windows support (fixed #217)
* Swap out gopass dependency

Remove github.com/mewbak/gopass in favor of github.com/howeyc/gopass

* Add Windows to Makefile and build_release

Added Windows/386 and Windows/amd64 to the Makefile.  Some minor changes
needed to be made to build_release to give the windows binary the ".exe"
extension.

* Makefile: remove windows/amd64
2016-09-15 13:52:55 -04:00

43 lines
1.3 KiB
Makefile

BINARY = ssh-chat
KEY = host_key
PORT = 2022
SRCS = %.go
VERSION := $(shell git describe --tags --dirty --always 2> /dev/null || echo "dev")
LDFLAGS = LDFLAGS="-X main.Version=$(VERSION)"
SUBPACKAGES := $(shell go list ./... | grep -v /vendor/)
all: $(BINARY)
$(BINARY): deps **/**/*.go **/*.go *.go
go build $(BUILDFLAGS) ./cmd/ssh-chat
deps:
go get ./...
build: $(BINARY)
clean:
rm $(BINARY)
$(KEY):
ssh-keygen -f $(KEY) -P ''
run: $(BINARY) $(KEY)
./$(BINARY) -i $(KEY) --bind ":$(PORT)" -vv
debug: $(BINARY) $(KEY)
./$(BINARY) --pprof 6060 -i $(KEY) --bind ":$(PORT)" -vv
test:
go test -v $(SUBPACKAGES)
release:
GOOS=linux GOARCH=arm GOARM=6 $(LDFLAGS) ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE
GOOS=linux GOARCH=amd64 $(LDFLAGS) ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE
GOOS=linux GOARCH=386 $(LDFLAGS) ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE
GOOS=darwin GOARCH=amd64 $(LDFLAGS) ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE
GOOS=freebsd GOARCH=amd64 $(LDFLAGS) ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE
GOOS=windows GOARCH=386 $(LDFLAGS) ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE