2013-10-31 16:08:01 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
cd $(dirname $0)
|
|
|
|
|
2014-10-26 08:06:30 +01:00
|
|
|
usage()
|
|
|
|
{
|
|
|
|
echo "$0 [-c | --codecov] [-f | --force-config]"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2014-10-26 08:06:28 +01:00
|
|
|
use_lcov=0
|
2014-10-26 08:06:29 +01:00
|
|
|
force_config=0
|
2014-10-26 08:06:28 +01:00
|
|
|
while [ "$1" != "" ]; do
|
|
|
|
case $1 in
|
|
|
|
-c | --codecov ) shift
|
|
|
|
echo "$0: use code coverage specified"
|
|
|
|
use_lcov=1
|
|
|
|
;;
|
2014-10-26 08:06:29 +01:00
|
|
|
-f | --force-config ) shift
|
|
|
|
force_config=1
|
|
|
|
echo "$0: force copy config specified"
|
|
|
|
;;
|
2014-10-26 08:06:30 +01:00
|
|
|
* ) usage
|
2014-10-26 08:06:28 +01:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2020-12-04 10:49:04 +01:00
|
|
|
JOBS=`nproc`
|
|
|
|
if [ -z "$ABC" ]; then
|
|
|
|
JOBS=8
|
|
|
|
fi
|
|
|
|
|
2014-12-26 11:51:54 +01:00
|
|
|
echo "Building TNC testing tools"
|
|
|
|
cd tnc
|
2020-12-04 10:49:04 +01:00
|
|
|
make QUIET=1 -j$JOBS
|
2014-12-26 11:51:54 +01:00
|
|
|
|
|
|
|
echo "Building wlantest"
|
|
|
|
cd ../../../wlantest
|
2020-12-04 10:49:04 +01:00
|
|
|
make QUIET=1 -j$JOBS > /dev/null
|
2014-12-26 11:51:54 +01:00
|
|
|
|
2019-02-02 23:16:05 +01:00
|
|
|
echo "Building hs20-osu-client"
|
|
|
|
cd ../hs20/client/
|
|
|
|
make QUIET=1 CONFIG_NO_BROWSER=1
|
|
|
|
|
2014-12-26 11:51:54 +01:00
|
|
|
echo "Building hostapd"
|
2019-02-02 23:16:05 +01:00
|
|
|
cd ../../hostapd
|
2014-10-26 08:06:29 +01:00
|
|
|
if [ ! -e .config -o $force_config -eq 1 ]; then
|
2020-10-11 11:04:38 +02:00
|
|
|
if ! cmp ../tests/hwsim/example-hostapd.config .config >/dev/null 2>&1 ; then
|
|
|
|
cp ../tests/hwsim/example-hostapd.config .config
|
|
|
|
fi
|
2014-10-26 08:06:28 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $use_lcov -eq 1 ]; then
|
|
|
|
if ! grep -q CONFIG_CODE_COVERAGE .config; then
|
|
|
|
echo CONFIG_CODE_COVERAGE=y >> .config
|
|
|
|
else
|
2014-12-26 11:51:54 +01:00
|
|
|
echo "CONFIG_CODE_COVERAGE already exists in hostapd/.config. Ignore"
|
2014-10-26 08:06:28 +01:00
|
|
|
fi
|
2013-11-09 14:40:06 +01:00
|
|
|
fi
|
2014-10-26 08:06:28 +01:00
|
|
|
|
2020-12-04 10:49:04 +01:00
|
|
|
make QUIET=1 -j$JOBS hostapd hostapd_cli hlr_auc_gw
|
2014-10-26 08:06:28 +01:00
|
|
|
|
2014-12-26 11:51:54 +01:00
|
|
|
echo "Building wpa_supplicant"
|
|
|
|
cd ../wpa_supplicant
|
2014-10-26 08:06:29 +01:00
|
|
|
if [ ! -e .config -o $force_config -eq 1 ]; then
|
2020-10-11 11:04:38 +02:00
|
|
|
if ! cmp ../tests/hwsim/example-wpa_supplicant.config .config >/dev/null 2>&1 ; then
|
|
|
|
cp ../tests/hwsim/example-wpa_supplicant.config .config
|
|
|
|
fi
|
2014-10-26 08:06:28 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $use_lcov -eq 1 ]; then
|
|
|
|
if ! grep -q CONFIG_CODE_COVERAGE .config; then
|
|
|
|
echo CONFIG_CODE_COVERAGE=y >> .config
|
|
|
|
else
|
2014-12-26 11:51:54 +01:00
|
|
|
echo "CONFIG_CODE_COVERAGE already exists in wpa_supplicant/.config. Ignore"
|
2014-10-26 08:06:28 +01:00
|
|
|
fi
|
2013-11-09 14:40:06 +01:00
|
|
|
fi
|
2014-10-26 08:06:28 +01:00
|
|
|
|
2015-08-01 15:39:41 +02:00
|
|
|
if [ -z $FIPSLD_CC ]; then
|
|
|
|
export FIPSLD_CC=gcc
|
|
|
|
fi
|
2020-12-04 10:49:04 +01:00
|
|
|
make QUIET=1 -j$JOBS
|