Skip to content

Add Makefile to simplify building #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*~
tcp_fallback
tcp_fallback-darwin-amd64
tcp_fallback-linux-amd64
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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