Now compatible with new library structure
This commit is contained in:
parent
443929521d
commit
c7ee614324
0
DEPENDENCIES
Normal file
0
DEPENDENCIES
Normal file
10
Makefile
Normal file
10
Makefile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
.PHONY: all
|
||||||
|
|
||||||
|
all: install
|
||||||
|
|
||||||
|
install:
|
||||||
|
install -d $(DEST_DIR)/
|
||||||
|
install -d $(DEST_DIR)/include/
|
||||||
|
for file in include/*; do \
|
||||||
|
install -m 644 $$file $(DEST_DIR)/include/; \
|
||||||
|
done
|
||||||
@ -1,7 +1,7 @@
|
|||||||
CC := g++-10
|
CC := g++-10
|
||||||
NVCC := nvcc
|
NVCC := nvcc
|
||||||
CFLAGS := -Wall -std=c++17 -fopenmp -MMD
|
CFLAGS := -std=c++17 -MMD -Wall -fopenmp
|
||||||
NVCC_FLAGS := -MMD -w -Xcompiler
|
NVCC_FLAGS := -std=c++17 -MMD -Xcudafe="--diag_suppress=20012" -Xcompiler -fopenmp
|
||||||
|
|
||||||
INCLUDE := <<Put extra include directories here, separated by a space>>
|
INCLUDE := <<Put extra include directories here, separated by a space>>
|
||||||
LIBS_DIR := <<Put library directories here, separated by a space>>
|
LIBS_DIR := <<Put library directories here, separated by a space>>
|
||||||
@ -74,7 +74,7 @@ $(TARGET)GPU: $(GPU_BUILD_DIR)/link.o $(GPU_GCC_OBJ) | $(GPU_BUILD_DIR)
|
|||||||
$(CC) -g -DCUDA $(CFLAGS) $(GPU_NVCC_OBJ) $^ -o $@ $(INC) $(LIB) $(LIB_GPU) $(LD) $(LD_GPU)
|
$(CC) -g -DCUDA $(CFLAGS) $(GPU_NVCC_OBJ) $^ -o $@ $(INC) $(LIB) $(LIB_GPU) $(LD) $(LD_GPU)
|
||||||
|
|
||||||
$(GPU_BUILD_DIR)/link.o: $(GPU_NVCC_OBJ) | $(GPU_BUILD_DIR)
|
$(GPU_BUILD_DIR)/link.o: $(GPU_NVCC_OBJ) | $(GPU_BUILD_DIR)
|
||||||
$(NVCC) --device-link $^ -o $@
|
$(NVCC) --device-link -lgomp $^ -o $@
|
||||||
|
|
||||||
$(GPU_BUILD_DIR)/%.cu.o: $(SRC_DIR)/%.cu.cpp | $(GPU_BUILD_DIR)
|
$(GPU_BUILD_DIR)/%.cu.o: $(SRC_DIR)/%.cu.cpp | $(GPU_BUILD_DIR)
|
||||||
$(NVCC) $(NVCC_FLAGS) -DCUDA -x cu --device-c -o $@ $< $(INC)
|
$(NVCC) $(NVCC_FLAGS) -DCUDA -x cu --device-c -o $@ $< $(INC)
|
||||||
|
|||||||
11
SETUP
Executable file
11
SETUP
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ -z "$1" ]
|
||||||
|
then
|
||||||
|
printf "Usage: setup.sh install_directory [dependencies].\n" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $(dirname $0)
|
||||||
|
libname=$(basename $(pwd))
|
||||||
|
make DEST_DIR="$1" install
|
||||||
Loading…
x
Reference in New Issue
Block a user