added dsmdebug file for debugging using macros and setting flags in buildscript
[IRC.git] / Robust / src / buildscript
index f3a1111acbbda025fa35fb6364353ab9f474307d..a9bea668513c68dc57fbc592535380601d3f2ff7 100755 (executable)
@@ -52,6 +52,7 @@ MULTICOREFLAG=false
 TRANSSTATSFLAG=false
 RAWFLAG=false
 RAWCONFIG=''
+RAWDEBUGFLAG=false
 INTERRUPTFLAG=false
 THREADSIMULATEFLAG=false;
 USEDMALLOC=false
@@ -185,10 +186,12 @@ cd $CURDIR
 shift
 elif [[ $1 = '-debug' ]]
 then
+RAWDEBUGFLAG=true
 EXTRAOPTIONS="$EXTRAOPTIONS -g"
 elif [[ $1 = '-runtimedebug' ]]
 then
-EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG"
+#EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG"
+EXTRAOPTIONS="$EXTRAOPTIONS -DCHECKTB"
 elif [[ $1 = '-nooptimize' ]]
 then
 EXTRAOPTIONS="$EXTRAOPTIONS -O0"
@@ -291,9 +294,17 @@ cd $RAWDIR
 make clean
 rm ./*
 
+export RAWRGCCFLAGS="-DTASK -DMULTICORE -DRAW"
+
+if $RAWDEBUGFLAG
+then #debug version
+RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWDEBUG"
+fi
+
 if $INTERRUPTFLAG
 then #INTERRUPT version
 MAKEFILE="$MAKEFILE.i"
+RAWRGCCFLAGS="${RAWRGCCFLAGS} -DINTERRUPT"
 fi #INTERRUPT version
 
 MAKEFILE="$MAKEFILE.$RAWCONFIG"
@@ -336,7 +347,7 @@ if $TRANSSTATSFLAG
 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 $DSMRUNTIME/signal.c $DSMRUNTIME/gCollect.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 $DSMRUNTIME/addPrefetchEnhance.c"
 fi
 
 if $RECOVERFLAG