angepasst an nversion
Some checks are pending
Build CPU miner / build (push) Waiting to run

This commit is contained in:
w12
2025-01-07 16:04:36 +01:00
5 changed files with 249 additions and 16 deletions

View File

@@ -23,7 +23,15 @@ nolambocoin_miner_SOURCES = \
YespowerItc.c YespowerYtn.c \
yespower-1.0.1-power2b/sha256-p2b.c yespower-1.0.1-power2b/yespower-opt-p2b.c \
yespower-1.0.1-power2b/blake2b.c YespowerMbc.c \
<<<<<<< HEAD
YespowerARM.c
=======
YespowerARM.c version.h
# Entferne Header-Dateien aus SOURCES und definiere sie separat
include_HEADERS = \
elist.h miner.h compat.h
>>>>>>> b12eeead377cb6dddc74a57b520c4f3334d3e21f
# Entferne Header-Dateien aus SOURCES und definiere sie separat
include_HEADERS = \
@@ -52,8 +60,13 @@ if TARGET_WINDOWS
AM_CPPFLAGS += -DTARGET_WINDOWS
endif
<<<<<<< HEAD
nolambocoin_miner_LDFLAGS = $(PTHREAD_LIBS)
nolambocoin_miner_LDADD = @CURL_LIBS@ @JANSSON_LIBS@ $(PTHREAD_LIBS) @WS2_LIBS@
=======
nolambocoin_miner_LDFLAGS = @PTHREAD_LIBS@
nolambocoin_miner_LDADD = @CURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @WS2_LIBS@
>>>>>>> b12eeead377cb6dddc74a57b520c4f3334d3e21f
if TARGET_WINDOWS
nolambocoin_miner_LDADD += @WS2_LIBS@

View File

@@ -3,6 +3,12 @@ make distclean || echo clean
rm -f config.status
sudo chmod +x autogen.sh
<<<<<<< HEAD
=======
cd share
sudo chmod +x genbuild.sh
cd ..
>>>>>>> b12eeead377cb6dddc74a57b520c4f3334d3e21f
# BUILD
./autogen.sh
./configure CFLAGS="-Wall -O2 -fomit-frame-pointer"

150
build_nolambocoin_miner.sh Normal file
View File

@@ -0,0 +1,150 @@
#!/bin/bash
# build.sh - Ein Skript zur Automatisierung des Build- und Installationsprozesses für Nolambocoin Miner
# Funktionen zur Anzeige von Nachrichten
function echo_info {
echo -e "\e[34m[INFO]\e[0m $1"
}
function echo_success {
echo -e "\e[32m[SUCCESS]\e[0m $1"
}
function echo_error {
echo -e "\e[31m[ERROR]\e[0m $1"
}
# Überprüfen der Abhängigkeiten
function check_dependencies {
echo_info "Überprüfe erforderliche Abhängigkeiten..."
local dependencies=("autoconf" "automake" "libcurl4-openssl-dev" "libjansson-dev" "build-essential" "pkg-config")
for dep in "${dependencies[@]}"; do
if ! dpkg -s "$dep" &> /dev/null; then
echo_error "Abhängigkeit fehlt: $dep"
echo_info "Bitte installieren Sie fehlende Abhängigkeiten mit folgendem Befehl:"
echo_info "sudo apt-get install ${dependencies[@]}"
exit 1
fi
done
echo_success "Alle erforderlichen Abhängigkeiten sind installiert."
}
# Initialisieren der Autotools
function initialize_autotools {
echo_info "Initialisiere Autotools..."
if ! autoreconf -i; then
echo_error "Fehler beim Ausführen von autoreconf."
exit 1
fi
echo_success "Autotools erfolgreich initialisiert."
}
# Konfigurieren des Projekts
function configure_project {
echo_info "Konfiguriere das Projekt..."
if ! ./configure; then
echo_error "Fehler beim Ausführen von ./configure."
exit 1
fi
echo_success "Projekt erfolgreich konfiguriert."
}
# Kompilieren des Projekts
function compile_project {
echo_info "Kompiliere das Projekt..."
if ! make -j$(nproc); then
echo_error "Fehler beim Ausführen von make."
exit 1
fi
echo_success "Projekt erfolgreich kompiliert."
}
# Installieren des Projekts
function install_project {
echo_info "Installiere das Projekt..."
if [ "$EUID" -ne 0 ]; then
echo_error "Installation erfordert Root-Rechte. Bitte führen Sie das Skript mit sudo aus."
exit 1
fi
if ! make install; then
echo_error "Fehler beim Ausführen von make install."
exit 1
fi
echo_success "Projekt erfolgreich installiert."
}
# Bereinigung des Build-Verzeichnisses
function clean_project {
echo_info "Bereinige das Projekt..."
if ! make clean; then
echo_error "Fehler beim Ausführen von make clean."
exit 1
fi
echo_success "Projekt erfolgreich bereinigt."
}
# Anzeige der Nutzung des Skripts
function show_help {
echo "Usage: ./build.sh [options]"
echo ""
echo "Options:"
echo " --build Konfiguriert und kompiliert das Projekt."
echo " --install Installiert das Projekt nach dem Kompilieren."
echo " --clean Bereinigt die Build-Dateien."
echo " --help Zeigt diese Hilfe an."
echo ""
echo "Beispiele:"
echo " ./build.sh --build"
echo " sudo ./build.sh --install"
echo " ./build.sh --clean"
exit 0
}
# Hauptfunktion zur Verarbeitung der Skript-Argumente
function main {
if [ $# -eq 0 ]; then
show_help
fi
for arg in "$@"; do
case $arg in
--build)
check_dependencies
initialize_autotools
configure_project
compile_project
;;
--install)
install_project
;;
--clean)
clean_project
;;
--help)
show_help
;;
*)
echo_error "Unbekannte Option: $arg"
show_help
;;
esac
done
}
# Aufruf der Hauptfunktion mit allen übergebenen Argumenten
main "$@"

