This commit is contained in:
2025-03-14 19:55:09 +05:00
parent 41f4f94a8d
commit 553c28c995
7 changed files with 106 additions and 216 deletions

View File

@@ -1,9 +1,9 @@
NVCC := nvcc
NVCC_FLAGS := -O3 -use_fast_math -Xptxas -O3 -gencode arch=compute_75,code=sm_75 \
--default-stream per-thread -Wno-deprecated-gpu-targets --expt-relaxed-constexpr -I../libs/
MAIN_SOURCE := ../sources/main.cu
MAIN_SOURCE := ../sources/main.cu
LIBS_DIR := ../libs/
BUILD_DIR := ../build/
BUILD_DIR := ../build
LIBS_SOURCES := $(wildcard $(LIBS_DIR)*.cu)
LIBS_OBJECTS := $(patsubst $(LIBS_DIR)%.cu,$(BUILD_DIR)/%.o,$(LIBS_SOURCES))
TARGET := main
@@ -14,5 +14,5 @@ $(TARGET): $(MAIN_SOURCE) $(LIBS_OBJECTS)
$(NVCC) $(NVCC_FLAGS) -o $(TARGET) $(MAIN_SOURCE) $(LIBS_OBJECTS)
$(BUILD_DIR)/%.o: $(LIBS_DIR)%.cu | $(BUILD_DIR)
$(NVCC) $(NVCC_FLAGS) -c $< -o $@
#clean:
# rm -f $(BUILD_DIR)/*.o
clean:
rm $(BUILD_DIR)/main