add make target to build static binary
This is useful to generate a binary that can be dropped onto any arbitrary distro, such as CoreOS, without having to worry about glibc or other dependencies. Specifically: CoreOS uses glibc, but it does not have a package manager. It also has a read-only OS (`/usr/`). Thus I'd like to compile a binary that can be dropped into CoreOS and have zero dependencies. * `make build` builds the same as it did before this commit. * `make all` builds both dynamic and static bins, as expected. I struggled with a way to DRY this up _and_ avoid diff churn. In the end, I went with simplicity even though it's not DRY.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -6,4 +6,5 @@ old/
|
||||
tmp/
|
||||
*_stringer.go
|
||||
mgmt
|
||||
mgmt.static
|
||||
rpmbuild/
|
||||
|
||||
Reference in New Issue
Block a user