Skip to content

Commit

Permalink
Fix libnexapow
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaolin1579 committed Dec 30, 2023
1 parent 8b1461d commit 3fa86e4
Show file tree
Hide file tree
Showing 104 changed files with 141 additions and 25,426 deletions.
2 changes: 1 addition & 1 deletion src/Miningcore/build-libs-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ HAVE_AVX512F=$(../Native/check_cpu.sh avx512f && echo -DHAVE_AVX512F || echo)
export HAVE_FEATURE="$HAVE_AES $HAVE_SSE2 $HAVE_SSE3 $HAVE_SSSE3 $HAVE_AVX $HAVE_AVX2 $HAVE_AVX512F"

(cd ../Native/libmultihash && make -j clean && make -j) && mv ../Native/libmultihash/libmultihash.so "$OutDir"
(cd ../Native/libnexapow && rm -rf secp256k1 && git clone https://github.com/bitcoin-ABC/secp256k1) && (cd ../Native/libnexapow && make clean && make) && mv ../Native/libnexapow/libnexapow.so "$OutDir"
(cd ../Native/libetchash && make -j clean && make -j) && mv ../Native/libetchash/libetchash.so "$OutDir"
(cd ../Native/libethhash && make -j clean && make -j) && mv ../Native/libethhash/libethhash.so "$OutDir"
(cd ../Native/libethhashb3 && make -j clean && make -j) && mv ../Native/libethhashb3/libethhashb3.so "$OutDir"
Expand All @@ -36,5 +35,6 @@ export HAVE_FEATURE="$HAVE_AES $HAVE_SSE2 $HAVE_SSE3 $HAVE_SSSE3 $HAVE_AVX $HAVE
(cd ../Native/libverushash && make clean && make) && mv ../Native/libverushash/libverushash.so "$OutDir"


((cd /tmp && rm -rf secp256k1 && git clone https://github.com/bitcoin-ABC/secp256k1 && cd secp256k1 && git checkout 04fabb44590c10a19e35f044d11eb5058aac65b2 && mkdir build && cd build && cmake -GNinja .. -DCMAKE_C_FLAGS=-fPIC -DSECP256K1_ENABLE_MODULE_RECOVERY=OFF -DSECP256K1_ENABLE_COVERAGE=OFF -DSECP256K1_ENABLE_MODULE_SCHNORR=ON && ninja) && (cd ../Native/libnexapow && cp /tmp/secp256k1/build/libsecp256k1.a . && make clean && make) && mv ../Native/libnexapow/libnexapow.so "$OutDir")
((cd /tmp && rm -rf RandomX && git clone https://github.com/tevador/RandomX && cd RandomX && git checkout tags/v1.1.10 && mkdir build && cd build && cmake -DARCH=native .. && make -j) && (cd ../Native/librandomx && cp /tmp/RandomX/build/librandomx.a . && make -j clean && make -j) && mv ../Native/librandomx/librandomx.so "$OutDir")
((cd /tmp && rm -rf RandomARQ && git clone https://github.com/arqma/RandomARQ && cd RandomARQ && git checkout 14850620439045b319fa6398f5a164715c4a66ce && mkdir build && cd build && cmake -DARCH=native .. && make -j) && (cd ../Native/librandomarq && cp /tmp/RandomARQ/build/librandomx.a . && make -j clean && make -j) && mv ../Native/librandomarq/librandomarq.so "$OutDir")
25 changes: 9 additions & 16 deletions src/Native/libnexapow/Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
.PHONY: all clean clean-secp256k1 autoconf make-secp256k1

CFLAGS = -g -Wall -c -fPIC -O2 -Wno-pointer-sign -Wno-char-subscripts -Wno-unused-variable -Wno-unused-function -Wno-strict-aliasing -Wno-discarded-qualifiers -Wno-unused-const-variable $(CPU_FLAGS) $(HAVE_FEATURE)
CXXFLAGS = -g -Wall -fPIC -fpermissive -O2 -Wno-char-subscripts -Wno-unused-variable -Wno-unused-function -Wno-strict-aliasing -Wno-sign-compare -std=c++11 $(CPU_FLAGS) $(HAVE_FEATURE)
INC_DIRS = -I. -Isecp256k1/include
CFLAGS = -g -Wall -c -fPIC -O2 -Wno-pointer-sign -Wno-char-subscripts -Wno-unused-variable -Wno-unused-function -Wno-strict-aliasing -Wno-discarded-qualifiers -Wno-unused-const-variable $(CPU_FLAGS) $(HAVE_FEATURE) $(INC_DIRS)
CXXFLAGS = -g -Wall -fPIC -fpermissive -O2 -Wno-char-subscripts -Wno-unused-variable -Wno-unused-function -Wno-strict-aliasing -Wno-sign-compare -std=c++11 $(CPU_FLAGS) $(HAVE_FEATURE) $(INC_DIRS)
LDFLAGS = -shared
LDLIBS = -lgmp
TARGET = libnexapow.so

OBJECTS = exports.o schnorr.o

all: make-secp256k1 $(TARGET)
OBJECTS = exports.o \
schnorr.o

autoconf:
cd ./secp256k1; ./autogen.sh; export CC="gcc -fPIC"; ./configure --enable-module-schnorr;

make-secp256k1:
$(MAKE) -C ./secp256k1
all: $(TARGET)

$(TARGET): $(OBJECTS)
$(CXX) $(LDFLAGS) -o $@ $^ secp256k1/.libs/libsecp256k1.a $(LDLIBS)
$(CXX) $(LDFLAGS) -o $@ $^ libsecp256k1.a $(LDLIBS)

clean-secp256k1: autoconf
$(MAKE) -C ./secp256k1 clean
.PHONY: clean

clean: clean-secp256k1
clean:
$(RM) $(TARGET) $(OBJECTS)

7 changes: 0 additions & 7 deletions src/Native/libnexapow/build_secp256k1.sh

This file was deleted.

50 changes: 0 additions & 50 deletions src/Native/libnexapow/secp256k1/.gitignore

This file was deleted.

19 changes: 0 additions & 19 deletions src/Native/libnexapow/secp256k1/COPYING

This file was deleted.

186 changes: 0 additions & 186 deletions src/Native/libnexapow/secp256k1/Makefile.am

This file was deleted.

Loading

0 comments on commit 3fa86e4

Please sign in to comment.