File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 11ws-tcp-relay
22vendor
3+ _dist
4+
35# Compiled Object files, Static and Dynamic libs (Shared Objects)
46* .o
57* .a
Original file line number Diff line number Diff line change 1+ SRC = $(wildcard * .go)
2+ BIN = ws-tcp-relay
3+ DIST_DIR = _dist
4+
5+ $(BIN ) : $(SRC ) fmt # # Build binary for this platform
6+ go build -o " $( BIN) " $(SRC )
7+
8+ .PHONY : fmt dist clean help
9+
10+ dist : $(SRC ) fmt # # Build distribution binaries for all platforms using gox
11+ @which gox & > /dev/null || go get github.com/mitchellh/gox
12+ gox -output " $( DIST_DIR) /$( BIN) _{{.OS}}_{{.Arch}}"
13+
14+ fmt : $(SRC ) # # Lint with gofmt
15+ gofmt -w $(SRC )
16+
17+ clean : # # Clean up build files
18+ rm -rf $(DIST_DIR ) $(BIN )
19+
20+ help :
21+ @grep -E ' ^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST ) | awk ' BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
You can’t perform that action at this time.
0 commit comments