Skip to content

Commit

Permalink
Modify library structure for ease of programming
Browse files Browse the repository at this point in the history
  • Loading branch information
omaralvarez committed Oct 16, 2016
1 parent b7b5bb8 commit 27e5e90
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 11 deletions.
12 changes: 6 additions & 6 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ LIBZCASH_H = \
zcash/util.h

LIBZOGMINER_H = \
gpusolver.h \
cl_zogminer_kernel.h \
cl_zogminer.h \
cl.hpp
libzogminer/gpusolver.h \
libzogminer/kernels/cl_zogminer_kernel.h \
libzogminer/cl_zogminer.h \
libzogminer/cl.hpp

.PHONY: FORCE check-security
# bitcoin core #
Expand Down Expand Up @@ -444,8 +444,8 @@ libzcash_a_LDFLAGS = $(HARDENED_LDFLAGS)
libzcash_a_CPPFLAGS += -DMONTGOMERY_OUTPUT

libzogminer_a_SOURCES = \
gpusolver.cpp \
cl_zogminer.cpp
libzogminer/gpusolver.cpp \
libzogminer/cl_zogminer.cpp

libzogminer_a_CPPFLAGS = -DMULTICORE -fopenmp -fPIC -DBINARY_OUTPUT -DCURVE_ALT_BN128 -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS $(HARDENED_CPPFLAGS) -pipe -O1 -g -Wstack-protector -fstack-protector-all -fPIE -fvisibility=hidden

Expand Down
2 changes: 1 addition & 1 deletion src/libstratum/ZcashStratum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "streams.h"
#include "version.h"

#include "gpusolver.h"
#include "libzogminer/gpusolver.h"

#include <atomic>

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/cl_zogminer.cpp → src/libzogminer/cl_zogminer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <random>
//#include <atomic>
#include "cl_zogminer.h"
#include "cl_zogminer_kernel.h" // Created from CMake
#include "kernels/cl_zogminer_kernel.h" // Created from CMake

// workaround lame platforms
#if !CL_VERSION_1_2
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <functional>
#endif

#include "gpusolver.h"
#include "libzogminer/gpusolver.h"

#include "sodium.h"

Expand Down
2 changes: 1 addition & 1 deletion src/standaloneminer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "utiltime.h"
#include "version.h"

#include "gpusolver.h"
#include "libzogminer/gpusolver.h"

#include "sodium.h"

Expand Down
4 changes: 3 additions & 1 deletion zcutil/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ PREFIX="$(pwd)/depends/x86_64-unknown-linux-gnu/"
#cat src/cl_zogminer_kernel.cl | ./zcutil/stringify_ocl.sh > src/cl_zogminer_kernel.h

# This is a simpler solution. It doesn't strip comments however. I think most linux machines have xxd.
xxd -i src/cl_zogminer_kernel.cl | sed 's/unsigned/const unsigned/;s/unsigned int/size_t/;s/src_cl_zogminer_kernel_cl/CL_MINER_KERNEL/;s/_len/_SIZE/'> src/cl_zogminer_kernel.h
xxd -i src/libzogminer/kernels/cl_zogminer_kernel.cl \
| sed 's/unsigned/const unsigned/;s/unsigned int/size_t/;s/src_libzogminer_kernels_cl_zogminer_kernel_cl/CL_MINER_KERNEL/;s/_len/_SIZE/'> \
src/libzogminer/kernels/cl_zogminer_kernel.h

make "$@" -C ./depends/ V=1 NO_QT=1
./autogen.sh
Expand Down

0 comments on commit 27e5e90

Please sign in to comment.