summaryrefslogtreecommitdiff
path: root/libcuda/Makefile
diff options
context:
space:
mode:
authorTor Aamodt <[email protected]>2010-10-03 21:07:58 -0800
committerTor Aamodt <[email protected]>2010-10-03 21:07:58 -0800
commitcd88d9b8dad58a40f0d5680e8386190472e607a3 (patch)
treefb00ee1942c671313840143f07d283542df7aaa7 /libcuda/Makefile
parentdda377ce2854d0e65f7f6531f6eb6b398bbbf888 (diff)
moving some CUDA API centric code to cuda_runtime_api.cc
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7811]
Diffstat (limited to 'libcuda/Makefile')
-rw-r--r--libcuda/Makefile14
1 files changed, 10 insertions, 4 deletions
diff --git a/libcuda/Makefile b/libcuda/Makefile
index e82a0e3..bdb48f4 100644
--- a/libcuda/Makefile
+++ b/libcuda/Makefile
@@ -66,19 +66,25 @@ ifeq ($(OPENGL_SUPPORT),1)
GL = -DOPENGL_SUPPORT
endif
+GNUC_CPP0X := $(shell gcc --version | perl -ne 'if (/gcc\s+\(.*\)\s+([0-9.]+)/){ if($$1 >= 4.3) {$$n=1} else {$$n=0;} } END { print $$n; }')
+ifeq ($(GNUC_CPP0X), 1)
+ CXXFLAGS = -std=c++0x
+endif
+
+
CPP = g++ $(SNOW)
CC = gcc &(SNOW)
CREATELIBRARY = 1
DEBUG ?= 0
-CCFLAGS = -O3 -g -Wall -fPIC $(GL)
+CXXFLAGS += -O3 -g -Wall -fPIC $(GL)
ifeq ($(DEBUG),1)
- CCFLAGS = -Wall -g -fPIC $(GL)
+ CXXFLAGS += -Wall -g -fPIC $(GL)
endif
PROG =cuda
CXX_SRCS = cuda_runtime_api.cc
-CCFLAGS += -DCUDART_VERSION=$(CUDART_VERSION)
+CXXFLAGS += -DCUDART_VERSION=$(CUDART_VERSION)
.PHONY: clean
@@ -90,7 +96,7 @@ lib$(PROG).a: $(OBJS)
ar rcs lib$(PROG).a $(OBJS)
%.o: %.cc
- $(CPP) $(CCFLAGS) -I./ -I$(CUDAHOME)/include -c $< -o $@
+ $(CPP) $(CXXFLAGS) -I./ -I$(CUDAHOME)/include -c $< -o $@
clean:
rm -f $(PROG)