From 8a7798388b2e7d6b7c162f3f5ac46612d7108b75 Mon Sep 17 00:00:00 2001 From: "Andrew M. B. Boktor" Date: Wed, 9 Nov 2011 15:43:50 -0800 Subject: Fixed build fail when there is no opencl Now, you have to define both NVOPENCL_LIBDIR and NVOPENCL_INCDIR in the setupd_environment script to build with opencl. If any of them is not setup, gpgpu-sim will build will output a warning and built without opencl support. [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 10873] --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index eed9f8f..8e248fe 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,12 @@ ifeq ($(shell uname),Linux) else TARGETS += $(SIM_LIB_DIR)/libcudart.dylib endif -ifneq ($(NVOPENCL_LIBDIR),) + +ifeq ($(NVOPENCL_LIBDIR),) + TARGETS += no_opencl_support +else ifeq ($(NVOPENCL_INCDIR),) + TARGETS += no_opencl_support +else TARGETS += $(SIM_LIB_DIR)/libOpenCL.so endif TARGETS += decuda_to_ptxplus/decuda_to_ptxplus @@ -60,6 +65,9 @@ endif gpgpusim: makedirs $(TARGETS) +no_opencl_support: + @echo "Warning: gpgpu-sim is building without opencl support. Make sure NVOPENCL_LIBDIR and NVOPENCL_INCDIR are set" + $(SIM_LIB_DIR)/libcudart.so: $(LIBS) cudalib g++ $(SNOW) -shared -Wl,-soname,libcudart.so \ $(SIM_OBJ_FILES_DIR)/libcuda/*.o \ -- cgit v1.3