diff --git a/src/Makefile b/src/Makefile
index 3c94c5370bc7cc3a064e8a260a2d577a994d537e..d9735ff1b94ec24047ce1c1b610ee01583f58800 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -31,22 +31,32 @@ CC_FLAGS += -DVERSION="\"$(VERSION)\"" -DSIGNAL
 
 
 CC_FLAGS += -I$(CUDA_PATH)/include
-CC_FLAGS += -Wall -Wno-write-strings -std=c++14 -pedantic# TODO: test on Mac OSX and other architectures
+CC_FLAGS += -Wall -Wno-write-strings -pedantic# TODO: test on Mac OSX and other architectures
 ifeq ($(dbg),1)
 NV_FLAGS += -lineinfo
 else
 NV_FLAGS += -lineinfo
 endif
 
+CUDA_VERSION_GT10 = $(shell expr `nvcc -V | tr 'V' ' ' | tr ' ' '\n' | tail -n1 | cut -f1 -d.` \> 10)
+ifeq "$(CUDA_VERSION_GT10)" "1"
+  CSTD:=c++14
+else
+  CSTD:=c++11
+endif
+NV_FLAGS := $(NV_FLAGS) -std=$(CSTD)
+
 ifneq ($(DARWIN),)
-    LIBRARY = $(CUDA_PATH)/lib
+  LIBRARY = $(CUDA_PATH)/lib
 else
-    LIBRARY = $(CUDA_PATH)/lib64
+  LIBRARY = $(CUDA_PATH)/lib64
+  ifeq "$(CSTD)" "c++11"
+    CSTD := c++1y
+  endif
 endif
+CC_FLAGS += -std=$(CSTD)
 # NV_FLAGS += -ftz=true			# TODO: test if this preserves accurate simulation
 
-$(info $(NVCC))
-
 ## Find valid compute capabilities for this machine
 SMS ?= 30 35 37 50 52 60 61
 $(info Testing CUDA toolkit with compute capabilities SMS='$(SMS)')