Hello everyone.
I’m a beginner in CUDA, and I’m having some problems trying to link cutil_inline.h in my files and compiling them using the terminal. In CUDA examples I saw a makefile file that links it. I wanna know how to modify it to compile the files in a specific folder(or if there’s another way to link cutil_inline.h without it).
Here’s the Makefile I found
# CUDA SDK 10 Linux Version 2.20.0410.1615
ifeq ($(emu), 1)
PROJECTS := $(shell find projects -name Makefile | xargs grep -L 'USEDRVAPI')
else
PROJECTS := $(shell find projects -name Makefile)
endif
%.ph_build : lib/libcutil.so lib/libparamgl.so lib/librendercheckgl.so
make -C $(dir $*) $(MAKECMDGOALS)
%.ph_clean :
make -C $(dir $*) clean $(USE_DEVICE)
%.ph_clobber :
make -C $(dir $*) clobber $(USE_DEVICE)
all: $(addsuffix .ph_build,$(PROJECTS))
@echo "Finished building all"
lib/libcutil.so:
@make -C common
lib/libparamgl.so:
@make -C common -f Makefile_paramgl
lib/librendercheckgl.so:
@make -C common -f Makefile_rendercheckgl
tidy:
@find * | egrep "#" | xargs rm -f
@find * | egrep "\~" | xargs rm -f
clean: tidy $(addsuffix .ph_clean,$(PROJECTS))
@make -C common clean
clobber: clean $(addsuffix .ph_clobber,$(PROJECTS))
@make -C common clobber