1#!/bin/bash
2
3product=$1
4
5MAKE=make
6if command -v python > /dev/null ; then
7  MAKE="make -j $(python -c 'import multiprocessing as mp; print(int(mp.cpu_count()))')"
8fi
9
10echo $MAKE
11
12rm -rf sdk_build
13mkdir sdk_build
14cd sdk_build
15cmake -DBUILD_PRODUCT="$product" -DBUILD_FUNCTION_TESTS=OFF -DBUILD_UNIT_TESTS=OFF -DENABLE_COVERAGE=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
16$MAKE
17
18make install
19