From 796b2d980fb66bd098bb7ad79125242720934232 Mon Sep 17 00:00:00 2001 From: orignal Date: Tue, 23 Sep 2014 19:56:29 -0400 Subject: [PATCH] std option for different versions of gcc (by hagen) --- Makefile.linux | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile.linux b/Makefile.linux index 7a2a7ee8..77bb2c60 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -1,16 +1,18 @@ CC = g++ CFLAGS = -g -Wall CXXVER := $(shell ${CC} -dumpversion) -ifeq ($(shell expr match ${CXXVER} "4\.[0-5]"),3) - $(error Compiler too old) -endif -ifeq (${CXXVER},"4.9") - CFLAGS += -std=c++11 -else - CFLAGS += -std=c++0x +ifeq ($(shell expr match ${CXXVER} "4\.[0-9][0-9]"),4) # >= 4.10 +CFLAGS += -std=c++11 +else ifeq ($(shell expr match ${CXXVER} "4\.[7-9]"),3) # >= 4.7 +CFLAGS += -std=c++11 +else ifeq ($(shell expr match ${CXXVER} "4\.6"),3) # = 4.6 +CFLAGS += -std=c++0x +else # not supported +$(error Compiler too old) endif + include filelist.mk INCFLAGS = LDFLAGS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread