]> Git Repo - VerusCoin.git/commitdiff
macifiy the build so that this compiles on a mac
authorJoel Barker <[email protected]>
Mon, 26 Dec 2016 06:11:13 +0000 (14:11 +0800)
committerJoel Barker <[email protected]>
Mon, 26 Dec 2016 06:11:13 +0000 (14:11 +0800)
13 files changed:
Makefile.am
README-mac.md [new file with mode: 0644]
configure.ac
depends/builders/darwin.mk
depends/hosts/darwin.mk
depends/packages/boost.mk
depends/packages/googlemock.mk [deleted file]
depends/packages/googletest.mk [deleted file]
depends/packages/libsnark.mk
depends/packages/packages.mk
src/crypto/equihash.cpp
toolchain-info.sh [new file with mode: 0755]
zcutil/build-mac.sh [new file with mode: 0755]

index 2b584b0392435af1fc5d71fad54f2d50cc5da3e9..ae25c23a9d439d68a8e4408274d4adc3f24a8a5f 100644 (file)
@@ -42,8 +42,8 @@ OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) $
 COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
   leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
   baseline_filtered.info block_test_filtered.info \
-  leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info \
-  zcash-gtest.info zcash-gtest_filtered.info zcash-gtest_coverage.info
+  leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info
+#  zcash-gtest.info zcash-gtest_filtered.info zcash-gtest_coverage.info
 
 dist-hook:
        -$(MAKE) -C $(top_distdir)/src/leveldb clean
@@ -155,8 +155,6 @@ baseline_filtered.info: baseline.info
                       "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
                       "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
                       "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
-                      "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
-                      "$(abs_builddir)/src/gtest/*" \
                       "$(abs_builddir)/src/test/*" \
                       -o $@
 
@@ -168,8 +166,6 @@ leveldb_baseline_filtered.info: leveldb_baseline.info
                       "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
                       "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
                       "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
-                      "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
-                      "$(abs_builddir)/src/gtest/*" \
                       "$(abs_builddir)/src/test/*" \
                       -o $@
 
@@ -187,26 +183,9 @@ test_bitcoin_filtered.info: test_bitcoin.info
                       "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
                       "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
                       "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
-                      "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
-                      "$(abs_builddir)/src/gtest/*" \
                       "$(abs_builddir)/src/test/*" \
                       -o $@
 
-zcash-gtest.info: baseline_filtered_combined.info
-       $(MAKE) -C src/ zcash-gtest_check
-       $(LCOV) -c -d $(abs_builddir)/src -t zcash-gtest -o $@
-       $(LCOV) -z -d $(abs_builddir)/src
-       $(LCOV) -z -d $(abs_builddir)/src/leveldb
-
-zcash-gtest_filtered.info: zcash-gtest.info
-       $(LCOV) -r $< "/usr/include/*" \
-                      "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
-                      "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
-                      "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
-                      "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
-                      "$(abs_builddir)/src/gtest/*" \
-                      "$(abs_builddir)/src/test/*" \
-                      -o $@
 
 block_test.info: test_bitcoin_filtered.info
        $(MKDIR_P) qa/tmp
@@ -220,35 +199,24 @@ block_test_filtered.info: block_test.info
                       "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
                       "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
                       "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
-                      "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
-                      "$(abs_builddir)/src/gtest/*" \
                       "$(abs_builddir)/src/test/*" \
                       -o $@
 
 test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info
-       $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@
+       $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@
 
-zcash-gtest_coverage.info: baseline_filtered_combined.info zcash-gtest_filtered.info
-       $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a zcash-gtest_filtered.info -o $@
-
-total_coverage.info:  baseline_filtered_combined.info test_bitcoin_filtered.info zcash-gtest_filtered.info block_test_filtered.info
-       $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a zcash-gtest_filtered.info -a block_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
+total_coverage.info:  baseline_filtered_combined.info test_bitcoin_filtered.info block_test_filtered.info
+       $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a block_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
 
 test_bitcoin.coverage/.dirstamp:  test_bitcoin_coverage.info
-       $(GENHTML) -s $< -o $(@D)
-       @touch $@
-
-zcash-gtest.coverage/.dirstamp:  zcash-gtest_coverage.info
-       $(GENHTML) -s $< -o $(@D)
-       @touch $@
-
-cov-zcash: zcash-gtest.coverage/.dirstamp
+       $(GENHTML) -s $< -o $(@D)
+       @touch $@
 
 total.coverage/.dirstamp: total_coverage.info
