blob: e5341c3e29ff6e7b7ac5723bee6c3167df39117f [file] [log] [blame]
Andrew Rossignolc5ba98d2017-02-28 18:31:01 -08001#!/bin/bash
2
3# Quit if any command produces an error.
4set -e
5
6# Build and run the CHRE simulator.
Andrew Rossignolb97643e2017-10-10 16:22:52 -07007CHRE_HOST_OS=`uname`
8if [[ $CHRE_HOST_OS == 'Darwin' ]]; then
9JOB_COUNT=`sysctl -n hw.ncpu`
10else
Andrew Rossignol879b2242017-05-01 11:22:01 -070011JOB_COUNT=$((`grep -c ^processor /proc/cpuinfo`))
Andrew Rossignolb97643e2017-10-10 16:22:52 -070012fi
Andrew Rossignol879b2242017-05-01 11:22:01 -070013
Andrew Rossignol9904d2c2017-06-05 14:54:42 -070014# Export the variant Makefile.
15export CHRE_VARIANT_MK_INCLUDES=variant/simulator/variant.mk
16
Andrew Rossignol879b2242017-05-01 11:22:01 -070017make google_x86_linux_debug -j$JOB_COUNT
Andrew Rossignolfc4d3542017-08-29 16:16:33 -070018./out/google_x86_linux_debug/libchre ${@:1}