我想知道为什么这两个命令会返回两个不同的结果。第一个是:
[root@node30 par-run-d2]# make -C NQU/
make: Entering directory `/home/ut/gpgpu-sim/benchmarks/par-run-d2/NQU'
nvcc -c -arch sm_11 --keep --compiler-options -fno-strict-aliasing \
-I. -I/usr/local/cuda//include/ -I/home/ut/NVIDIA_GPU_Computing_SDK/C//common/inc/ \
-L/home/ut/NVIDIA_GPU_Computing_SDK/C//lib -lcutil -DUNIX nqueen.cu -o nqueen
nqueen.cu(681): warning: variable "start" was declared but never referenced
nqueen.cu(681): warning: variable "end" was declared but never referenced
nqueen.cu(681): warning: variable "start" was declared but never referenced
nqueen.cu(681): warning: variable "end" was declared but never referenced
gcc -g -c nqueen.cu.cpp -o nqueen.cu_o
echo ../../..
../../..
../../../scripts/gen_ptxinfo
Generating nqueen.ptxinfo...
make: *** [nqueen.cu_o] Error 255
make: Leaving directory `/home/ut/gpgpu-sim/benchmarks/par-run-d2/NQU'
第二个是:
[root@node30 par-run-d2]# cd NQU/
[root@node30 NQU]# make
g++ -g nqueen.cu_o -L../../../libcuda/ -lcuda \
-L/home/ut/NVIDIA_GPU_Computing_SDK/C//lib -lcutil \
-L../../../src/ -lgpgpusim \
-L../../../src/intersim -lintersim \
-L../../../src/cuda-sim/ -lgpgpu_ptx_sim \
-lm -lz -lGL -o gpgpu_ptx_sim__nqueen
rm -rf *.cpp*.i *.cpp*.ii *.cu.c *.cudafe*.* *.fatbin.c *.cu.cpp *.linkinfo *.cpp_o core *.cubin cubin.bin *_o *.hash nqueen
知道为什么 "make -C X" 与 "cd X/; make" 不同吗?