On Sunday 2023-03-26 14:33, Labeeb Asari wrote:
>
>Basically : compile .c source files with gcc, .cu files with nvcc and
>finally link them together with gcc.
>
>I've tried adding a rule to handle .cu files differently and it does create
>object files for it separately. However while linking, libtool does not
>include these object files!
I have good success with
```
libsomething_la_SOURCES = cpart.cpp
libsomething_la_LDADD = xx.o
.cu.o:
# fake compiler command for my case
g++ -x c++ -c -o $@ $<
```
The only downside is a naggy warning about non-portable use of .o files.
I could live with that..
Getting an .lo file out of it is more complicated (I got an xx.lo but
no .libs/xx.o, which is rather odd.)