Skip to content

Commit

Permalink
Merge pull request #1588 from ExtremeFLOW/fix/out-of-src
Browse files Browse the repository at this point in the history
Fix out of source build with libtool and CUDA
  • Loading branch information
njansson authored Nov 6, 2024
2 parents bb490fe + 6903666 commit c3617db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ CLEANFILES = *.mod\
*.smod

if ENABLE_CUDA
CLEANFILES += @top_srcdir@/libtool_cuda
CLEANFILES += @top_builddir@/libtool_cuda
endif

if ENABLE_OPENCL
Expand Down Expand Up @@ -664,11 +664,11 @@ include .depends_device
include .depends_turboneko

# CUDA Build rules
.cu.lo: @top_srcdir@/libtool_cuda
$(SHELL) @top_srcdir@/libtool_cuda --tag=CC --mode=compile $(NVCC) @CUDA_ARCH@ @CUDA_CFLAGS@ -I@top_builddir@/src -I@top_srcdir@/src -o $@ -c $<
.cu.lo: @top_builddir@/libtool_cuda
$(SHELL) @top_builddir@/libtool_cuda --tag=CC --mode=compile $(NVCC) @CUDA_ARCH@ @CUDA_CFLAGS@ -I@top_builddir@/src -I@top_srcdir@/src -o $@ -c $<

libtool_cuda:
$(SED) 's/pic_flag=.*/pic_flag="-Xcompiler -fPIC"/g' @top_srcdir@/libtool > @top_srcdir@/libtool_cuda
$(SED) 's/pic_flag=.*/pic_flag="-Xcompiler -fPIC"/g' @top_builddir@/libtool > @top_builddir@/libtool_cuda

# HIP Build rules
.hip.lo:
Expand Down

0 comments on commit c3617db

Please sign in to comment.