-       $(GENHTML) -s $< -o $(@D)
-       @touch $@
+       $(GENHTML) -s $< -o $(@D)
+       @touch $@
 
-cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp
+cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp
 
 endif
 
diff --git a/README-mac.md b/README-mac.md
new file mode 100644 (file)
index 0000000..f6b6f8a
--- /dev/null
@@ -0,0 +1,32 @@
+First off you need Apple's Xcode (at least version 7, preferably 8.x) and the Xcode Command Line Tools:
+
+https://itunes.apple.com/us/app/xcode/id497799835?mt=12
+
+And Homebrew:
+
+http://brew.sh/
+
+And this is the list of brew packages you'll need installed:
+
+```shell
+brew tap discoteq/discoteq; brew install flock
+brew install autoconf autogen automake
+brew tap homebrew/versions; brew install homebrew/versions/gcc5
+brew install binutils
+brew install protobuf
+brew install coreutils
+brew install wget
+```
+
+Get all that installed, then run:
+
+```shell
+git clone https://github.com/j-cimb-barker/komodo.git
+cd komodo
+git checkout dev
+./zcutil/build-mac.sh
+```
+When you are done building, you need to do a few things in the [Configuration](https://github.com/zcash/zcash/wiki/1.0-User-Guide#configuration) section of the Zcash User Guide differently because we are on the Mac. All instances of `~/.zcash` need to be replaced by `~/Library/Application\ Support/Zcash` 
+The fetch-params.sh script, however, has already been altered to fetch the proving keys into the correct directory to conform to Mac specific naming conventions.
+
+Happy Building
index 3a6ce27540e7da4c13e98b5214781109eddac75a..379de1a2d3b80cf4430a10dfefbe78cb78e83179 100644 (file)
@@ -124,7 +124,7 @@ AC_ARG_ENABLE([hardening],
   [AS_HELP_STRING([--enable-hardening],
   [attempt to harden the resulting executables (default is yes)])],
   [use_hardening=$enableval],
-  [use_hardening=yes])
+  [use_hardening=no])
 
 AC_ARG_ENABLE([reduce-exports],
   [AS_HELP_STRING([--enable-reduce-exports],
@@ -276,30 +276,30 @@ case $host in
          fi
        fi
 
-       AC_CHECK_PROG([BREW],brew, brew)
-       if test x$BREW = xbrew; then
+dnl       AC_CHECK_PROG([BREW],brew, brew)
+dnl       if test x$BREW = xbrew; then
          dnl These Homebrew packages may be keg-only, meaning that they won't be found
          dnl in expected paths because they may conflict with system files. Ask
          dnl Homebrew where each one is located, then adjust paths accordingly.
          dnl It's safe to add these paths even if the functionality is disabled by
          dnl the user (--without-wallet or --without-gui for example).
 
-         openssl_prefix=`$BREW --prefix openssl 2>/dev/null`
-         bdb_prefix=`$BREW --prefix berkeley-db4 2>/dev/null`
-         qt5_prefix=`$BREW --prefix qt5 2>/dev/null`
-         if test x$openssl_prefix != x; then
-           PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
-           export PKG_CONFIG_PATH
-         fi
-         if test x$bdb_prefix != x; then
-           CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
-           LIBS="$LIBS -L$bdb_prefix/lib"
-         fi
-         if test x$qt5_prefix != x; then
-           PKG_CONFIG_PATH="$qt5_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
-           export PKG_CONFIG_PATH
-         fi
-       fi
+dnl         openssl_prefix=`$BREW --prefix openssl 2>/dev/null`
+dnl         bdb_prefix=`$BREW --prefix berkeley-db4 2>/dev/null`
+dnl         qt5_prefix=`$BREW --prefix qt5 2>/dev/null`
+dnl         if test x$openssl_prefix != x; then
+dnl           PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
+dnl           export PKG_CONFIG_PATH
+dnl         fi
+dnl         if test x$bdb_prefix != x; then
+dnl           CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
+dnl           LIBS="$LIBS -L$bdb_prefix/lib"
+dnl         fi
+dnl         if test x$qt5_prefix != x; then
+dnl           PKG_CONFIG_PATH="$qt5_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
+dnl           export PKG_CONFIG_PATH
+dnl         fi
+dnl       fi
      else
        case $build_os in
          *darwin*)
@@ -730,7 +730,7 @@ CPPFLAGS="-I$LIBSNARK_INCDIR $CPPFLAGS"
 AC_CHECK_HEADER([libsnark/gadgetlib1/gadget.hpp],,AC_MSG_ERROR(libsnark headers missing))
 AC_CHECK_LIB([snark],[main],LIBSNARK_LIBS=-lsnark, [AC_MSG_ERROR(libsnark missing)], [-lgmpxx])
 
-LIBZCASH_LIBS="-lsnark -lgmp -lgmpxx -lboost_system-mt -lcrypto -lsodium -fopenmp"
+LIBZCASH_LIBS="-lsnark -lgmp -lgmpxx -lboost_system-mt -lcrypto -lsodium"
 
 CXXFLAGS_TEMP="$CXXFLAGS"
 LIBS_TEMP="$LIBS"
index b366460e64bc14e4971f5006e4cdfde7de3237a4..af60fa8ea300b2d54f98788bcb32b3bc8bde3c31 100644 (file)
@@ -1,5 +1,5 @@
-build_darwin_CC: = $(shell xcrun -f clang)
-build_darwin_CXX: = $(shell xcrun -f clang++)
+build_darwin_CC = gcc-5
+build_darwin_CXX = g++-5
 build_darwin_AR: = $(shell xcrun -f ar)
 build_darwin_RANLIB: = $(shell xcrun -f ranlib)
 build_darwin_STRIP: = $(shell xcrun -f strip)
@@ -7,11 +7,11 @@ build_darwin_OTOOL: = $(shell xcrun -f otool)
 build_darwin_NM: = $(shell xcrun -f nm)
 build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
 build_darwin_SHA256SUM = shasum -a 256
-build_darwin_DOWNLOAD = curl --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -L -o
+build_darwin_DOWNLOAD = wget --timeout=$(DOWNLOAD_CONNECT_TIMEOUT) --tries=$(DOWNLOAD_RETRIES) -nv -O
 
 #darwin host on darwin builder. overrides darwin host preferences.
-darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION)
-darwin_CXX:=$(shell xcrun -f clang++) -mmacosx-version-min=$(OSX_MIN_VERSION)
+darwin_CC= gcc-5
+darwin_CXX= g++-5
 darwin_AR:=$(shell xcrun -f ar)
 darwin_RANLIB:=$(shell xcrun -f ranlib)
 darwin_STRIP:=$(shell xcrun -f strip)
index 2958dc50cc8dc2995bfe81a3ab67050a63488001..52c0003e41b836edf0b12f902595d441c055defc 100644 (file)
@@ -2,8 +2,8 @@ OSX_MIN_VERSION=10.7
 OSX_SDK_VERSION=10.9
 OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk
 LD64_VERSION=241.9
-darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION)
-darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION)
+darwin_CC=gcc-5 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION)
+darwin_CXX=g++-5 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION)
 
 darwin_CFLAGS=-pipe
 darwin_CXXFLAGS=$(darwin_CFLAGS)
