]>
Commit | Line | Data |
---|---|---|
e891d64b | 1 | #!/bin/bash |
ba278b61 AD |
2 | export CC=gcc-8 |
3 | export CXX=g++-8 | |
e891d64b JB |
4 | export LIBTOOL=libtool |
5 | export AR=ar | |
6 | export RANLIB=ranlib | |
7 | export STRIP=strip | |
8 | export OTOOL=otool | |
9 | export NM=nm | |
10 | ||
11 | set -eu -o pipefail | |
12 | ||
13 | if [ "x$*" = 'x--help' ] | |
14 | then | |
15 | cat <<EOF | |
16 | Usage: | |
17 | ||
18 | $0 --help | |
19 | Show this help message and exit. | |
20 | ||
21 | $0 [ --enable-lcov ] [ MAKEARGS... ] | |
22 | Build Zcash and most of its transitive dependencies from | |
23 | source. MAKEARGS are applied to both dependencies and Zcash itself. If | |
24 | --enable-lcov is passed, Zcash is configured to add coverage | |
25 | instrumentation, thus enabling "make cov" to work. | |
26 | EOF | |
27 | exit 0 | |
28 | fi | |
29 | ||
30 | # If --enable-lcov is the first argument, enable lcov coverage support: | |
31 | LCOV_ARG='' | |
32 | HARDENING_ARG='--disable-hardening' | |
33 | if [ "x${1:-}" = 'x--enable-lcov' ] | |
34 | then | |
35 | LCOV_ARG='--enable-lcov' | |
36 | HARDENING_ARG='--disable-hardening' | |
37 | shift | |
38 | fi | |
39 | ||
40 | TRIPLET=`./depends/config.guess` | |
41 | PREFIX="$(pwd)/depends/$TRIPLET" | |
42 | ||
a59295a2 | 43 | make "$@" -C ./depends/ V=1 NO_QT=1 NO_PROTON=1 |
e891d64b JB |
44 | |
45 | ./autogen.sh | |
11793048 | 46 | CPPFLAGS="-I$PREFIX/include -arch x86_64" LDFLAGS="-L$PREFIX/lib -arch x86_64 -Wl,-no_pie -g" \ |
e9250604 | 47 | CXXFLAGS='-arch x86_64 -I/usr/local/Cellar/gcc\@8/8.4.0_1/include/c++/8.4.0/ -I$PREFIX/include -I$PREFIX/lib -fwrapv -fno-strict-aliasing -Werror -g -Wl,-undefined -Wl,dynamic_lookup -g' \ |
e891d64b JB |
48 | ./configure --prefix="${PREFIX}" --with-gui=no "$HARDENING_ARG" "$LCOV_ARG" |
49 | ||
50 | make "$@" V=1 NO_GTEST=1 STATIC=1 |