Skip to content

Commit

Permalink
Simplify CGO flags setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ismaell committed Nov 21, 2020
1 parent 05a1a25 commit e16bf09
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@ else
BUILD_DATE ?= $(shell date "$(DATE_FMT)")
endif

ifndef CGO_CPPFLAGS
export CGO_CPPFLAGS := $(CPPFLAGS)
endif
ifndef CGO_CFLAGS
export CGO_CFLAGS := $(CFLAGS)
endif
ifndef CGO_LDFLAGS
export CGO_LDFLAGS := $(LDFLAGS)
endif
CGO_CPPFLAGS ?= ${CPPFLAGS}
export CGO_CPPFLAGS
CGO_CFLAGS ?= ${CFLAGS}
export CGO_CFLAGS
CGO_LDFLAGS ?= ${LDFLAGS}
export CGO_LDFLAGS

GO_LDFLAGS := -X github.com/cli/cli/internal/build.Version=$(GH_VERSION) $(GO_LDFLAGS)
GO_LDFLAGS := -X github.com/cli/cli/internal/build.Date=$(BUILD_DATE) $(GO_LDFLAGS)
Expand Down

0 comments on commit e16bf09

Please sign in to comment.