build: add link flags -s and -w to build

pull/59/head
sammyette 2021-05-17 19:38:53 -04:00
parent f31c1296ae
commit aeac0ccce0
No known key found for this signature in database
GPG Key ID: 50EE40A2809851F5
1 changed files with 3 additions and 3 deletions

View File

@ -4,13 +4,13 @@ BINDIR ?= $(PREFIX)/bin
LIBDIR ?= $(PREFIX)/share/hilbish
build:
@go build
@go build -ldflags "-s -w"
dev:
@go build -ldflags "-X main.version=$(shell git describe --tags)"
@go build -ldflags "-s -w -X main.version=$(shell git describe --tags)"
hilbiline:
@go build -ldflags "-X main.version=$(shell git describe --tags)+hilbiline" -tags hilbiline
@go build -ldflags "-s -w -X main.version=$(shell git describe --tags)+hilbiline" -tags hilbiline
install:
@install -v -d "$(DESTDIR)$(BINDIR)/" && install -m 0755 -v hilbish "$(DESTDIR)$(BINDIR)/hilbish"