/
Makefile
41 lines (30 loc) · 908 Bytes
/
Makefile
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#############################################################################
#
# Makefile
#
# libcur3d.a
#
#############################################################################
######## User options #########
# Use single-precision computations (not recommended)
OPT += -DSINGLE_PRECISION
# Use an octree to efficiently search enclosed regions
# For most use cases, this gives negligible improvement
#OPT += -DUSE_TREE
# Turn off clipping in voxelization routines
#OPT += -DNO_CLIPPING
# Turn off reduction in voxelization routines
#OPT += -DNO_REDUCTION
###############################
CC = /opt/cuda-6.0/bin/nvcc
CFLAGS = -I. -O3 -arch sm_20 --ptxas-options=-v --compiler-options -Wall
SRC = cur3d.cu
DEPS = cur3d.h Makefile
OBJ = $(SRC:.cu=.o)
all: libcur3d.a
libcur3d.a: $(OBJ)
ar -rs $@ $^
%.o: %.cu $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS) $(OPT)
clean:
rm -rf libcur3d.a $(OBJ)