diff options
| author | Andrew M. B. Boktor <[email protected]> | 2011-11-09 15:43:50 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:18:24 -0700 |
| commit | 8a7798388b2e7d6b7c162f3f5ac46612d7108b75 (patch) | |
| tree | 059dfdd6ef88b151fe72ae949cdbfce1f3c42367 /Makefile | |
| parent | 80483f2768a15ed1d8df6a11c60c75882e7622bd (diff) | |
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]
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 \ |