index 7303821bedfcb47c9fa272f7f5fef92599e6bce6..a2e8201637e6566c56811e4ba7adc5460578d669 100644 (file)
@@ -11,15 +11,14 @@ $(package)_config_opts_debug=variant=debug
 $(package)_config_opts=--layout=tagged --build-type=complete --user-config=user-config.jam
 $(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
 $(package)_config_opts_linux=threadapi=pthread runtime-link=shared
-$(package)_config_opts_darwin=--toolset=darwin-4.2.1 runtime-link=shared
+$(package)_config_opts_darwin=--toolset=gcc threadapi=pthread runtime-link=shared
 $(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static
 $(package)_config_opts_x86_64_mingw32=address-model=64
 $(package)_config_opts_i686_mingw32=address-model=32
 $(package)_config_opts_i686_linux=address-model=32 architecture=x86
 $(package)_toolset_$(host_os)=gcc
 $(package)_archiver_$(host_os)=$($(package)_ar)
-$(package)_toolset_darwin=darwin
-$(package)_archiver_darwin=$($(package)_libtool)
+$(package)_toolset_darwin=gcc
 $(package)_config_libraries=chrono,filesystem,program_options,system,thread,test
 $(package)_cxxflags=-fvisibility=hidden
 $(package)_cxxflags_linux=-fPIC
@@ -36,9 +35,9 @@ define $(package)_config_cmds
 endef
 
 define $(package)_build_cmds
-  ./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage
+  ./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) cxxflags=-std=c++11 stage
 endef
 
 define $(package)_stage_cmds
-  ./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install
+  ./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) cxxflags=-std=c++11 install
 endef
