diff --git a/src/cuckatoo/Makefile b/src/cuckatoo/Makefile
index 95fa5c272bc047488d7e4402509d01af3cb2a156..7d47dc979eed5c38b2e028e880e502af9619f8ff 100644
--- a/src/cuckatoo/Makefile
+++ b/src/cuckatoo/Makefile
@@ -12,6 +12,7 @@ GPP ?= g++ $(GPP_ARCH_FLAGS) -std=c++11 $(FLAGS)
 CFLAGS ?= -Wall -Wno-format -fomit-frame-pointer $(OPT)
 GCC ?= gcc $(GCC_ARCH_FLAGS) -std=gnu11 $(CFLAGS)
 BLAKE_2B_SRC ?= ../crypto/blake2b-ref.c
+NVCC ?= nvcc -std=c++11 
 
 all : simpletest leantest
 
@@ -64,19 +65,19 @@ mean30x1:	cuckatoo.h  bitmap.hpp graph.hpp ../threads/barrier.hpp ../crypto/siph
 	$(GPP) -o $@ -DNSIPHASH=1 -DEXPANDROUND=10 -DCOMPRESSROUND=22 -DEDGEBITS=30 mean.cpp $(BLAKE_2B_SRC)
 
 lcuda19:	../crypto/siphash.cuh lean.cu Makefile
-	nvcc -o $@ -DEDGEBITS=19 -arch sm_35 lean.cu $(BLAKE_2B_SRC)
+	$(NVCC) -o $@ -DEDGEBITS=19 -arch sm_35 lean.cu $(BLAKE_2B_SRC)
 
 lcuda29:	../crypto/siphash.cuh lean.cu Makefile
-	nvcc -o $@ -DEDGEBITS=29 -arch sm_35 lean.cu $(BLAKE_2B_SRC)
+	$(NVCC) -o $@ -DEDGEBITS=29 -arch sm_35 lean.cu $(BLAKE_2B_SRC)
 
 lcuda30:	../crypto/siphash.cuh lean.cu Makefile
-	nvcc -o $@ -DEDGEBITS=30 -arch sm_35 lean.cu $(BLAKE_2B_SRC)
+	$(NVCC) -o $@ -DEDGEBITS=30 -arch sm_35 lean.cu $(BLAKE_2B_SRC)
 
 lcuda32:	../crypto/siphash.cuh lean.cu Makefile
-	nvcc -o $@ -DEDGEBITS=32 -arch sm_35 lean.cu $(BLAKE_2B_SRC)
+	$(NVCC) -o $@ -DEDGEBITS=32 -arch sm_35 lean.cu $(BLAKE_2B_SRC)
 
 cuda19:		../crypto/siphash.cuh mean.cu Makefile
-	nvcc -o $@ -DEPS_A=4 -DEPS_B=3 -DIDXSHIFT=6 -DEDGEBITS=19 -arch sm_35 mean.cu $(BLAKE_2B_SRC)
+	$(NVCC) -o $@ -DEPS_A=4 -DEPS_B=3 -DIDXSHIFT=6 -DEDGEBITS=19 -arch sm_35 mean.cu $(BLAKE_2B_SRC)
 
 cuda29:		../crypto/siphash.cuh mean.cu Makefile
-	nvcc -o $@ -DEDGEBITS=29 -arch sm_35 mean.cu $(BLAKE_2B_SRC)
+	$(NVCC) -o $@ -DEDGEBITS=29 -arch sm_35 mean.cu $(BLAKE_2B_SRC)
diff --git a/src/cuckoo/Makefile b/src/cuckoo/Makefile
index 37b8e2dba9af7cd73cf426932d233449975a5803..bb9069fcdcccecc2e5002d6d91e58cf6b642350c 100644
--- a/src/cuckoo/Makefile
+++ b/src/cuckoo/Makefile
@@ -12,6 +12,7 @@ GPP ?= g++ $(GPP_ARCH_FLAGS) -std=c++11 $(FLAGS)
 CFLAGS ?= -Wall -Wno-format -fomit-frame-pointer $(OPT)
 GCC ?= gcc $(GCC_ARCH_FLAGS) -std=gnu11 $(CFLAGS)
 BLAKE_2B_SRC ?= ../crypto/blake2b-ref.c
+NVCC ?= nvcc -std=c++11 
 
 all : simpletest leantest
 
@@ -55,7 +56,7 @@ mean29x1:	cuckoo.h ../crypto/siphash.h mean.hpp mean.cpp Makefile
 	$(GPP) -o $@ -DNSIPHASH=1 -DEDGEBITS=29 mean.cpp $(BLAKE_2B_SRC)
 
 lcuda29:	../crypto/siphash.cuh lean.cu Makefile
-	nvcc -o $@ -DEDGEBITS=29 -arch sm_35 lean.cu $(BLAKE_2B_SRC)
+	$(NVCC) -o $@ -DEDGEBITS=29 -arch sm_35 lean.cu $(BLAKE_2B_SRC)
 
 cuda29:		../crypto/siphash.cuh mean.cu Makefile
-	nvcc -o $@ -DEDGEBITS=29 -arch sm_35 mean.cu $(BLAKE_2B_SRC)
+	$(NVCC) -o $@ -DEDGEBITS=29 -arch sm_35 mean.cu $(BLAKE_2B_SRC)