diff options
-rw-r--r-- | build/linux/configure.ac | 9 | ||||
-rw-r--r-- | python/conda/libastra/build.sh | 19 |
2 files changed, 13 insertions, 15 deletions
diff --git a/build/linux/configure.ac b/build/linux/configure.ac index 46c84a5..43cb1a8 100644 --- a/build/linux/configure.ac +++ b/build/linux/configure.ac @@ -102,14 +102,7 @@ if test x"$NVCC" != xno; then HAVECUDA=yes BACKUP_CUDA_LDFLAGS="$LDFLAGS" if test x"$with_cuda" != x -a x"$with_cuda" != xyes; then - case $host_cpu in - x86_64) - LDFLAGS_CUDA="-L$with_cuda/lib64" - ;; - *) - LDFLAGS_CUDA="-L$with_cuda/lib" - ;; - esac + test -d $with_cuda/lib64 && LDFLAGS_CUDA="-L$with_cuda/lib64" || LDFLAGS_CUDA="-L$with_cuda/lib" CPPFLAGS_CUDA="-I$with_cuda/include" LDFLAGS="$LDFLAGS $LDFLAGS_CUDA" fi diff --git a/python/conda/libastra/build.sh b/python/conda/libastra/build.sh index 36c3eba..50d2ae5 100644 --- a/python/conda/libastra/build.sh +++ b/python/conda/libastra/build.sh @@ -14,10 +14,15 @@ $SRC_DIR/build/linux/configure --with-install-type=prefix --with-cuda=$CUDA_ROOT make install-libraries -LIBPATH=lib -if [ $ARCH == 64 ] - then - LIBPATH+=64 -fi -cp -P $CUDA_ROOT/$LIBPATH/libcudart.so.* $CONDA_PREFIX/lib -cp -P $CUDA_ROOT/$LIBPATH/libcufft.so.* $CONDA_PREFIX/lib + +test -d $CUDA_ROOT/lib64 && LIBPATH="$CUDA_ROOT/lib64" || LIBPATH="$CUDA_ROOT/lib" + +case `uname` in + Darwin*) + cp -P $LIBPATH/libcudart.*.dylib $CONDA_PREFIX/lib + cp -P $LIBPATH/libcufft.*.dylib $CONDA_PREFIX/lib + *) + cp -P $LIBPATH/libcudart.so.* $CONDA_PREFIX/lib + cp -P $LIBPATH/libcufft.so.* $CONDA_PREFIX/lib + ;; +esac |