diff --git a/depends/packages/googlemock.mk b/depends/packages/googlemock.mk
deleted file mode 100644 (file)
index 229dc35..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# url=https://github.com/google/googlemock/archive/release-1.7.0.tar.gz
-
-package=googlemock
-$(package)_version=1.7.0
-$(package)_dependencies=googletest
-
-$(package)_download_path=https://github.com/google/$(package)/archive/
-$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_download_file=release-$($(package)_version).tar.gz
-$(package)_sha256_hash=3f20b6acb37e5a98e8c4518165711e3e35d47deb6cdb5a4dd4566563b5efd232
-
-define $(package)_build_cmds
-  $(MAKE) -C make GTEST_DIR='$(host_prefix)' CXXFLAGS='-fPIC' gmock-all.o
-endef
-
-
-define $(package)_stage_cmds
-  install -D ./make/gmock-all.o $($(package)_staging_dir)$(host_prefix)/lib/libgmock.a && \
-  cp -a ./include $($(package)_staging_dir)$(host_prefix)/include
-endef
diff --git a/depends/packages/googletest.mk b/depends/packages/googletest.mk
deleted file mode 100644 (file)
index 5133e64..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-package=googletest
-$(package)_version=1.7.0
-$(package)_download_path=https://github.com/google/$(package)/archive/
-$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_download_file=release-$($(package)_version).tar.gz
-$(package)_sha256_hash=f73a6546fdf9fce9ff93a5015e0333a8af3062a152a9ad6bcb772c96687016cc
-
-define $(package)_build_cmds
-  $(MAKE) -C make CXXFLAGS=-fPIC gtest.a
-endef
-
-define $(package)_stage_cmds
-  install -D ./make/gtest.a $($(package)_staging_dir)$(host_prefix)/lib/libgtest.a && \
-  cp -a ./include $($(package)_staging_dir)$(host_prefix)/include
-endef
index 60e535b3147b31544c107acb10c57f4552293111..a5df331b0769dce031749f1367609ad50b0bd6c3 100644 (file)
@@ -1,15 +1,15 @@
 package=libsnark
 $(package)_version=0.1
-$(package)_download_path=https://github.com/zcash/$(package)/archive/
+$(package)_download_path=https://github.com/radix42/$(package)/archive/
 $(package)_file_name=$(package)-$($(package)_git_commit).tar.gz
 $(package)_download_file=$($(package)_git_commit).tar.gz
-$(package)_sha256_hash=9422b1a2a94e6b8be61f07af7f146087c2a7d70b208d07ad076622225aa7f0e4
-$(package)_git_commit=2e6314a9f7efcd9af1c77669d7d9a229df86a777
+$(package)_sha256_hash=9dbd5b44d3443e86463e934bfe1023cab4ca5948f8d74c23a67d9535c28d2584
+$(package)_git_commit=9be18569b8abcda1245c3912877075259599c0f1
 
 $(package)_dependencies=libgmp libsodium
 
 define $(package)_build_cmds
-  CXXFLAGS="-fPIC -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1" $(MAKE) lib DEPINST=$(host_prefix) CURVE=ALT_BN128 MULTICORE=1 NO_PROCPS=1 NO_GTEST=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT OPTFLAGS="-O2 -march=x86-64"
+CC=gcc-5 CXX=g++-5 CXXFLAGS="-arch x86_64 -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1" $(MAKE) lib DEPINST=$(host_prefix) CURVE=ALT_BN128 MULTICORE=0 NO_PROCPS=1 NO_GTEST=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT
 endef
 
 define $(package)_stage_cmds
index babc1598bcf0b148ac790986b79705c4f5710d50..2d638825ddf3b3e9aa68442ce7c514e26791df7b 100644 (file)
@@ -1,5 +1,5 @@
 zcash_packages := libsnark libgmp libsodium
