Browse Source

std option for different versions of gcc (by hagen)

pull/102/head
orignal 10 years ago
parent
commit
796b2d980f
  1. 16
      Makefile.linux

16
Makefile.linux

@ -1,16 +1,18 @@
CC = g++ CC = g++
CFLAGS = -g -Wall CFLAGS = -g -Wall
CXXVER := $(shell ${CC} -dumpversion) CXXVER := $(shell ${CC} -dumpversion)
ifeq ($(shell expr match ${CXXVER} "4\.[0-5]"),3)
$(error Compiler too old)
endif
ifeq (${CXXVER},"4.9") ifeq ($(shell expr match ${CXXVER} "4\.[0-9][0-9]"),4) # >= 4.10
CFLAGS += -std=c++11 CFLAGS += -std=c++11
else else ifeq ($(shell expr match ${CXXVER} "4\.[7-9]"),3) # >= 4.7
CFLAGS += -std=c++0x 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 endif
include filelist.mk include filelist.mk
INCFLAGS = INCFLAGS =
LDFLAGS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread LDFLAGS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread

Loading…
Cancel
Save