Skip to content

Commit

Permalink
switch application prefix from minerd to cpuminer
Browse files Browse the repository at this point in the history
Its required to build source packages on some linux distributions
  • Loading branch information
tpruvot committed Dec 7, 2014
1 parent b40e72f commit e7670e8
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 37 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,4 +1,5 @@
minerd*
cpuminer
*.exe
*.o
*.d
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -13,4 +13,4 @@ before_script:
script:
- ./configure --with-crypto --with-curl
- make
- ./minerd --cputest
- ./cpuminer --cputest
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -22,4 +22,4 @@ RUN cd cpuminer && ./configure CFLAGS="-O3"
RUN cd cpuminer && make

WORKDIR /cpuminer
ENTRYPOINT ["./minerd"]
ENTRYPOINT ["./cpuminer"]
36 changes: 18 additions & 18 deletions Makefile.am
Expand Up @@ -11,11 +11,11 @@ SUBDIRS = compat

INCLUDES = @PTHREAD_FLAGS@ -fno-strict-aliasing $(JANSSON_INCLUDES)

bin_PROGRAMS = minerd
bin_PROGRAMS = cpuminer

dist_man_MANS = minerd.1
dist_man_MANS = cpuminer.1

minerd_SOURCES = \
cpuminer_SOURCES = \
cpu-miner.c util.c \
api.c sensors.c \
sha3/sph_keccak.c \
Expand Down Expand Up @@ -67,45 +67,45 @@ minerd_SOURCES = \
disable_flags =

if USE_ASM
minerd_SOURCES += neoscrypt_asm.S
cpuminer_SOURCES += neoscrypt_asm.S
if ARCH_x86
minerd_SOURCES += sha2-x86.S scrypt-x86.S aesb-x86.S crypto/aesb-x86-impl.c
cpuminer_SOURCES += sha2-x86.S scrypt-x86.S aesb-x86.S crypto/aesb-x86-impl.c
endif
if ARCH_x86_64
minerd_SOURCES += sha2-x64.S scrypt-x64.S aesb-x64.S
cpuminer_SOURCES += sha2-x64.S scrypt-x64.S aesb-x64.S
endif
if ARCH_ARM
minerd_SOURCES += sha2-arm.S scrypt-arm.S
cpuminer_SOURCES += sha2-arm.S scrypt-arm.S
endif
else
disable_flags += -DNOASM
minerd_SOURCES += crypto/aesb-x86-impl.c
cpuminer_SOURCES += crypto/aesb-x86-impl.c
endif

if HAVE_WINDOWS
minerd_SOURCES += compat/winansi.c
cpuminer_SOURCES += compat/winansi.c
endif

minerd_LDFLAGS = @LDFLAGS@
minerd_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @WS2_LIBS@
minerd_CPPFLAGS = @LIBCURL_CPPFLAGS@
minerd_CFLAGS = -Wno-pointer-sign -Wno-pointer-to-int-cast $(disable_flags)
cpuminer_LDFLAGS = @LDFLAGS@
cpuminer_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @WS2_LIBS@
cpuminer_CPPFLAGS = @LIBCURL_CPPFLAGS@
cpuminer_CFLAGS = -Wno-pointer-sign -Wno-pointer-to-int-cast $(disable_flags)

if HAVE_WINDOWS
minerd_CFLAGS += -Wl,--stack,10485760
cpuminer_CFLAGS += -Wl,--stack,10485760
endif

if HAVE_WINDOWS
# use to profile an object
# gprof_cflags = -pg -g3
# minerd_LDFLAGS += -pg
# minerd_CFLAGS += -fno-inline-functions -static
# cpuminer_LDFLAGS += -pg
# cpuminer_CFLAGS += -fno-inline-functions -static

# copy/paste from generated Makefile
common_ccflags = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minerd_CPPFLAGS) $(CPPFLAGS) $(minerd_CFLAGS) $(CFLAGS)
common_ccflags = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuminer_CPPFLAGS) $(CPPFLAGS) $(cpuminer_CFLAGS) $(CFLAGS)

# special CFLAGS (if you find a simpler way to do that tell me ;)
minerd-neoscrypt.o: neoscrypt.c
cpuminer-neoscrypt.o: neoscrypt.c
@echo "CUSTOM ${@}: ${filter %.o,${^}} ${filter %.c,${^}}"
$(CC) $(common_ccflags) -g -O3 $(gprof_cflags) -MT $@ -MD -MP -c -o $@ $<

Expand Down
3 changes: 2 additions & 1 deletion NEWS
@@ -1,5 +1,6 @@
version 1.0.9 (Tanguy Pruvot)
- pool extranonce subscribe
- upgrade jansson
- lyra2 algo
- fix for solo mining

Expand Down Expand Up @@ -282,7 +283,7 @@ Version 0.3.2 - December 23, 2010
Version 0.3.1 - December 19, 2010

- Critical fix for sha256_via
- Retry JSON-RPC failures (see --retry, under "minerd --help" output)
- Retry JSON-RPC failures (see --retry, under "--help" output)

