diff options
| author | Tim Rogers <[email protected]> | 2012-07-28 20:17:58 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:48:53 -0700 |
| commit | 01e9787999e8d74ac3e9a5e1988ef5275d0713ee (patch) | |
| tree | b5a570dd3c160d80d36d2a0af01d2895659bec98 /Makefile | |
| parent | 135135ef41f5628c146d35dd24eeac2c71efeae3 (diff) | |
Putting GPGPU-sim into nvcc version specific build and lib folders.
Also changing the cuobjdump_to_ptxplus build to into the build directory instead of inline with the src
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 13567]
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -37,12 +37,16 @@ else export DEBUG=0 endif -ifeq ($(DEBUG), 1) - export SIM_LIB_DIR=lib/debug - export SIM_OBJ_FILES_DIR=build/debug -else - export SIM_LIB_DIR=lib/release - export SIM_OBJ_FILES_DIR=build/release +NVCC_PATH=$(shellwhich nvcc) +ifneq ($(shell which nvcc), "") + CUDA_VERSION=$(shell nvcc --version | grep release | sed -re 's/.*release ([0-9]+\.[0-9]+).*/\1/') + ifeq ($(DEBUG), 1) + export SIM_LIB_DIR=lib/$(CUDA_VERSION)/debug + export SIM_OBJ_FILES_DIR=build/$(CUDA_VERSION)/debug + else + export SIM_LIB_DIR=lib/$(CUDA_VERSION)/release + export SIM_OBJ_FILES_DIR=build/$(CUDA_VERSION)/release + endif endif LIBS = cuda-sim gpgpu-sim_uarch intersim gpgpusimlib @@ -160,6 +164,7 @@ makedirs: if [ ! -d $(SIM_OBJ_FILES_DIR)/gpgpu-sim ]; then mkdir -p $(SIM_OBJ_FILES_DIR)/gpgpu-sim; fi; if [ ! -d $(SIM_OBJ_FILES_DIR)/libopencl ]; then mkdir -p $(SIM_OBJ_FILES_DIR)/libopencl; fi; if [ ! -d $(SIM_OBJ_FILES_DIR)/intersim ]; then mkdir -p $(SIM_OBJ_FILES_DIR)/intersim; fi; + if [ ! -d $(SIM_OBJ_FILES_DIR)/cuobjdump_to_ptxplus ]; then mkdir -p $(SIM_OBJ_FILES_DIR)/cuobjdump_to_ptxplus; fi; all: $(MAKE) gpgpusim |