View File

@@ -1,18 +1,19 @@
noinst_LIBRARIES = libjansson.a
noinst_LIBRARIES = libjansson.a
libjansson_a_SOURCES = \
dump.c \
hashtable.c \
load.c \
strbuffer.c \
utf.c \
value.c
libjansson_a_SOURCES = \
config.h \
dump.c \
hashtable.c \
hashtable.h \
jansson.h \
jansson_private.h \
load.c \
strbuffer.c \
strbuffer.h \
utf.c \
utf.h \
util.h \
value.c
noinst_HEADERS = \
config.h \
hashtable.h \
jansson.h \
jansson_private.h \
strbuffer.h \
utf.h \
util.h

View File

@@ -1,14 +1,32 @@
<<<<<<< HEAD
AC_INIT([nolambocoin], [1.0])
=======
>>>>>>> b12eeead377cb6dddc74a57b520c4f3334d3e21f
AC_PREREQ([2.59c])
AC_CONFIG_SRCDIR([cpu-miner.c])
AC_INIT([nolambocoin-miner], [1.0])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([cpu-miner.c])
AC_CONFIG_HEADERS([cpuminer-config.h])
<<<<<<< HEAD
=======
# Füge die Makefile-Konfiguration hinzu
AC_CONFIG_FILES([Makefile
compat/Makefile
compat/jansson/Makefile
])
# Lade pkg-config Makros
PKG_PROG_PKG_CONFIG
>>>>>>> b12eeead377cb6dddc74a57b520c4f3334d3e21f
AM_MAINTAINER_MODE
EXTERNAL_CFLAGS="$CFLAGS"
<<<<<<< HEAD
# Check for jansson
PKG_CHECK_MODULES([JANSSON], [jansson], [], [AC_MSG_ERROR([jansson is required but not installed.])])
@@ -21,6 +39,8 @@ PKG_CHECK_MODULES([CURL], [libcurl], [], [AC_MSG_ERROR([libcurl is required but
AC_SUBST([CURL_CFLAGS])
AC_SUBST([CURL_LIBS])
=======
>>>>>>> b12eeead377cb6dddc74a57b520c4f3334d3e21f
# Checks for programs
AC_PROG_CC
AC_PROG_GCC_TRADITIONAL
@@ -49,6 +69,7 @@ AC_CHECK_DECLS([be32dec, le32dec, be32enc, le32enc], [],
AC_FUNC_ALLOCA
AC_CHECK_FUNCS([getopt_long])
<<<<<<< HEAD
# Define WS2_LIBS for Windows (set to empty for non-Windows platforms)
WS2_LIBS=""
case "$target_os" in
@@ -59,6 +80,27 @@ esac
AC_SUBST([WS2_LIBS])
# Platform detection
=======
# Pthread Flags
AC_CHECK_LIB([pthread], [pthread_create],
[PTHREAD_LIBS="-lpthread"],
[AC_MSG_ERROR([pthread library not found.])])
AC_SUBST([PTHREAD_LIBS])
# Ersetze AC_CHECK_FLAGS durch AC_COMPILE_IFELSE
AC_MSG_CHECKING([whether -pthread flag is supported])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])],
[PTHREAD_CFLAGS="-pthread"],
[PTHREAD_CFLAGS=""])
AC_MSG_RESULT([$PTHREAD_CFLAGS])
AC_SUBST([PTHREAD_CFLAGS])
# WS2 Libraries (Windows)
WS2_LIBS=""
have_win32=false
# Plattform-Erkennung
>>>>>>> b12eeead377cb6dddc74a57b520c4f3334d3e21f
UNAME_S=`uname -s`
UNAME_M=`uname -m`
@@ -124,9 +166,30 @@ case "$UNAME_S" in
;;
esac
<<<<<<< HEAD
AC_CONFIG_FILES([
Makefile
compat/Makefile
compat/jansson/Makefile
])
=======
AM_CONDITIONAL([WANT_JANSSON], [true])
# Checks für libcurl
PKG_CHECK_MODULES([CURL], [libcurl >= 7.0], [],
[AC_MSG_ERROR([libcurl is required but not installed.])])
# Checks für jansson
PKG_CHECK_MODULES([JANSSON], [jansson >= 2.0], [],
[AC_MSG_ERROR([jansson is required but not installed.])])
AC_SUBST([JANSSON_CFLAGS])
AC_SUBST([JANSSON_LIBS])
AC_SUBST([CURL_CFLAGS])
AC_SUBST([CURL_LIBS])
AC_SUBST([PTHREAD_CFLAGS])
AC_SUBST([PTHREAD_LIBS])
AC_SUBST([WS2_LIBS])
>>>>>>> b12eeead377cb6dddc74a57b520c4f3334d3e21f
AC_OUTPUT