⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 compilelabs

📁 Vxworks的培训教程,大家分享下啊,
💻
字号:
#!/bin/csh -f# This script compiles VxWorks and Unix C programs in the student lab# directories for the appropriate architecture. Not all .c files will# be compiled - we need to leave some work for the students!# # The environment variables WIND_BASE and WIND_HOST_TYPE should be set# before this script is run. Run this script from the 'student'# directory before copying its contents to the student team home directories.#set verboseecho " "if (! $?WIND_BASE || ! $?WIND_HOST_TYPE ) then	echo " "	echo Tornado environment variables WIND_BASE and WIND_HOST_TYPE	echo must be defined. Quitting.	exit 1endifif ( ! -d $WIND_BASE/host/$WIND_HOST_TYPE/bin ) then	echo " "	echo Tornado executable directory 	echo \"$WIND_BASE/host/$WIND_HOST_TYPE/bin\"	echo does not exist. Quitting.	exit 1endifif (! -e lab4 || ! -e lab13) then	echo " "	echo Run script within \'student\' directory containing labs.	exit 1endifset labdir = `pwd`# Set default valuesset arch = simsoset CPU = SIMSPARCSOLARISset answers = "$labdir/../answers"set FLAGS = ""set NETOPTS = '-traditional -lnsl -lsocket'@ i = 1 while ($i <= $#argv)	set arg = "$argv[$i]"	switch ("$arg")	case CPU=*:		set CPU = `echo -n $arg | cut -c 5- -`		breaksw	case arch=*:		set arch = `echo -n $arg | cut -c 6- -`		breaksw	case answers=*:		set answers=`echo -n $arg | cut -c 9- -`		breaksw	case FLAGS=*:		set FLAGS=`echo -n $arg | cut -c 7- -`		breaksw	case ccUNIX=*:		set ccUNIX=`echo -n $arg | cut -c 8- -`		breaksw	case NETOPTS=*:		set NETOPTS=`echo -n $arg | cut -c 9- -`		breaksw	default:		echo Strange argument $arg ... quitting.		exit 1		breaksw	endsw	@ i++endecho CPU=$CPUecho arch=$archif (-d $answers) then    echo answers=$answerselse    echo " "    echo The answers directory \'$answers\' does not exist.    echo 'var.o' in lab3 will not be compiled. Notify the instructor.endifecho FLAGS=$FLAGSif (! $?ccUNIX) then	if (X$arch == Xsimso || X$arch == Xhppa || X$arch == Xsparc) then		set ccUNIX="$WIND_BASE/host/$WIND_HOST_TYPE/bin/cc$arch"	else		set ccUNIX="gcc"	endifendif#if (! -x $ccUNIX) then#	echo " "#	echo Unix compiler \"$ccUNIX\" does not exist or is not executable.#	echo Unix network lab programs will not be compiled.#else	echo Unix compilation will use \"$ccUNIX $NETOPTS\".#endifecho " "#Solaris Native compiler#alias ccUNIX cc#set NETOPTS = '-Xs -lnsl -lsocket'alias ccx  "$WIND_BASE/host/$WIND_HOST_TYPE/bin/cc$arch -c -DCPU=$CPU -I$WIND_BASE/target/h -fno-builtin -nostdinc -Wall $FLAGS"cd $labdir/lab3# ccx demo.cccx loop.cif (-f $answers/lab3/var.c) then    echo "Note: a 'var2 defined but not used' message is expected below ..."    echo " "    ccx $answers/lab3/var.celse    rm -f var.oendif# cd $labdir/lab4# ccx -g -O0 rdbLab.ccd $labdir/lab5ccx recur.cccx recur2.c# demo.c not used in this lab?ccx demo.ccd $labdir/lab6ccx semB.cccx semC.cccx semM.cccx mutex.ccd $labdir/lab7ccx copyMsg.ccd $labdir/lab9ccx wdTask.ccd $labdir/lab10ccx select.c#cd $labdir/lab11cd $labdir/lab12ccx copyMsg.ccd $labdir/lab13/udpccx sockHelp.c$ccUNIX $NETOPTS -o unixServer unixServer.ccd $labdir/lab13/tcpccx sockHelp.c$ccUNIX $NETOPTS -o testServer testServer.c$ccUNIX $NETOPTS -o conClient conClient.cccx seqServer.c#cd $labdir/lab14cd $labdir/unsupported/rpc$ccUNIX -o unixDate unixDate.cecho " "echo Done!

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -