echo -multicore generate multi-core version binary
echo "-numcore set the number of cores (should be used together with -multicore), defaultly set as 1"
echo "-raw generate raw version binary (should be used together with -multicore)"
+echo "-interrupt generate raw version binary with interruption (should be used togethere with -raw)"
+echo "-rawconfig config raw simulator as 4xn (should be used together with -raw)"
echo -threadsimulate generate multi-thread simulate version binary
echo -optional enable optional
echo -debug generate debug symbols
MULTICOREFLAG=false
TRANSSTATSFLAG=false
RAWFLAG=false
+RAWCONFIG=''
+INTERRUPTFLAG=false
THREADSIMULATEFLAG=false;
USEDMALLOC=false
THREADFLAG=false
elif [[ $1 = '-raw' ]]
then
RAWFLAG=true
-#JAVAOPTS="$JAVAOPTS -raw"
+JAVAOPTS="$JAVAOPTS -raw"
+elif [[ $1 = '-rawconfig' ]]
+then
+RAWCONFIG="$2"
+shift
+elif [[ $1 = '-interrupt' ]]
+then
+INTERRUPTFLAG=true
elif [[ $1 = '-threadsimulate' ]]
then
THREADSIMULATEFLAG=true
#build and link everything
+if $RAWFLAG
+then # RAWFLAG
+RAWDIR="$CURDIR/raw"
+MAKEFILE="../Makefile.raw"
+mkdir $RAWDIR
+cd $RAWDIR
+make clean
+rm ./*
+
+if $INTERRUPTFLAG
+then #INTERRUPT version
+MAKEFILE="$MAKEFILE.i"
+fi #INTERRUPT version
+
+MAKEFILE="$MAKEFILE.$RAWCONFIG"
+
+cp $MAKEFILE ./Makefile
+cp ../Runtime/*.c ./
+cp ../Runtime/*.h ./
+cp ../Runtime/*.S ./
+cp ../Runtime/*.s ./
+cp ../tmpbuilddirectory/*.c ./
+cp ../tmpbuilddirectory/*.h ./
+
+make
+
+else #!RAWFLAG
cd $CURDIR
INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \
$ROBUSTROOT/Runtime/ObjectHash.c \
$ROBUSTROOT/Runtime/garbage.c $ROBUSTROOT/Runtime/socket.c \
$ROBUSTROOT/Runtime/math.c \
-$ROBUSTROOT/Runtime/signal.c \
$ROBUSTROOT/Runtime/GenericHashtable.c $ROBUSTROOT/Runtime/object.c"
if $DSMFLAG
then
EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DTRANSSTATS -DCOMPILER -DDSTM -I$DSMRUNTIME"
fi
-FILES="$FILES $DSMRUNTIME/trans.c $DSMRUNTIME/mcpileq.c $DSMRUNTIME/objstr.c $DSMRUNTIME/dstm.c $DSMRUNTIME/mlookup.c $DSMRUNTIME/clookup.c $DSMRUNTIME/llookup.c $DSMRUNTIME/threadnotify.c $DSMRUNTIME/dstmserver.c $DSMRUNTIME/plookup.c $DSMRUNTIME/ip.c $DSMRUNTIME/queue.c $DSMRUNTIME/prelookup.c $DSMRUNTIME/machinepile.c $DSMRUNTIME/localobjects.c $ROBUSTROOT/Runtime/thread.c $DSMRUNTIME/sockpool.c $DSMRUNTIME/addUdpEnhance.c"
+FILES="$FILES $DSMRUNTIME/trans.c $DSMRUNTIME/mcpileq.c $DSMRUNTIME/objstr.c $DSMRUNTIME/dstm.c $DSMRUNTIME/mlookup.c $DSMRUNTIME/clookup.c $DSMRUNTIME/llookup.c $DSMRUNTIME/threadnotify.c $DSMRUNTIME/dstmserver.c $DSMRUNTIME/plookup.c $DSMRUNTIME/ip.c $DSMRUNTIME/queue.c $DSMRUNTIME/prelookup.c $DSMRUNTIME/machinepile.c $DSMRUNTIME/localobjects.c $ROBUSTROOT/Runtime/thread.c $DSMRUNTIME/sockpool.c $DSMRUNTIME/addUdpEnhance.c $DSMRUNTIME/signal.c $DSMRUNTIME/gCollect.c"
fi
if $RECOVERFLAG
tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin
fi
+fi #!RAWFLAG
+
exit