2013-10-31 11:08:01 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
cd $(dirname $0)
|
|
|
|
|
2014-10-26 03:06:30 -04:00
|
|
|
usage()
|
|
|
|
{
|
|
|
|
echo "$0 [-c | --codecov] [-f | --force-config]"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2014-10-26 03:06:28 -04:00
|
|
|
use_lcov=0
|
2014-10-26 03:06:29 -04:00
|
|
|
force_config=0
|
2014-10-26 03:06:28 -04:00
|
|
|
while [ "$1" != "" ]; do
|
|
|
|
case $1 in
|
|
|
|
-c | --codecov ) shift
|
|
|
|
echo "$0: use code coverage specified"
|
|
|
|
use_lcov=1
|
|
|
|
;;
|
2014-10-26 03:06:29 -04:00
|
|
|
-f | --force-config ) shift
|
|
|
|
force_config=1
|
|
|
|
echo "$0: force copy config specified"
|
|
|
|
;;
|
2014-10-26 03:06:30 -04:00
|
|
|
* ) usage
|
2014-10-26 03:06:28 -04:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2014-12-26 05:49:36 -05:00
|
|
|
echo "Building wpa_supplicant"
|
2013-10-31 11:08:01 -04:00
|
|
|
cd ../../wpa_supplicant
|
2014-10-26 03:06:29 -04:00
|
|
|
if [ ! -e .config -o $force_config -eq 1 ]; then
|
2013-11-09 08:40:06 -05:00
|
|
|
cp ../tests/hwsim/example-wpa_supplicant.config .config
|
2014-10-26 03:06:28 -04:00
|
|
|
else
|
|
|
|
echo "wpa_supplicant config file exists"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $use_lcov -eq 1 ]; then
|
|
|
|
if ! grep -q CONFIG_CODE_COVERAGE .config; then
|
|
|
|
echo CONFIG_CODE_COVERAGE=y >> .config
|
|
|
|
else
|
|
|
|
echo "CONFIG_CODE_COVERAGE already exists in wpa_supplicant/.config. Ignore"
|
|
|
|
fi
|
2013-11-09 08:40:06 -05:00
|
|
|
fi
|
2014-10-26 03:06:28 -04:00
|
|
|
|
2014-12-26 05:49:36 -05:00
|
|
|
make clean > /dev/null
|
|
|
|
make QUIET=1 -j8
|
2014-10-26 03:06:28 -04:00
|
|
|
|
2014-12-26 05:49:36 -05:00
|
|
|
echo "Building hostapd"
|
2013-10-31 11:08:01 -04:00
|
|
|
cd ../hostapd
|
2014-10-26 03:06:29 -04:00
|
|
|
if [ ! -e .config -o $force_config -eq 1 ]; then
|
2013-11-09 08:40:06 -05:00
|
|
|
cp ../tests/hwsim/example-hostapd.config .config
|
2014-10-26 03:06:28 -04:00
|
|
|
else
|
|
|
|
echo "hostapd config file exists"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $use_lcov -eq 1 ]; then
|
|
|
|
if ! grep -q CONFIG_CODE_COVERAGE .config; then
|
|
|
|
echo CONFIG_CODE_COVERAGE=y >> .config
|
|
|
|
else
|
|
|
|
echo "CONFIG_CODE_COVERAGE already exists in hostapd/.config. Ignore"
|
|
|
|
fi
|
2013-11-09 08:40:06 -05:00
|
|
|
fi
|
2014-10-26 03:06:28 -04:00
|
|
|
|
2014-12-26 05:49:36 -05:00
|
|
|
make clean > /dev/null
|
|
|
|
make QUIET=1 -j8 hostapd hostapd_cli hlr_auc_gw
|
|
|
|
|
|
|
|
echo "Building wlantest"
|
2013-10-31 11:08:01 -04:00
|
|
|
cd ../wlantest
|
2014-12-26 05:49:36 -05:00
|
|
|
make clean > /dev/null
|
|
|
|
make QUIET=1 -j8 > /dev/null
|
|
|
|
|
|
|
|
echo "Building TNC testing tools"
|
2014-11-27 07:04:51 -05:00
|
|
|
cd ../tests/hwsim/tnc
|
2014-12-26 05:49:36 -05:00
|
|
|
make clean > /dev/null
|
|
|
|
make QUIET=1 -j8
|
2014-05-16 17:47:37 -04:00
|
|
|
cd ..
|