#!/bin/sh

usage() {
    echo "Usage: $0 <os-platform>"
    exit 1
}

if [ $# -ne 1 ]
then
    usage $*
fi

cd liveMedia
/bin/rm -f Makefile
cat Makefile.head ../config.$1 Makefile.tail > Makefile
chmod a-w Makefile

cd ../groupsock
/bin/rm -f Makefile
cat Makefile.head ../config.$1 Makefile.tail > Makefile
chmod a-w Makefile

cd ../UsageEnvironment
/bin/rm -f Makefile
cat Makefile.head ../config.$1 Makefile.tail > Makefile
chmod a-w Makefile

cd ../BasicUsageEnvironment
/bin/rm -f Makefile
cat Makefile.head ../config.$1 Makefile.tail > Makefile
chmod a-w Makefile

cd ../testProgs
/bin/rm -f Makefile
cat Makefile.head ../config.$1 Makefile.tail > Makefile
chmod a-w Makefile

cd ../mediaServer
/bin/rm -f Makefile
cat Makefile.head ../config.$1 Makefile.tail > Makefile
chmod a-w Makefile

cd ..
/bin/rm -f Makefile
cat Makefile.head config.$1 Makefile.tail > Makefile
chmod a-w Makefile


syntax highlighted by Code2HTML, v. 0.9.1