Make the static flag overridable (#1210)

This commit is contained in:
j-k 2022-03-02 04:44:51 +00:00 committed by GitHub
parent 0fe8d4d586
commit 78313a239a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -18,12 +18,15 @@ CXXFLAGS += -std=c++11
LDFLAGS += -L/usr/local/lib -lprotoc -lprotobuf -lpthread -ldl
PREFIX ?= /usr/local
MIN_MACOS_VERSION := 10.7 # Supports OS X Lion
STATIC ?= yes
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
CXXFLAGS += -stdlib=libc++ -mmacosx-version-min=$(MIN_MACOS_VERSION)
else ifeq ($(UNAME_S),Linux)
LDFLAGS += -static
ifeq ($(STATIC),yes)
LDFLAGS += -static
endif
endif
all: protoc-gen-grpc-web