-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
26 lines (18 loc) · 823 Bytes
/
makefile
File metadata and controls
26 lines (18 loc) · 823 Bytes
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
26
ARFLAGS= -rcv
CUDA=/usr/local/cuda
NVCC=$(CUDA)/bin/nvcc
NVCCFLAGS= -std=c++11 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70
CUDAFLAGS= -L$(CUDA)/lib64 -I$(CUDA)/include -lcuda -lcudart
OBJECTS= src/bsdf.o src/bvh.o src/bxdf.o src/camera.o src/intersection.o src/io.o src/math.o src/microfacet.o src/onb_math.o src/path.o src/random.o src/ray.o src/render.o src/shape.o src/texture.o src/lodepng/lodepng.o
default: libbenpt.a
%.o: %.cu %.cuh
$(NVCC) -c $< -o $@ $(NVCCFLAGS) -dc
device.o: $(OBJECTS)
$(NVCC) -dlink $^ -o $@
libbenpt.a: $(OBJECTS) device.o
ar $(ARFLAGS) $@ $^
test: test.cpp libbenpt.a
g++ $^ -o $@ $(CUDAFLAGS) -std=c++17 -L. -lbenpt
.PHONY: clean
clean:
rm -f src/*.o *.o test libbenpt.a *.ppm