• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2function run() {
3  echo "Running: $@"
4  $@
5}
6
7function error() {
8  echo "Error: $@"
9  exit 1
10}
11
12SCRIPT_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
13BUILD_DIR=$SCRIPT_DIR/build
14INSTALL_DIR=$SCRIPT_DIR/install
15CC=/usr/bin/clang
16CXX=/usr/bin/clang++
17
18run rm -rf $BUILD_DIR $INSTALL_DIR
19run mkdir $BUILD_DIR
20(
21  run cd $BUILD_DIR &&
22  cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DAEMU_COMMON_GEN_PKGCONFIG=ON -DAEMU_COMMON_BUILD_CONFIG=gfxstream -DENABLE_VKCEREAL_TESTS=OFF . ../ &&
23  make -j &&
24  make install
25) || error "Build failed!"
26
27echo "Successfully built and installed to $INSTALL_DIR."
28