-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·41 lines (36 loc) · 922 Bytes
/
build.sh
File metadata and controls
executable file
·41 lines (36 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
if [ $# -lt 1 ]; then
printf "Usage:"
printf " $0 <PATH_TO_BUILDROOT>\n"
exit
fi
BASE_DIR=$(readlink -f $1)
TARGET_DIR=${BASE_DIR}/output/target
HOST_DIR=${BASE_DIR}/output/host
GWT_COMPILER_DIR=${HOST_DIR}/$(ls ${HOST_DIR} | grep gwt | sort -n | tail -n1)
if [[ -z $GWT_COMPILER_DIR ]];
then
echo "no GWT Compiler found!"
exit 2
fi
mkdir -p build
cd build
${HOST_DIR}/usr/bin/cmake \
-DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=${HOST_DIR} \
-DCMAKE_PREFIX_PATH=${HOST_DIR} \
-DCMAKE_TOOLCHAIN_FILE="${HOST_DIR}/usr/share/buildroot/toolchainfile.cmake" \
-DCMAKE_COLOR_MAKEFILE=OFF \
-DBUILD_DOC=OFF \
-DBUILD_DOCS=OFF \
-DBUILD_EXAMPLE=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TEST=OFF \
-DBUILD_TESTS=OFF \
-DBUILD_TESTING=OFF \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${TARGET_DIR}" \
-DJARSDIR="${GWT_COMPILER_DIR}" \
.. && \
make -j8 && \
make install