Skip to content

Commit

Permalink
Make appending to FLAGS possible when invoking make.
Browse files Browse the repository at this point in the history
  • Loading branch information
dossy committed Nov 19, 2023
1 parent e2618f8 commit 3e846d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
export CGO_ENABLED = 1

# strip binaries
FLAGS := -tags sqlite_omit_load_extension,sqlite_json -ldflags '-s'
override FLAGS := -tags sqlite_omit_load_extension,sqlite_json -ldflags '-s' $(FLAGS)

# default output file
OUTPUT ?= dbmate
Expand All @@ -11,7 +11,7 @@ OUTPUT ?= dbmate
GOOS := $(shell go env GOOS)
ifeq ($(GOOS),linux)
# statically link binaries to support alpine linux
FLAGS := -tags netgo,osusergo,sqlite_omit_load_extension,sqlite_json -ldflags '-s -extldflags "-static"'
override FLAGS := -tags netgo,osusergo,sqlite_omit_load_extension,sqlite_json -ldflags '-s -extldflags "-static"' $(FLAGS)
endif
ifeq ($(GOOS),darwin)
export SDKROOT ?= $(shell xcrun --sdk macosx --show-sdk-path)
Expand Down

0 comments on commit 3e846d3

Please sign in to comment.