Changing the Makefile file

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')


  PROJECTS := $(shell find projects -name Makefile)


%.ph_build : lib/ lib/ lib/

	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"


	@make -C common


	@make -C common -f Makefile_paramgl


	@make -C common -f Makefile_rendercheckgl


	@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