Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
litecoincash-project
GitHub Repository: litecoincash-project/cpuminer-multi
Path: blob/master/build.sh
548 views
1
#!/bin/bash
2
3
make clean || echo clean
4
5
rm -f config.status
6
./autogen.sh
7
8
if [[ "$OSTYPE" == "darwin"* ]]; then
9
./nomacro.pl
10
./configure \
11
CFLAGS="-march=native -O2 -Ofast -flto -DUSE_ASM -pg" \
12
--with-crypto=/usr/local/opt/openssl \
13
--with-curl=/usr/local/opt/curl
14
make -j4
15
strip cpuminer
16
exit 0
17
fi
18
19
# Linux build
20
21
# Ubuntu 10.04 (gcc 4.4)
22
# extracflags="-O3 -march=native -Wall -D_REENTRANT -funroll-loops -fvariable-expansion-in-unroller -fmerge-all-constants -fbranch-target-load-optimize2 -fsched2-use-superblocks -falign-loops=16 -falign-functions=16 -falign-jumps=16 -falign-labels=16"
23
24
# Debian 7.7 / Ubuntu 14.04 (gcc 4.7+)
25
extracflags="$extracflags -Ofast -flto -fuse-linker-plugin -ftree-loop-if-convert-stores"
26
27
if [ ! "0" = `cat /proc/cpuinfo | grep -c avx` ]; then
28
# march native doesn't always works, ex. some Pentium Gxxx (no avx)
29
extracflags="$extracflags -march=native"
30
fi
31
32
./configure --with-crypto --with-curl CFLAGS="-O2 $extracflags -DUSE_ASM -pg"
33
34
make -j 4
35
36
strip -s cpuminer
37
38