Skip to content
Myr

Use build tags to enable static linking

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 5a60aa5 · Browse files · 2 files+5 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+5 added−6 removed

  • other:+5 added−6 removed

2 files+5 added−6 removed

modified:src/curses/curses.go+2 added-3 removed
1 unmodified line
23/*4#include <ncurses.h>5#include <locale.h>6#cgo darwin LDFLAGS: -lncurses7#cgo linux,386 LDFLAGS: -lncurses8#cgo linux,amd64 LDFLAGS: -l:libncurses.a -l:libtinfo.a -l:libgpm.a -ldl6#cgo !static LDFLAGS: -lncurses7#cgo static LDFLAGS: -l:libncurses.a -l:libtinfo.a -l:libgpm.a -ldl8*/9import "C"1011import (
546 unmodified lines
modified:src/Makefile+3 added-3 removed
42 unmodified lines
43clean:44 cd fzf && rm -f fzf-*4546fzf/$(BINARY32): $(SOURCES)47 cd fzf && GOARCH=386 CGO_ENABLED=1 go build -o $(BINARY32)47 cd fzf && GOARCH=386 CGO_ENABLED=1 go build -a -o $(BINARY32)4849fzf/$(BINARY64): $(SOURCES)50 cd fzf && go build $(LDFLAGS) -o $(BINARY64)50 cd fzf && go build -a -tags "$(TAGS)" -o $(BINARY64)5152$(BINDIR)/fzf: fzf/$(BINARY64) | $(BINDIR)53 cp -f fzf/$(BINARY64) $(BINDIR)54 cd $(BINDIR) && ln -sf $(BINARY64) fzf
23 unmodified lines
78 sh -c 'cd /go/src/github.com/junegunn/fzf/src; /bin/bash'7980linux: docker-centos81 docker run -i -t -v $(GOPATH):/go junegunn/centos-sandbox \82 /bin/bash -ci 'cd /go/src/github.com/junegunn/fzf/src; make'82 /bin/bash -ci 'cd /go/src/github.com/junegunn/fzf/src; make TAGS=static'8384.PHONY: all build release test install uninstall clean docker \85 linux arch ubuntu centos docker-arch docker-ubuntu docker-centos