diff options
author | yangg <yangg@google.com> | 2015-01-06 16:02:50 -0800 |
---|---|---|
committer | Nicolas Noble <nnoble@google.com> | 2015-01-06 17:52:04 -0800 |
commit | 102e4feb8eb58ffc4d1515b6c04ea3e5a89a15a9 (patch) | |
tree | d51a199d7f8db023ab13cced57bb6a0415c59957 /templates/Makefile.template | |
parent | 8cfebb91caf2cb3c785fac403840b4443bc8e741 (diff) |
Use CONFIG after defining it. Define CONFIG before using it.
Change on 2015/01/06 by yangg <yangg@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83383325
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)) |