Now compatible with new library structure

main
Kenneth Jao 2 years ago
parent 2d4dbb27b3
commit 1e358f915c
  1. 0
      DEPENDENCIES
  2. 10
      Makefile
  3. 6
      Makefile.template
  4. 11
      SETUP
  5. 0
      include/Array.h
  6. 0
      include/BLAS.h
  7. 0
      include/Core.h
  8. 0
      include/Macros.h
  9. 0
      include/Types.h

@ -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
NVCC := nvcc
CFLAGS := -Wall -std=c++17 -fopenmp -MMD
NVCC_FLAGS := -MMD -w -Xcompiler
CFLAGS := -std=c++17 -MMD -Wall -fopenmp
NVCC_FLAGS := -std=c++17 -MMD -Xcudafe="--diag_suppress=20012" -Xcompiler -fopenmp
INCLUDE := <<Put extra include 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)
$(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)
$(NVCC) $(NVCC_FLAGS) -DCUDA -x cu --device-c -o $@ $< $(INC)

11
SETUP

@ -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…
Cancel
Save