-packages := boost openssl $(zcash_packages) googletest googlemock
+packages := boost openssl $(zcash_packages)
 native_packages := native_ccache
 
 wallet_packages=bdb
index bc2437e17946039691354a963a433294d09f5991..784f520d1a7fb0d1dd4ca3db5013af4819ab12ef 100644 (file)
 
 #include <boost/optional.hpp>
 
+#ifdef __APPLE__
+#include <machine/endian.h>
+#include <libkern/OSByteOrder.h>
+
+#define htobe16(x) OSSwapHostToBigInt16(x)
+#define htole16(x) OSSwapHostToLittleInt16(x)
+#define be16toh(x) OSSwapBigToHostInt16(x)
+#define le16toh(x) OSSwapLittleToHostInt16(x)
+
+#define htobe32(x) OSSwapHostToBigInt32(x)
+#define htole32(x) OSSwapHostToLittleInt32(x)
+#define be32toh(x) OSSwapBigToHostInt32(x)
+#define le32toh(x) OSSwapLittleToHostInt32(x)
+
+#define htobe64(x) OSSwapHostToBigInt64(x)
+#define htole64(x) OSSwapHostToLittleInt64(x)
+#define be64toh(x) OSSwapBigToHostInt64(x)
+#define le64toh(x) OSSwapLittleToHostInt64(x)
+
+#define __BIG_ENDIAN    BIG_ENDIAN
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#define __BYTE_ORDER    BYTE_ORDER
+#else
+#include 
+#include 
+#endif
+
 EhSolverCancelledException solver_cancelled;
 
 template<unsigned int N, unsigned int K>
diff --git a/toolchain-info.sh b/toolchain-info.sh
new file mode 100755 (executable)
index 0000000..3322755
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+tools=("gcc-5" "g++-5" "otool" "nm")
+
+echo "Platform: `uname -a`"
+echo "-------------------------------------"
+echo "Tool info:"
+echo
+for tool in "${tools[@]}"
+do
+    echo "$tool location: `which $tool`"
+    echo "$tool version: `$tool --version`"
+    echo
+    echo "-------"
+    echo
+done
diff --git a/zcutil/build-mac.sh b/zcutil/build-mac.sh
new file mode 100755 (executable)
index 0000000..e503d09
--- /dev/null
@@ -0,0 +1,50 @@
+#!/bin/bash
+export CC=gcc-5
+export CXX=g++-5
+export LIBTOOL=libtool
+export AR=ar
+export RANLIB=ranlib
+export STRIP=strip
+export OTOOL=otool
+export NM=nm
+
+set -eu -o pipefail
+
+if [ "x$*" = 'x--help' ]
+then
+    cat <<EOF
+Usage:
+
+$0 --help
+  Show this help message and exit.
+
+$0 [ --enable-lcov ] [ MAKEARGS... ]
+  Build Zcash and most of its transitive dependencies from
+  source. MAKEARGS are applied to both dependencies and Zcash itself. If
+  --enable-lcov is passed, Zcash is configured to add coverage
+  instrumentation, thus enabling "make cov" to work.
+EOF
+    exit 0
+fi
+
+# If --enable-lcov is the first argument, enable lcov coverage support:
+LCOV_ARG=''
+HARDENING_ARG='--disable-hardening'
+if [ "x${1:-}" = 'x--enable-lcov' ]
+then
+    LCOV_ARG='--enable-lcov'
+    HARDENING_ARG='--disable-hardening'
+    shift
+fi
+
+TRIPLET=`./depends/config.guess`
+PREFIX="$(pwd)/depends/$TRIPLET"
+
+make "$@" -C ./depends/ V=1 NO_QT=1
+
+./autogen.sh
+CPPFLAGS="-I$PREFIX/include -arch x86_64" LDFLAGS="-L$PREFIX/lib -arch x86_64 -Wl,-no_pie -fopenmp" \
+CXXFLAGS='-arch x86_64 -I/usr/local/Cellar/gcc5/5.4.0/include/c++/5.4.0 -I$PREFIX/include -fwrapv -fno-strict-aliasing -Werror -g -Wl,-undefined -Wl,dynamic_lookup' \
+./configure --prefix="${PREFIX}" --with-gui=no "$HARDENING_ARG" "$LCOV_ARG"
+
+make "$@" V=1 NO_GTEST=1 STATIC=1
This page took 0.04999 seconds and 4 git commands to generate.