Version 0.3 - December 18, 2010

Expand Down
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -21,11 +21,12 @@ Algorithms
==========
#### Currently supported
*__scrypt__ (Litecoin, Dogecoin, Feathercoin, ...)
*__scrypt:N__ (Vertcoin [VTC])
*__scrypt:N__
*__sha256d__ (Bitcoin, Freicoin, Peercoin/PPCoin, Terracoin, ...)
*__blake__ (Neos/Saffron [SFR] Blake-256)
*__cryptonight__ (Bytecoin [BCN], Monero)
*__fresh__ (FreshCoin)
*__lyra2__ (VertCoin [VTC])
*__neoscrypt__ (Feathercoin)
*__nist5__ (MistCoin [MIC], TalkCoin [TAC], ...)
*__pentablake__ (Joincoin)
Expand Down Expand Up @@ -112,7 +113,7 @@ Build

Usage instructions
==================
Run "minerd --help" to see options.
Run "cpuminer --help" to see options.

### Connecting through a proxy

Expand Down
29 changes: 15 additions & 14 deletions minerd.1 → cpuminer.1
@@ -1,35 +1,35 @@
.TH MINERD 1 "May 2014" "cpuminer 2.4"
.TH CPUMINER 1 "May 2014" "cpuminer 2.4"
.SH NAME
minerd \- CPU miner for Bitcoin and Litecoin
cpuminer \- CPU miner for Bitcoin and Litecoin
.SH SYNOPSIS
.B minerd
.B cpuminer
[\fIOPTION\fR]...
.SH DESCRIPTION
.B minerd
.B cpuminer
is a multi-threaded CPU miner for Bitcoin, Litecoin and other cryptocurrencies.
It supports the getwork and getblocktemplate (BIP 22) methods,
as well as the Stratum mining protocol.
.PP
In its normal mode of operation, \fBminerd\fR connects to a mining server
In its normal mode of operation, \fBcpuminer\fR connects to a mining server
(specified with the \fB\-o\fR option), receives work from it and starts hashing.
As soon as a solution is found, it is submitted to the same mining server,
which can accept or reject it.
When using getwork or getblocktemplate,
\fBminerd\fR can take advantage of long polling, if the server supports it;
\fBcpuminer\fR can take advantage of long polling, if the server supports it;
in any case, fresh work is fetched as needed.
When using the Stratum protocol this is not possible,
and the server is responsible for sending fresh work at least every minute;
if it fails to do so,
\fBminerd\fR may drop the connection and try reconnecting again.
\fBcpuminer\fR may drop the connection and try reconnecting again.
.PP
By default, \fBminerd\fR writes all its messages to standard error.
By default, \fBcpuminer\fR writes all its messages to standard error.
On systems that have a syslog, the \fB\-\-syslog\fR option can be used
to write to it instead.
.PP
On start, the nice value of all miner threads is set to 19.
On Linux, the scheduling policy is also changed to SCHED_IDLE,
or to SCHED_BATCH if that fails.
On multiprocessor systems, \fBminerd\fR
On multiprocessor systems, \fBcpuminer\fR
automatically sets the CPU affinity of miner threads
if the number of threads is a multiple of the number of processors.
.SH EXAMPLES
Expand All @@ -38,7 +38,7 @@ at example.com on port 3333, authenticating as worker "foo" with password "bar":
.PP
.nf
.RS
minerd \-o stratum+tcp://example.com:3333 \-O foo:bar
cpuminer \-o stratum+tcp://example.com:3333 \-O foo:bar
.RE
.fi
.PP
Expand All @@ -47,7 +47,7 @@ authenticating with username "rpcuser" and password "rpcpass":
.PP
.nf
.RS
minerd \-a sha256d \-o http://localhost:18332 \-O rpcuser:rpcpass \\
cpuminer \-a sha256d \-o http://localhost:18332 \-O rpcuser:rpcpass \\
\-\-coinbase\-addr=mpXwg4jMtRhuSpVq4xS3HFHmCmWp9NyGKt
.RE
.fi
Expand All @@ -58,7 +58,7 @@ omitting the per-thread hashmeter output:
.PP
.nf
.RS
minerd \-BSq \-o http://my.server:9327
cpuminer \-BSq \-o http://my.server:9327
.RE
.fi
.SH OPTIONS
Expand Down Expand Up @@ -218,7 +218,8 @@ Sets the proxy server to use if no protocol-specific proxy is set.
Using an environment variable to set the proxy has the same effect as
using the \fB\-x\fR option.
.SH AUTHOR
Most of the code in the current version of minerd was written by
Pooler <pooler@litecoinpool.org> with contributions from others.
This variant is maintained by tpruvot@github.

Most of the code in the current version of cpuminer was written by
Pooler <pooler@litecoinpool.org> with contributions from others.
The original minerd was written by Jeff Garzik <jeff@garzik.org>.

0 comments on commit e7670e8

Please sign in to comment.