Makefile: tidy remaining LDFLAGS refs
This commit is contained in:
parent
c9d4347ff7
commit
ea811c98eb
16
Makefile
16
Makefile
|
@ -7,11 +7,11 @@ GO ?= $(shell command -v go)
|
|||
GOOS ?= $(shell go env GOOS)
|
||||
GOARCH ?= $(shell go env GOARCH)
|
||||
|
||||
SRC := $(shell find . -iname "*.go" -not -iname '*_test.go')
|
||||
TEST_SRC := $(shell find . -iname '*_test.go')
|
||||
CONFIGURE := $(BUILD)/.B.configure
|
||||
LDFLAGS := $(BUILD)/.B.ldflags
|
||||
BUILDINFO := git.st8l.com/luxolus/kdnotify/buildinfo
|
||||
SRC := $(shell find . -iname "*.go" -not -iname '*_test.go')
|
||||
TEST_SRC := $(shell find . -iname '*_test.go')
|
||||
CONFIGURE := $(BUILD)/.B.configure
|
||||
BUILDFLAGS := $(BUILD)/.B.buildflags
|
||||
BUILDINFO := git.st8l.com/luxolus/kdnotify/buildinfo
|
||||
|
||||
Version ?= $(shell git describe --tags --abbrev=0)
|
||||
Commit ?= $(shell git rev-parse HEAD)
|
||||
|
@ -85,11 +85,11 @@ $(BUILD)/$(PROJ): $(CONFIGURE) $(SRC)
|
|||
-buildmode=pie \
|
||||
-ldflags "-linkmode=external -extldflags=$$LDFLAGS $$BUILDFLAGS"
|
||||
|
||||
$(CONFIGURE): $(BUILD) $(LDFLAGS)
|
||||
$(CONFIGURE): $(BUILD) $(BUILDFLAGS)
|
||||
@cat $@ >$@
|
||||
@echo "BUILDFLAGS='$$(xargs <$(LDFLAGS))'" >>$@
|
||||
@echo "BUILDFLAGS='$$(xargs <$(BUILDFLAGS))'" >>$@
|
||||
|
||||
$(LDFLAGS): $(BUILD)
|
||||
$(BUILDFLAGS): $(BUILD)
|
||||
@cat $@ >$@
|
||||
@echo '-X $(BUILDINFO).Version=$(Version)' >>$@
|
||||
@echo '-X $(BUILDINFO).CommitHash=$(Commit)' >>$@
|
||||
|
|
Loading…
Reference in New Issue