This commit is contained in:
@@ -2,8 +2,7 @@
|
|||||||
#include "miner.h"
|
#include "miner.h"
|
||||||
|
|
||||||
#include "yespower-1.0.1/yespower.h"
|
#include "yespower-1.0.1/yespower.h"
|
||||||
#include "yespower.h"
|
#include "yespower-1.0.1/sysendian.h"
|
||||||
#include "sysendian.h"
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
@@ -73,7 +72,8 @@ int yespower_hash(const char *input, char *output) {
|
|||||||
return yespower_tls(input, 80, params, (yespower_binary_t *) output);
|
return yespower_tls(input, 80, params, (yespower_binary_t *) output);
|
||||||
}
|
}
|
||||||
|
|
||||||
int scanhash_arm_yespower(int thr_id, uint32_t *data, uint32_t *target, uint32_t max_nonce, unsigned long *hashes_done) {
|
//int scanhash_arm_yespower(int thr_id, uint32_t *data, uint32_t *target, uint32_t max_nonce, unsigned long *hashes_done) {
|
||||||
|
int scanhash_arm_yespower(int thr_id, uint32_t *data, const uint32_t *target, uint32_t max_nonce, unsigned long *hashes_done) {
|
||||||
uint32_t nonce = data[19]; // Nonce ist das 20. Element der Daten
|
uint32_t nonce = data[19]; // Nonce ist das 20. Element der Daten
|
||||||
unsigned char hash[32]; // Speicher für den berechneten Hash
|
unsigned char hash[32]; // Speicher für den berechneten Hash
|
||||||
int result = 0; // Rückgabewert
|
int result = 0; // Rückgabewert
|
||||||
|
|||||||
162
configure.ac
162
configure.ac
@@ -1,7 +1,6 @@
|
|||||||
AC_INIT([nolambocoin], [1.0])
|
AC_INIT([nolambocoin], [1.0])
|
||||||
|
|
||||||
AC_PREREQ([2.59c])
|
AC_PREREQ([2.59c])
|
||||||
AC_CANONICAL_SYSTEM
|
|
||||||
AC_CONFIG_SRCDIR([cpu-miner.c])
|
AC_CONFIG_SRCDIR([cpu-miner.c])
|
||||||
AM_INIT_AUTOMAKE([foreign])
|
AM_INIT_AUTOMAKE([foreign])
|
||||||
AC_CONFIG_HEADERS([cpuminer-config.h])
|
AC_CONFIG_HEADERS([cpuminer-config.h])
|
||||||
@@ -12,35 +11,34 @@ AM_MAINTAINER_MODE
|
|||||||
EXTERNAL_CFLAGS="$CFLAGS"
|
EXTERNAL_CFLAGS="$CFLAGS"
|
||||||
|
|
||||||
dnl Checks for programs
|
dnl Checks for programs
|
||||||
AC_PROG_CC_C99
|
AC_PROG_CC
|
||||||
AC_PROG_GCC_TRADITIONAL
|
AC_PROG_GCC_TRADITIONAL
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
AM_PROG_AS
|
AM_PROG_AS
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
|
|
||||||
if test -n "$EXTERNAL_CFLAGS"; then
|
if test -n "$EXTERNAL_CFLAGS"; then
|
||||||
CFLAGS="$EXTERNAL_CFLAGS"
|
CFLAGS="$EXTERNAL_CFLAGS"
|
||||||
else
|
else
|
||||||
CFLAGS='-Wall -O2 -fomit-frame-pointer'
|
CFLAGS='-Wall -O2 -fomit-frame-pointer'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Checks for header files
|
dnl Checks for header files
|
||||||
AC_HEADER_STDC
|
|
||||||
AC_CHECK_HEADERS([sys/endian.h sys/param.h syslog.h])
|
AC_CHECK_HEADERS([sys/endian.h sys/param.h syslog.h])
|
||||||
# sys/sysctl.h requires sys/types.h on FreeBSD
|
# sys/sysctl.h requires sys/types.h on FreeBSD
|
||||||
# sys/sysctl.h requires sys/param.h on OpenBSD
|
# sys/sysctl.h requires sys/param.h on OpenBSD
|
||||||
AC_CHECK_HEADERS([sys/sysctl.h], [], [],
|
AC_CHECK_HEADERS([sys/sysctl.h], [], [], [
|
||||||
[#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#ifdef HAVE_SYS_PARAM_H
|
#ifdef HAVE_SYS_PARAM_H
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#endif
|
#endif
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_CHECK_DECLS([be32dec, le32dec, be32enc, le32enc], [], [],
|
AC_CHECK_DECLS([be32dec, le32dec, be32enc, le32enc], [], [], [
|
||||||
[AC_INCLUDES_DEFAULT
|
AC_INCLUDES_DEFAULT
|
||||||
#ifdef HAVE_SYS_ENDIAN_H
|
#ifdef HAVE_SYS_ENDIAN_H
|
||||||
#include <sys/endian.h>
|
#include <sys/endian.h>
|
||||||
#endif
|
#endif
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_FUNC_ALLOCA
|
AC_FUNC_ALLOCA
|
||||||
@@ -49,119 +47,73 @@ AC_CHECK_FUNCS([getopt_long])
|
|||||||
PTHREAD_FLAGS="-pthread"
|
PTHREAD_FLAGS="-pthread"
|
||||||
WS2_LIBS=""
|
WS2_LIBS=""
|
||||||
|
|
||||||
# conditional builds for all platforms
|
# Conditional builds for all platforms
|
||||||
case $target in
|
case $target in
|
||||||
*-*-mingw*)
|
*-*-mingw*)
|
||||||
have_win32=true
|
have_win32=true
|
||||||
PTHREAD_FLAGS=""
|
PTHREAD_FLAGS=""
|
||||||
WS2_LIBS="-lws2_32"
|
WS2_LIBS="-lws2_32"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*linux*)
|
*linux*)
|
||||||
if test -z "$LIBCURL"; then
|
if test -z "$LIBCURL"; then
|
||||||
LIBCURL="-lcurl"
|
LIBCURL="-lcurl"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# libcurl install path (for mingw : --with-curl=/usr/local)
|
# Check for libcurl
|
||||||
AC_ARG_WITH([curl],
|
PKG_CHECK_MODULES([CURL], [libcurl], [], [AC_MSG_ERROR([libcurl is required but not installed.])])
|
||||||
[ --with-curl=PATH prefix where curl is installed [default=/usr]])
|
|
||||||
|
|
||||||
if test -n "$with_curl"; then
|
# SSL install path (optional)
|
||||||
LIBCURL_CFLAGS="$LIBCURL_CFLAGS -I$with_curl/include"
|
AC_ARG_WITH([crypto],
|
||||||
LIBCURL_CPPFLAGS="$LIBCURL_CPPFLAGS -I$with_curl/include"
|
[ --with-crypto=PATH prefix where openssl crypto is installed [default=/usr]],
|
||||||
LIBCURL_LDFLAGS="$LIBCURL_LDFLAGS -L$with_curl/lib"
|
[
|
||||||
fi
|
LIBCURL_CFLAGS="$LIBCURL_CFLAGS -I$with_crypto/include"
|
||||||
|
LIBCURL_CPPFLAGS="$LIBCURL_CPPFLAGS -I$with_crypto/include"
|
||||||
|
LIBCURL_LDFLAGS="-L$with_crypto/lib $LIBCURL_LDFLAGS"
|
||||||
|
LIBCURL="$LIBCURL -lssl -lcrypto"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
# SSL install path (for mingw : --with-crypto=/usr/local/ssl)
|
CFLAGS="$CFLAGS $LIBCURL_CFLAGS"
|
||||||
AC_ARG_WITH([crypto],
|
CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
|
||||||
[ --with-crypto=PATH prefix where openssl crypto is installed [default=/usr]])
|
LDFLAGS="$LDFLAGS $LIBCURL_LDFLAGS"
|
||||||
|
|
||||||
if test -n "$with_crypto" ; then
|
AC_SUBST(LIBCURL)
|
||||||
LIBCURL_CFLAGS="$LIBCURL_CFLAGS -I$with_crypto/include"
|
;;
|
||||||
LIBCURL_CPPFLAGS="$LIBCURL_CPPFLAGS -I$with_crypto/include"
|
|
||||||
LIBCURL_LDFLAGS="-L$with_crypto/lib $LIBCURL_LDFLAGS"
|
|
||||||
LIBCURL="$LIBCURL -lssl -lcrypto"
|
|
||||||
fi
|
|
||||||
|
|
||||||
CFLAGS="$CFLAGS $LIBCURL_CFLAGS"
|
|
||||||
CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
|
|
||||||
LDFLAGS="$LDFLAGS $LIBCURL_LDFLAGS"
|
|
||||||
|
|
||||||
AC_SUBST(LIBCURL)
|
|
||||||
# AC_SUBST(LIBCURL_CFLAGS)
|
|
||||||
# AC_SUBST(LIBCURL_CPPFLAGS)
|
|
||||||
# AC_SUBST(LIBCURL_LDFLAGS)
|
|
||||||
;;
|
|
||||||
|
|
||||||
*-apple-*)
|
*-apple-*)
|
||||||
if test -z "$LIBCURL"; then
|
if test -z "$LIBCURL"; then
|
||||||
LIBCURL="-lcurl"
|
LIBCURL="-lcurl"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# libcurl install path (for mingw : --with-curl=/usr/local)
|
# Check for libcurl
|
||||||
AC_ARG_WITH([curl],
|
PKG_CHECK_MODULES([CURL], [libcurl], [], [AC_MSG_ERROR([libcurl is required but not installed.])])
|
||||||
[ --with-curl=PATH prefix where curl is installed [default=/usr]])
|
LIBS="$LIBS -lcurl"
|
||||||
|
|
||||||
if test -n "$with_curl"; then
|
CFLAGS="$CFLAGS $LIBCURL_CFLAGS"
|
||||||
LIBCURL_CFLAGS="$LIBCURL_CFLAGS -I$with_curl/include"
|
CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
|
||||||
LIBCURL_CPPFLAGS="$LIBCURL_CPPFLAGS -I$with_curl/include"
|
LDFLAGS="$LDFLAGS $LIBCURL_LDFLAGS"
|
||||||
LIBCURL_LDFLAGS="$LIBCURL_LDFLAGS -L$with_curl/lib"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# SSL install path (for mingw : --with-crypto=/usr/local/ssl)
|
AC_SUBST(LIBCURL)
|
||||||
AC_ARG_WITH([crypto],
|
;;
|
||||||
[ --with-crypto=PATH prefix where openssl crypto is installed [default=/usr]])
|
|
||||||
|
|
||||||
if test -n "$with_crypto" ; then
|
|
||||||
LIBCURL_CFLAGS="$LIBCURL_CFLAGS -I$with_crypto/include"
|
|
||||||
LIBCURL_CPPFLAGS="$LIBCURL_CPPFLAGS -I$with_crypto/include"
|
|
||||||
LIBCURL_LDFLAGS="-L$with_crypto/lib $LIBCURL_LDFLAGS"
|
|
||||||
LIBCURL="$LIBCURL -lssl -lcrypto"
|
|
||||||
fi
|
|
||||||
|
|
||||||
CFLAGS="$CFLAGS $LIBCURL_CFLAGS"
|
|
||||||
CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
|
|
||||||
LDFLAGS="$LDFLAGS $LIBCURL_LDFLAGS"
|
|
||||||
|
|
||||||
AC_SUBST(LIBCURL)
|
|
||||||
# AC_SUBST(LIBCURL_CFLAGS)
|
|
||||||
# AC_SUBST(LIBCURL_CPPFLAGS)
|
|
||||||
# AC_SUBST(LIBCURL_LDFLAGS)
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case $target in
|
AC_CHECK_LIB([jansson], [json_loads], [], [AC_MSG_ERROR([jansson is required but not installed.])])
|
||||||
*-*-mingw*)
|
AC_CHECK_LIB([pthread], [pthread_create], PTHREAD_LIBS="-lpthread")
|
||||||
# LIBCURL_CHECK_CONFIG(, 7.15.2, ,
|
AC_CHECK_LIB([curl], [curl_easy_init], [LIBS="$LIBS -lcurl"],
|
||||||
# [AC_MSG_ERROR([Missing required libcurl >= 7.15.2])])
|
[AC_MSG_ERROR([libcurl is required but not found.])])
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
AC_CHECK_LIB(jansson, json_loads, request_jansson=false, request_jansson=true)
|
|
||||||
AC_CHECK_LIB([pthread], [pthread_create], PTHREAD_LIBS="-lpthread",
|
|
||||||
AC_CHECK_LIB([pthreadGC2], [pthread_create], PTHREAD_LIBS="-lpthreadGC2",
|
|
||||||
AC_CHECK_LIB([pthreadGC1], [pthread_create], PTHREAD_LIBS="-lpthreadGC1",
|
|
||||||
AC_CHECK_LIB([pthreadGC], [pthread_create], PTHREAD_LIBS="-lpthreadGC"
|
|
||||||
))))
|
|
||||||
|
|
||||||
AM_CONDITIONAL([WANT_JANSSON], [test x$request_jansson = xtrue])
|
AM_CONDITIONAL([WANT_JANSSON], [test x$request_jansson = xtrue])
|
||||||
AM_CONDITIONAL([HAVE_WINDOWS], [test x$have_win32 = xtrue])
|
AM_CONDITIONAL([HAVE_WINDOWS], [test x$have_win32 = xtrue])
|
||||||
|
|
||||||
if test x$request_jansson = xtrue
|
|
||||||
then
|
|
||||||
JANSSON_LIBS="compat/jansson/libjansson.a"
|
|
||||||
else
|
|
||||||
JANSSON_LIBS=-ljansson
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_SUBST(JANSSON_LIBS)
|
AC_SUBST(JANSSON_LIBS)
|
||||||
AC_SUBST(PTHREAD_FLAGS)
|
AC_SUBST(PTHREAD_FLAGS)
|
||||||
AC_SUBST(PTHREAD_LIBS)
|
AC_SUBST(PTHREAD_LIBS)
|
||||||
AC_SUBST(WS2_LIBS)
|
AC_SUBST(WS2_LIBS)
|
||||||
|
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
Makefile
|
Makefile
|
||||||
compat/Makefile
|
compat/Makefile
|
||||||
compat/jansson/Makefile
|
compat/jansson/Makefile
|
||||||
])
|
])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ Options:\n\
|
|||||||
YespowerItc: Intercoin\n\
|
YespowerItc: Intercoin\n\
|
||||||
YespowerSugar: Sugarchain\n\
|
YespowerSugar: Sugarchain\n\
|
||||||
YespowerMbc: power2b for MicroBitcoin\n\
|
YespowerMbc: power2b for MicroBitcoin\n\
|
||||||
YespowerARM: NoLamboCoin
|
YespowerARM: NoLamboCoin\n\
|
||||||
-o, --url=URL URL of mining server\n\
|
-o, --url=URL URL of mining server\n\
|
||||||
-O, --userpass=U:P username:password pair for mining server\n\
|
-O, --userpass=U:P username:password pair for mining server\n\
|
||||||
-u, --user=USERNAME username for mining server\n\
|
-u, --user=USERNAME username for mining server\n\
|
||||||
|
|||||||
Reference in New Issue
Block a user