summaryrefslogtreecommitdiff
path: root/scripts/make-ll
blob: 1630690c9ea6770ee50f3b35dfcd1a99661c8817 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

#
# Copyright (c) 2014-2015 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#

[ x$(which grep) = x ] && exit -1

num_cpus=$(\grep -c "^processor" /proc/cpuinfo)

if [ x${ZEPHYR_JOBS} = x ]; then
	ZEPHYR_JOBS=$((${num_cpus} * 2 + 1))
fi

echo Using $ZEPHYR_JOBS threads
nice make --jobs=${ZEPHYR_JOBS} --load-average=${num_cpus} $@