summaryrefslogtreecommitdiff
path: root/src/makefile
blob: eb8e91b07ad5d2ee04fc29d265047be00de2845f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
LIBS = -lraylib -lGL -lm -lpthread -ldl -lrt -lX11
$CC = gcc
INC = -I /opt/cuda/include
COMPILED_BIN = build/indigo_worlds

CU_SRCFILES := $(wildcard *.cu)
CU_OBJFILES := $(patsubst %.cu, %.o, $(CU_SRCFILES))

all: $(CU_OBJFILES)
	nvcc $(LIBS) -g -G -o build/indigo_worlds build/*.o

%.o: %.cu
	nvcc -g -G -dc -c $< -o build/$@

run: all
	build/indigo_worlds

clean:
	rm -rf build/*


#make:
#	nvcc $(LIBS) $(INC) -O0 --debug -c main.cu -o build/main.o
#	nvcc --device-debug --compile kernel.cu -o build/kernel.o
#	nvcc $(LIBS) -O0 -o build/indigo_worlds build/main.o build/kernel.o