-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (23 loc) · 723 Bytes
/
Copy pathMakefile
File metadata and controls
30 lines (23 loc) · 723 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
27
28
29
30
# CUDA Compiler and Flags
NVCC = nvcc
CUDA_PATH = /usr/local/cuda
CFLAGS = -arch=sm_86 \ # GPU's compute capability
--use_fast_math \ # Fast math optimizations
-Xcompiler -fPIC \ # Position Independent Code
-O3 \ # Aggressive optimization
--compiler-options="-Wall"
# Source and Output
SRC = rtFusion.cu
LIB_NAME = librtFusion.so
OBJ = rtFusion.o
# Default compute capability
ARCH ?= sm_86
all: build
build: $(LIB_NAME)
$(LIB_NAME): $(SRC)
@echo "Compiling CUDA kernel with compute capability $(ARCH)..."
$(NVCC) $(CFLAGS) -arch=$(ARCH) -shared -o $@ $<
clean:
@echo "Cleaning build artifacts..."
rm -f $(LIB_NAME) $(OBJ)
.PHONY: all build clean