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