diff --git a/makefile b/makefile index c3c2381..19bf4d2 100644 --- a/makefile +++ b/makefile @@ -32,7 +32,7 @@ OPENCL_DIR = $(CUDA_DIR) # RTX 4070 -------------- sm_89 # -CUDA_ARCH = sm_75 +CUDA_ARCH = sm_86 # @@ -42,7 +42,8 @@ CUDA_ARCH = sm_75 clean: rm -f sha1_tests rm -f sha1_cuda_test sha1_cuda_kernel.cubin - rm -f coin_miner_cpu coin_miner_simd coin_miner_cuda + rm -f coin_miner_cpu coin_miner_simd coin_miner_cuda coin_miner_cuda_kernel.cubin + rm -f benchmark rm -f a.out @@ -64,15 +65,30 @@ sha1_cuda_test: aad_sha1_cuda_test.c sha1_cuda_kernel.cubin aad_sha1.h aad_data_ sha1_cuda_kernel.cubin: aad_sha1_cuda_kernel.cu aad_sha1.h makefile nvcc -arch=$(CUDA_ARCH) --compiler-options -O2,-Wall -I$(CUDA_DIR)/include --cubin $< -o $@ +all: sha1_tests sha1_cuda_test sha1_cuda_kernel.cubin + + # # DETI coin miners # -coin_miner_cpu: aad_coin_miner_cpu.c aad_data_types.h aad_utilities.h aad_sha1.h aad_sha1_cpu.h aad_vault.h makefile +coin_miner_cpu: aad_coin_miner_cpu.c aad_sha1.h aad_sha1_cpu.h aad_data_types.h aad_utilities.h aad_vault.h makefile cc -march=native -Wall -Wshadow -Werror -O3 $< -o $@ -coin_miner_simd: aad_coin_miner_simd.c aad_data_types.h aad_utilities.h aad_sha1.h aad_sha1_cpu.h aad_vault.h makefile - cc -march=native -mavx2 -Wall -Wshadow -Werror -O3 $< -o $@ +coin_miner_simd: aad_coin_miner_simd.c aad_sha1.h aad_sha1_cpu.h aad_data_types.h aad_utilities.h aad_vault.h makefile + cc -march=native -Wall -Wshadow -Werror -O3 $< -o $@ +coin_miner_cuda_kernel.cubin: aad_coin_miner_cuda_kernel.cu aad_sha1.h makefile + nvcc -arch=$(CUDA_ARCH) --compiler-options -O2,-Wall -I$(CUDA_DIR)/include --cubin $< -o $@ -all: sha1_tests sha1_cuda_test sha1_cuda_kernel.cubin coin_miner_cpu coin_miner_simd +coin_miner_cuda: aad_coin_miner_cuda.c coin_miner_cuda_kernel.cubin aad_sha1.h aad_sha1_cpu.h aad_data_types.h aad_utilities.h aad_vault.h aad_cuda_utilities.h makefile + cc -march=native -Wall -Wshadow -Werror -O3 -I$(CUDA_DIR)/include $< -o $@ -lcuda + +benchmark: aad_benchmark.c aad_sha1.h aad_sha1_cpu.h aad_data_types.h aad_utilities.h makefile + cc -march=native -Wall -Wshadow -Werror -O3 $< -o $@ + +miners: coin_miner_cpu coin_miner_simd coin_miner_cuda benchmark + +all: sha1_tests sha1_cuda_test sha1_cuda_kernel.cubin \ + coin_miner_cpu coin_miner_simd coin_miner_cuda coin_miner_cuda_kernel.cubin \ + benchmark \ No newline at end of file