-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.am
134 lines (108 loc) · 4.78 KB
/
Makefile.am
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# allow to use Host cuda functions in C/C++
DEF_INCLUDES = @CUDA_INCLUDES@
if WANT_JANSSON
JANSSON_INCLUDES= -I$(top_srcdir)/compat/jansson
else
JANSSON_INCLUDES=
endif
EXTRA_DIST = autogen.sh README.md README.txt LICENSE.txt \
ccminer.sln ccminer.vcxproj ccminer.vcxproj.filters \
compat/gettimeofday.c compat/getopt/getopt_long.c
SUBDIRS = compat
bin_PROGRAMS = ccminer
ccminer_SOURCES = elist.h miner.h compat.h \
compat/inttypes.h compat/stdbool.h compat/unistd.h \
compat/sys/time.h compat/getopt/getopt.h \
crc32.c \
ccminer.cpp pools.cpp util.cpp bench.cpp bignum.cpp \
api.cpp hashlog.cpp nvml.cpp stats.cpp sysinfos.cpp cuda.cpp \
nvsettings.cpp \
sph/fugue.c uint256.h \
cuda_checkhash.cu \
sph/bmw.c sph/blake.c sph/groestl.c sph/jh.c sph/keccak.c sph/skein.c \
sph/cubehash.c sph/echo.c sph/luffa.c sph/sha2.c sph/shavite.c sph/simd.c \
sph/hamsi.c sph/hamsi_helper.c sph/streebog.c \
sph/shabal.c sph/whirlpool.c sph/sha2big.c sph/haval.c \
sph/ripemd.c sph/sph_sha2.c \
quark/cuda_quark_blake512.cu quark/cuda_quark_blake512_80.cu \
quark/cuda_quark_bmw512.cu quark/cuda_quark_bmw512_80.cu \
quark/cuda_quark_groestl512.cu quark/cuda_quark_groestl512_80.cu \
quark/cuda_quark_jh512.cu quark/cuda_quark_jh512_80.cu \
quark/cuda_quark_keccak512.cu quark/cuda_quark_keccak512_80.cu \
quark/cuda_quark_skein512.cu quark/cuda_quark_skein512_80.cu \
qubit/cuda_qubit_luffa512.cu qubit/cuda_qubit_luffa512_80.cu \
x11/cuda_x11_cubehash512.cu x11/cuda_x11_cubehash512_80.cu \
x11/cuda_x11_shavite512.cu x11/cuda_x11_shavite512_80.cu \
x11/cuda_x11_simd512.cu x16r/cuda_x16_simd512_80.cu \
x11/cuda_x11_echo512.cu x16r/cuda_x16_echo512_80.cu \
x13/cuda_x13_hamsi512.cu x13/cuda_x13_hamsi512_80.cu \
x13/cuda_x13_fugue512.cu x16r/cuda_x16_fugue512_80.cu \
x15/cuda_x14_shabal512.cu x16r/cuda_x16_shabal512_80.cu \
x15/cuda_x15_whirlpool.cu x15/cuda_x15_whirlpool_80.cu \
x17/cuda_x17_sha512.cu x17/cuda_x17_sha512_80.cu \
x16r/x16r.cu
if HAVE_NVML
nvml_defs = -DUSE_WRAPNVML
nvml_libs = -ldl
endif
if HAVE_WINDOWS
ccminer_SOURCES += compat/winansi.c
endif
ccminer_LDFLAGS = $(PTHREAD_FLAGS) @CUDA_LDFLAGS@
ccminer_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @WS2_LIBS@ @CUDA_LIBS@ @OPENMP_CFLAGS@ @LIBS@ $(nvml_libs)
ccminer_CPPFLAGS = @LIBCURL_CPPFLAGS@ @OPENMP_CFLAGS@ $(CPPFLAGS) $(PTHREAD_FLAGS) -fno-strict-aliasing $(JANSSON_INCLUDES) $(DEF_INCLUDES) $(nvml_defs)
if HAVE_OSX
ccminer_CPPFLAGS += -I/usr/local/llvm/lib/clang/4.0.0/include
ccminer_LDFLAGS += -L/usr/local/llvm/lib
ccminer_LDADD += -lomp
endif
#ccminer_CPPFLAGS += -DUSE_LIBSODIUM
#ccminer_LDFLAGS += -Lequi/lib
#ccminer_LDADD += -lsodium
ccminer_LDADD += -lcuda
nvcc_ARCH :=
if COMPUTE61
nvcc_ARCH += -gencode=arch=compute_61,code=\"sm_61,compute_61\"
else
if COMPUTE52
nvcc_ARCH += -gencode=arch=compute_52,code=\"sm_52,compute_52\"
else
if COMPUTE50
nvcc_ARCH += -gencode=arch=compute_52,code=\"sm_52,compute_52\"
else
nvcc_ARCH += -gencode=arch=compute_61,code=\"sm_61,compute_61\"
nvcc_ARCH += -gencode=arch=compute_52,code=\"sm_52,compute_52\"
nvcc_ARCH += -gencode=arch=compute_50,code=\"sm_50,compute_50\"
endif
endif
endif
nvcc_FLAGS = $(nvcc_ARCH) @CUDA_INCLUDES@ -I. @CUDA_CFLAGS@
nvcc_FLAGS += $(JANSSON_INCLUDES) --ptxas-options="-v"
# we're now targeting all major compute architectures within one binary.
.cu.o:
$(NVCC) $(nvcc_FLAGS) --maxrregcount=128 -o $@ -c $<
# Some algorithms are faster with less registers
quark/cuda_quark_blake512.o: quark/cuda_quark_blake512.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=80 -o $@ -c $<
quark/cuda_quark_blake512_80.o: quark/cuda_quark_blake512_80.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=80 -o $@ -c $<
quark/cuda_quark_jh512.o: quark/cuda_quark_jh512.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=80 -o $@ -c $<
quark/cuda_quark_jh512_80.o: quark/cuda_quark_jh512_80.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=80 -o $@ -c $<
quark/cuda_quark_keccak512.o: quark/cuda_quark_keccak512.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=88 -o $@ -c $<
qubit/cuda_qubit_luffa512.o: qubit/cuda_qubit_luffa512.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=80 -o $@ -c $<
x11/cuda_x11_simd512.o: x11/cuda_x11_simd512.cu
$(NVCC) $(nvcc_FLAGS) -Xcompiler -Wno-unused-variable -o $@ -c $<
x13/cuda_x13_hamsi512.o: x13/cuda_x13_hamsi512.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=72 -o $@ -c $<
x13/cuda_x13_hamsi512_80.o: x13/cuda_x13_hamsi512_80.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=72 -o $@ -c $<
x15/cuda_x15_fugue.o: x15/cuda_x15_fugue.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=72 -o $@ -c $<
x15/cuda_x15_whirlpool.o: x15/cuda_x15_whirlpool.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=72 -o $@ -c $<
x17/cuda_x17_sha512.o: x17/cuda_x17_sha512.cu
$(NVCC) $(nvcc_FLAGS) --maxrregcount=80 -o $@ -c $<