From 40819382e09754964d08020b546765deebf034c9 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 29 Aug 2015 18:57:49 -0400 Subject: [PATCH 1/3] Add Makefile to simplify building --- Makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1b2087d --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +all: build + +.PHONY: clean +clean: + rm tcp-fallback-darwin-amd64 tcp-fallback-linux-amd64 + +.PHONY: test +test: + go test + +.PHONY: build +build: + GOARCH=amd64 GOOS=darwin go build -o tcp-fallback-darwin-amd64 tcp_fallback.go + GOARCH=amd64 GOOS=linux go build -o tcp-fallback-linux-amd64 tcp_fallback.go + +.PHONY: run +run: + go run tcp_fallback.go From 4179c30ed298facd0537e32b2b547fa38b2def66 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 29 Aug 2015 18:58:56 -0400 Subject: [PATCH 2/3] Ignore built binaries --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 3e0b230..0025d8a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ *~ tcp_fallback +tcp_fallback-darwin-amd64 +tcp_fallback-linux-amd64 From 9e3fed3385a5650d86df1acfdd5722d7bfbcb40a Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 29 Aug 2015 18:59:16 -0400 Subject: [PATCH 3/3] rename binaries to follow gitignore convention --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1b2087d..5827314 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,8 @@ test: .PHONY: build build: - GOARCH=amd64 GOOS=darwin go build -o tcp-fallback-darwin-amd64 tcp_fallback.go - GOARCH=amd64 GOOS=linux go build -o tcp-fallback-linux-amd64 tcp_fallback.go + GOARCH=amd64 GOOS=darwin go build -o tcp_fallback-darwin-amd64 tcp_fallback.go + GOARCH=amd64 GOOS=linux go build -o tcp_fallback-linux-amd64 tcp_fallback.go .PHONY: run run: