use standard make variables

This commit is contained in:
Kill Your TV 2014-10-29 21:54:47 +00:00
parent 524b2e9f8a
commit 5acbc6a23e
6 changed files with 15 additions and 19 deletions

View file

@ -1,16 +1,15 @@
CC = g++
CFLAGS = -g -Wall
CXXVER := $(shell ${CC} -dumpversion)
CXXFLAGS = -g -Wall
CXXVER := $(shell $(CXX) -dumpversion)
FGREP = fgrep
IS_64 := $(shell $(CXX) -dumpmachine 2>&1 | $(FGREP) -c "64")
ifeq ($(shell expr match ${CXXVER} "4\.[0-9][0-9]"),4) # >= 4.10
CFLAGS += -std=c++11
CXXFLAGS += -std=c++11
else ifeq ($(shell expr match ${CXXVER} "4\.[7-9]"),3) # >= 4.7
CFLAGS += -std=c++11
CXXFLAGS += -std=c++11
else ifeq ($(shell expr match ${CXXVER} "4\.6"),3) # = 4.6
CFLAGS += -std=c++0x
CXXFLAGS += -std=c++0x
else # not supported
$(error Compiler too old)
endif