File tree 3 files changed +21
-2
lines changed
3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ For example, to build a static 64-bit Windows binary:
19
19
-ldflags '-w -extldflags "-static" -extld x86_64-w64-mingw32-gcc' \
20
20
github.com/square/ghostunnel
21
21
22
- For more info, see [ xgo] [ xgo ] 's README on GitHub.
22
+ Ghostunnel ships with a ` Makefile.dist ` that will cross-compile for
23
+ darwin/amd64, linux/amd64, windows/386 and windows/amd64 when asked to build
24
+ the ` dist ` target. Note that [ xgo] [ xgo ] (and Docker) must already be installed
25
+ to run this. For more info, see also [ xgo] [ xgo ] 's README on GitHub.
23
26
24
27
[ xgo ] : https://github.com/karalabe/xgo
Original file line number Diff line number Diff line change 1
1
SOURCE_FILES := $(shell find . \( -name '* .go' -not -path './vendor* ' \) )
2
2
INTEGRATION_TESTS := $(shell find tests -name 'test-* .py' -exec basename {} .py \;)
3
+ VERSION := $(shell git describe --always --dirty)
4
+
5
+ # Ghostunnel binary
6
+ ghostunnel : $(SOURCE_FILES )
7
+ go build -ldflags ' -X main.version=${VERSION}' -o ghostunnel .
3
8
4
9
# Test binary with coverage instrumentation
5
10
ghostunnel.test : $(SOURCE_FILES )
Original file line number Diff line number Diff line change @@ -65,10 +65,21 @@ on how to generate new ones with OpenSSL).
65
65
66
66
Ghostunnel is available through [ GitHub releases] [ rel ] and through [ Docker Hub] [ hub ] .
67
67
68
- Note that ghostunnel requires Go 1.9 or later to build, and CGO is required for PKCS #11 support.
68
+ Binaries can be built from source as follows (cross-compile requires Docker and [ xgo] [ xgo ] ):
69
+
70
+ # Compile for local architecture
71
+ make ghostunnel
72
+
73
+ # Cross-compile release binaries
74
+ make -f Makefile.dist dist
75
+
76
+ Note that ghostunnel requires Go 1.9 or later to build, and CGO is required for
77
+ PKCS #11 support. See also [ CROSS-COMPILE.md] ( CROSS-COMPILE.md ) for
78
+ instructions on how to cross-compile a custom build with CGO enabled.
69
79
70
80
[ rel ] : https://github.com/square/ghostunnel/releases
71
81
[ hub ] : https://hub.docker.com/r/squareup/ghostunnel
82
+ [ xgo ] : https://github.com/karalabe/xgo
72
83
73
84
### Develop
74
85
You can’t perform that action at this time.
0 commit comments