diff options
Diffstat (limited to 'templates/Makefile.template')
-rw-r--r-- | templates/Makefile.template | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/templates/Makefile.template b/templates/Makefile.template index 470ac0c235..bdb9765114 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -65,16 +65,13 @@ CPPFLAGS_msan = -O1 -fsanitize=memory -fno-omit-frame-pointer LDFLAGS_msan = -fsanitize=memory DEFINES_msan = NDEBUG -ifndef VALID_CONFIG_$(CONFIG) -$(error Invalid CONFIG value '$(CONFIG)') -endif - # General settings. # You may want to change these depending on your system. prefix ?= /usr/local PROTOC = protoc +CONFIG ?= opt CC = $(CC_$(CONFIG)) CXX = $(CXX_$(CONFIG)) LD = $(LD_$(CONFIG)) @@ -84,13 +81,15 @@ STRIP = strip --strip-unneeded INSTALL = install -D RM = rm -f +ifndef VALID_CONFIG_$(CONFIG) +$(error Invalid CONFIG value '$(CONFIG)') +endif + HOST_CC = $(CC) HOST_CXX = $(CXX) HOST_LD = $(LD) HOST_LDXX = $(LDXX) -CONFIG ?= opt - CPPFLAGS += $(CPPFLAGS_$(CONFIG)) DEFINES += $(DEFINES_$(CONFIG)) LDFLAGS += $(LDFLAGS_$(CONFIG)) |