annotate Resources/holy-build-box-internal.sh @ 0:520cba9a0d42

initial commit
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 13 Jun 2019 14:57:22 +0200
parents
children 39bdff8f0247
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 #!/bin/bash
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 set -e
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 # Activate Holy Build Box environment.
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 source /hbb_exe/activate
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 set -x
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 mkdir /build
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 cd /build
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 # Holy Build Box defines LDFLAGS as "-L/hbb_exe/lib
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 # -static-libstdc++". The "-L/hbb_exe/lib" option results in linking
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 # errors "undefined reference" to `std::__once_callable',
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 # 'std::__once_call' and '__once_proxy'.
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 export LDFLAGS=-static-libstdc++
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 unset LDPATHFLAGS
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 unset SHLIB_LDFLAGS
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 unset LD_LIBRARY_PATH
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 unset LIBRARY_PATH
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 cp -r /source /source-writeable
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 cmake /source-writeable \
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 -DCMAKE_BUILD_TYPE=Release -DSTATIC_BUILD=ON \
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 -DORTHANC_FRAMEWORK_SOURCE=web \
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 -DCMAKE_INSTALL_PREFIX=/target
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 make -j`nproc`
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
520cba9a0d42 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 make install