51 lines
1.5 KiB
Bash
51 lines
1.5 KiB
Bash
#!/bin/bash
|
|
|
|
root="../.."
|
|
|
|
case `uname` in
|
|
Linux )
|
|
for sat in 'gear_core' 'gear_testing'
|
|
do
|
|
mkdir -p "$root/$sat/config/"
|
|
echo "Updating header for platform linux"
|
|
echo "Satellite $sat"
|
|
export blobfile="$sat"_linux.cpp
|
|
echo Blobfile $blobfile
|
|
./HG_linux "$root/$sat/$blobfile" --platform linux -I /usr/include/ -I "$root/" -I "$root/eal/sources" --moduleroot "$root/$sat"
|
|
done
|
|
;;
|
|
|
|
Darwin )
|
|
if [ "$1" = "mac" ]; then
|
|
sdkparam=`xcodebuild -showsdks | awk '/^$/{p=0};p; /OS X SDKs:/{p=1}' | tail -1 | cut -f3`
|
|
sdkpath=`xcodebuild -version $sdkparam Path`
|
|
include="$sdkpath/usr/include"
|
|
|
|
for sat in 'gear_core' 'gear_testing'
|
|
do
|
|
mkdir -p "$root/$sat/config/"
|
|
echo "Updating header for platform mac"
|
|
echo "Satellite $sat"
|
|
blobfile="$sat"_mac.cpp
|
|
echo Blobfile $blobfile
|
|
./HG_mac "$root/$sat/$blobfile" --platform mac -I "$include" -I "$root/" -I "$root/eal/sources" --moduleroot "$root/$sat"
|
|
done
|
|
fi
|
|
|
|
if [ "$1" = "ios" ]; then
|
|
ios_sdkparam=`xcodebuild -showsdks | awk '/^$/{p=0};p; /iOS SDKs:/{p=1}' | tail -1 | cut -f3`
|
|
ios_sdkpath=`xcodebuild -version $ios_sdkparam Path`
|
|
ios_include="$ios_sdkpath/usr/include"
|
|
|
|
for sat in 'gear_core' 'gear_testing'
|
|
do
|
|
mkdir -p "$root/$sat/config/"
|
|
echo "Updating header for platform ios"
|
|
echo "Satellite $sat"
|
|
blobfile="$sat"_ios.cpp
|
|
echo Blobfile $blobfile
|
|
./HG_mac "$root/$sat/$blobfile" --platform ios -I "$ios_include" -I "$root/" -I "$root/eal/sources" --moduleroot "$root/$sat"
|
|
done
|
|
fi
|
|
;;
|
|
esac
|