document OOOJava and Disjoint options
[IRC.git] / Robust / src / buildscript
1 #!/bin/bash
2
3 printhelp() {
4 echo STM Options
5 echo -singleTM single machine committing transactions
6 echo -stmdebug STM debug
7 echo "-stmstats prints single machine commit (stm) statistics for the benchmark"
8 echo -fastmemcpy use fast memcpy
9 echo -sandbox sandbox transactions
10 echo -dcopts conflict optimizations for transactional memory
11 echo -transstats generates transaction stats on commits and aborts
12 echo -inlineatomic depth inline methods inside of transactions to specified depth
13 echo "-stmarray partial array treatment"
14 echo "-dualview dual view of arrays"
15 echo "-hybrid use fission only when it looks like a good choice"
16 echo "-numa numa aware"
17 echo "-eventmonitor turn on transaction event trace recording"
18 echo
19 echo OOOJava options
20 echo -coreprof turn on profiling API
21 echo "-ooojava <numberofcores> <maxseseage>"
22 echo -ooodebug general OOOJava debugging messages
23 echo
24 echo Disjoint Reachability Analysis options
25 echo -disjoint enable analysis
26 echo -disjoint-k set k-limit for heap nodes per allocation site
27 echo "-disjoint-write-dots <all/final> write reach graphs for all method sols. or only final sols."
28 echo -disjoint-write-initial-contexts write reach graphs for callee initial contexts from all call sites
29 echo -disjoint-write-ihms write reach graphs for each call site\'s Initial Heap Model
30 echo "-disjoint-alias-file <filename> <normal/tabbed> write sharing for normal human reading or LaTeX tabbed"
31 echo "-disjoint-debug-callsite <callee> <caller> <visit to start> <num caps> <T/F stop after>"
32 echo "  To debug call site, give callee caller symbols (ie foo) the analysis visit to start capturing, num captures to take, and whether to halt analysis after capturing"
33 echo "-disjoint-debug-snap-method <method> <visit to start> <num caps> <T/F stop after>"
34 echo "  To take snapshots at statements, give method symbol, the analysis visit to start capturing, num captures to take, and whether to halt analsyis after capturing"
35 echo "-disjoint-dvisit-stack use stack strat to visit descriptors (tasks or methods)"
36 echo -disjoint-dvisit-stack-callees-on-top alternate stack strat
37 echo -disjoint-dvisit-pqueue use prio. q strat to visit descriptors
38 echo -disjoint-desire-determinism set above interproc for determinism
39 echo -disjoint-debug-scheduling debug when methods are scheduled for analysis
40 echo 
41 echo "-mlp <num cores> <max sese age> build mlp code"
42 echo -mlpdebug if mlp, report progress and interim results
43 echo
44 echo DSM options
45 echo -dsm distributed shared memory
46 echo -abortreaders abort readers immediately
47 echo -trueprob double - probabiltiy of true branch
48 echo -dsmcaching -enable caching in dsm runtime
49 echo
50 echo BAMBOO Multicore options
51 echo -scheduling do task scheduling
52 echo -multicore generate multi-core version binary
53 echo "-numcore set the number of cores (should be used together with -multicore), defaultly set as 1"
54 echo "-cacheflush enable cache flush in raw version binary (should be used togethere with -raw)"
55 echo "-interrupt generate raw version binary with interruption (should be used togethere with -raw)"
56 echo "-rawpath print out execute path information for raw version (should be used together with -raw)"
57 echo "-useprofile use profiling data for scheduling (should be used together with -raw)"
58 echo -printscheduling print out scheduling graphs
59 echo -printschedulesim print out scheduling simulator result graphs
60 echo "-tilera_bme generate tilera version binary for Bare Mental Environment (should be used together with -multicore"
61 echo "-tilera_zlinux generate tilera version binary for Zero-Overhead Linux with multi-process mode (should be used together with -multicore"
62 echo "-tileraconfig config tilera simulator/pci as nxm (should be used together with -tilera)"
63 echo "-raw generate raw version binary (should be used together with -multicore)"
64 echo "-rawconfig config raw simulator as 4xn (should be used together with -raw)"
65 echo -multicoregc generate multi-core binary with garbage collection
66 echo "-numcore4gc set the number of cores for gc (should be used together with -multicoregc), defaultly set as 0"
67 echo "-gcmem_local set the gc shared memory allocation strategy as local (should be used together with -multicoregc)"
68 echo "-gcmem_fixed set the gc shared memory allocation strategy as fixed (should be used together with -multicoregc)"
69 echo "-gcmem_mixed set the gc shared memory allocation strategy as mixed (should be used together with -multicoregc)"
70 echo "-gcmem_global set the gc shared memory allocation strategy as global (should be used together with -multicoregc)"
71 echo "-gccache_local set the gc shared memory cache strategy as local (should be used together with -multicoregc)"
72 echo "-gccache_ran set the gc shared memory cache strategy as random (should be used together with -multicoregc)"
73 echo "-gccontroller_near set the gc shared memory to use the nearest controller for each core (should be used together with -multicoregc)"
74 echo "-gccontroller_remote set the gc shared memory to use a remote controller for each core (should be used together with -multicoregc)"
75 echo "-gcsmallpagesize(2) set the gc shared memory to use small page size (should be used together with -multicoregc)"
76 echo "-gclargepagesize set the gc shared memory to use large page size (should be used together with -multicoregc)"
77 echo "-gclargesharedheap(2) set the gc shared memory as large (should be used together with -multicoregc)"
78 echo -gcprofile build with gcprofile options
79 echo "-tilera_memprof build the memprof version (should be used together with -tilera_xx) "
80 echo -accurateprofile build with accurate profile information including pre/post task processing info
81 echo "-useio use standard io to output profiling data (should be used together with -raw and -profile), it only works with single core version"
82 echo
83 echo Other options
84 echo -abcclose turnoff array boundary checks
85 echo -builddir setup different build directory
86 echo -robustroot set up the ROBUSTROOT to directory other than default one
87 echo -readset turn on readset
88 echo -mac distributed shared memory mac support
89 echo -check generate check code
90 echo -dmalloc link in dmalloc
91 echo -64bit compile for 64 bit machine
92 echo -32bit compile for 32 bit machine
93 echo -joptimize java compiler optimizations
94 echo -noloop turnoff loop optimizations
95 echo -recover compile task code
96 echo -fastcheck fast checkpointing for Bristlecone
97 echo -specdir directory
98 echo -printflat print out flat representation
99 echo -selfloop task - this task cannot self loop forever
100 echo "-excprefetch methoddescriptor - exclude prefetches for this method (specified as class.method)"
101 echo -taskstate do task state analysis
102 echo -tagstate do tag state analysis
103 echo -optional enable optional
104 echo -debug generate debug symbols
105 echo -prefetch do prefetch analysis
106 echo -garbagestats Print garbage collection statistics
107 echo -webinterface enable web interface
108 echo -runtimedebug printout runtime debug messages
109 echo "-thread use support for multiple threads"
110 echo "-optimize call gcc with -O9 (optimize)"
111 echo "-nooptimize call gcc with -O0 (do not optimize)"
112 echo -curdir directory 
113 echo -mainclass class with main method
114 echo -o binary
115 echo -nojava do not run bristlecone compiler
116 echo -instructionfailures inject code for instructionfailures
117 echo -profile build with profile options
118 echo "-enable-assertions execute assert statements during compilation"
119 echo -justanalyze exit after compiler analyses complete
120 echo "-distributioninfo  execute to collect distribution info for simulated annealing in multi-core version"
121 echo "-disall  execute to collect whole distribution"
122 echo "-disstart specify the start number of distribution information collection"
123 echo -assembly generate assembly
124 echo -recovery compile recovery code
125 echo -dsmtask support work and task class library
126 echo -recoverystats print out recovery record 
127 echo -help help
128 }
129
130 tmpbuilddirectory="tmpbuilddirectory"
131 COREPROF=false;
132 NUMA=false;
133 SANDBOX=false;
134 ABORTREADERS=false;
135 ROBUSTROOT=~/research/Robust/src
136 DSMRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface/
137 STMRUNTIME=$ROBUSTROOT/Runtime/STM/
138 DSMRECOVERYRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface_recovery/
139 REPAIRROOT=~/research/Repair/RepairCompiler/
140 CURDIR=`pwd`
141 DSMFLAG=false
142 DSMRECOVERY=false
143 FASTMEMCPY=false
144 STMARRAY=false
145 DUALVIEW=false
146 STM=false
147 EVENTMONITOR=false
148 NOJAVA=false
149 CHECKFLAG=false
150 RECOVERFLAG=false
151 MLP_ON=false
152 MLPDEBUG=false
153 MULTICOREFLAG=false
154 RAWFLAG=false
155 TILERAFLAG=false
156 TILERABMEFLAG=false
157 TILERAZLINUXFLAG=false
158 TILERAMEMPROFFLAG=false
159 TILERACONFIG=''
160 CACHEFLUSHFLAG=false
161 RAWCONFIG=''
162 DEBUGFLAG=false
163 RAWPATHFLAG=false
164 PROFILEFLAG=false
165 GCPROFILEFLAG=false
166 GCPROFILESFLAG=false
167 ACCURATEPROFILEFLAG=false
168 USEIOFLAG=false
169 INTERRUPTFLAG=false
170 THREADSIMULATEFLAG=false;
171 MULTICOREGCFLAG=false;
172 GCMEMLOCALFLAG=false;
173 GCMEMFIXEDFLAG=false;
174 GCMEMMIXEDFLAG=false;
175 GCMEMGLOBALFLAG=false;
176 GCCACHELOCALFLAG=false;
177 GCCACHERANFLAG=false;
178 GCCONTROLLERNEARFLAG=false;
179 GCCONTROLLERREMOTEFLAG=false;
180 GCSMALLPAGESIZEFLAG=false;
181 GCLARGEPAGESIZEFLAG=false;
182 GCLARGESHAREDHEAPFLAG=false;
183 GCSMALLPAGESIZEFLAG2=false;
184 GCLARGESHAREDHEAPFLAG2=false;
185 USEDMALLOC=false
186 THREADFLAG=false
187 FASTCHECK=false
188 SPECDIR=`pwd`
189 SRCFILES=''
190 EXTRAOPTIONS=''
191 MAINFILE='a'
192 JAVAFORWARDOPTS=''
193 JAVAOPTS=''
194 OPTIONALFLAG=false
195 EXITAFTERANALYSIS=false
196 ASSEMBLY=false
197 GCCORES=''
198 GC1COREFLAG=false
199 TILERAN1COREFLAG=false
200
201 if [[ -z $1 ]]
202 then
203 printhelp
204 exit
205 fi
206
207 while [[ -n $1 ]]
208 do
209 if [[ $1 = '-help' ]]
210 then
211 printhelp
212 exit
213 elif [[ $1 = '-justanalyze' ]]
214 then
215 EXITAFTERANALYSIS=true
216 elif [[ $1 = '-assembly' ]]
217 then
218 ASSEMBLY=true
219 elif [[ $1 = '-abortreaders' ]]
220 then
221 ABORTREADERS=true
222 EXTRAOPTIONS="$EXTRAOPTIONS -DABORTREADERS"
223 JAVAOPTS="$JAVAOPTS -abortreaders"
224 elif [[ $1 = '-sandbox' ]]
225 then
226 SANDBOX=true
227 EXTRAOPTIONS="$EXTRAOPTIONS -DSANDBOX"
228 JAVAOPTS="$JAVAOPTS -sandbox"
229 elif [[ $1 = '-numa' ]]
230 then
231 EXTRAOPTIONS="$EXTRAOPTIONS -DAFFINITY -D_GNU_SOURCE"
232 NUMA=true
233 elif [[ $1 = '-robustroot' ]]
234 then
235 ROBUSTROOT="$2"
236 shift
237 elif [[ $1 = '-builddir' ]]
238 then
239 tmpbuilddirectory="$2"
240 shift
241 elif [[ $1 = '-nojava' ]]
242 then
243 NOJAVA=true
244 elif [[ $1 = '-eventmonitor' ]]
245 then
246 JAVAOPTS="$JAVAOPTS -eventmonitor"
247 EVENTMONITOR=true
248 EXTRAOPTIONS="$EXTRAOPTIONS -DEVENTMONITOR"
249 elif [[ $1 = '-garbagestats' ]]
250 then
251 EXTRAOPTIONS="$EXTRAOPTIONS -DGARBAGESTATS"
252 elif [[ $1 = '-64bit' ]]
253 then
254 EXTRAOPTIONS="$EXTRAOPTIONS -DBIT64 -m64"
255 elif [[ $1 = '-32bit' ]]
256 then
257 EXTRAOPTIONS="$EXTRAOPTIONS -m32"
258 elif [[ $1 = '-fastcheck' ]]
259 then
260 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTCHECK"
261 JAVAOPTS="$JAVAOPTS -fastcheck"
262 FASTCHECK=true
263 elif [[ $1 = '-o' ]]
264 then
265 MAINFILE="$2"
266 shift
267 elif [[ $1 = '-mainclass' ]]
268 then
269 JAVAOPTS="$JAVAOPTS -mainclass $2"
270 shift
271 elif [[ $1 = '-selfloop' ]]
272 then
273 JAVAOPTS="$JAVAOPTS -selfloop $2"
274 shift
275 elif [[ $1 = '-excprefetch' ]]
276 then
277 JAVAOPTS="$JAVAOPTS -excprefetch $2"
278 shift
279 elif [[ $1 = '-arraypad' ]]
280 then
281 JAVAOPTS="$JAVAOPTS -arraypad"
282 elif [[ $1 = '-dsm' ]]
283 then
284 JAVAOPTS="$JAVAOPTS -dsm"
285 DSMFLAG=true
286 elif [[ $1 = '-fastmemcpy' ]]
287 then
288 FASTMEMCPY=true
289 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTMEMCPY"
290 elif [[ $1 = '-singleTM' ]]
291 then
292 JAVAOPTS="$JAVAOPTS -singleTM"
293 EXTRAOPTIONS="$EXTRAOPTIONS -DSTM"
294 STM=true
295 elif [[ $1 = '-stmarray' ]]
296 then
297 JAVAOPTS="$JAVAOPTS -stmarray"
298 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMARRAY"
299 STMARRAY=true
300 elif [[ $1 = '-dualview' ]]
301 then
302 JAVAOPTS="$JAVAOPTS -dualview"
303 EXTRAOPTIONS="$EXTRAOPTIONS -DDUALVIEW"
304 DUALVIEW=true
305 elif [[ $1 = '-readset' ]]
306 then
307 JAVAOPTS="$JAVAOPTS -readset"
308 EXTRAOPTIONS="$EXTRAOPTIONS -DREADSET"
309 elif [[ $1 = '-stmdebug' ]]
310 then
311 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMDEBUG"
312 elif [[ $1 = '-stmstats' ]]
313 then
314 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMSTATS"
315 elif [[ $1 = '-stmlog' ]]
316 then
317 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMLOG"
318 elif [[ $1 = '-prefetch' ]]
319 then
320 JAVAOPTS="$JAVAOPTS -prefetch"
321 elif [[ $1 = '-transstats' ]]
322 then
323 EXTRAOPTIONS="$EXTRAOPTIONS -DTRANSSTATS"
324 elif [[ $1 = '-printflat' ]]
325 then
326 JAVAOPTS="$JAVAOPTS -printflat"
327 elif [[ $1 = '-trueprob' ]]
328 then
329 JAVAOPTS="$JAVAOPTS -trueprob $2"
330 shift
331 elif [[ $1 = '-inlineatomic' ]]
332 then
333 JAVAOPTS="$JAVAOPTS -inlineatomic $2"
334 shift
335 elif [[ $1 = '-mac' ]]
336 then
337 EXTRAOPTIONS="$EXTRAOPTIONS -DMAC"
338 elif [[ $1 = '-profile' ]]
339 then
340 PROFILEFLAG=true
341 EXTRAOPTIONS="$EXTRAOPTIONS -pg"
342 elif [[ $1 = '-gcprofile' ]]
343 then
344 GCPROFILEFLAG=true
345 elif [[ $1 = '-gcprofile_s' ]]
346 then
347 GCPROFILESFLAG=true
348 elif [[ $1 = '-accurateprofile' ]]
349 then
350 ACCURATEPROFILEFLAG=true
351 elif [[ $1 = '-useio' ]]
352 then
353 USEIOFLAG=true
354 elif [[ $1 = '-taskstate' ]]
355 then
356 JAVAOPTS="$JAVAOPTS -taskstate"
357 elif [[ $1 = '-tagstate' ]]
358 then
359 JAVAOPTS="$JAVAOPTS -tagstate"
360 elif [[ $1 = '-scheduling' ]]
361 then
362 JAVAOPTS="$JAVAOPTS -scheduling"
363 elif [[ $1 = '-multicore' ]]
364 then
365 MULTICOREFLAG=true
366 JAVAOPTS="$JAVAOPTS -multicore"
367 elif [[ $1 = '-numcore' ]]
368 then
369 JAVAOPTS="$JAVAOPTS -numcore $2"
370 if [[ "$2" -gt "1" ]]
371 then
372 TILERAN1COREFLAG=true
373 fi
374 shift
375 elif [[ $1 = '-numcore4gc' ]]
376 then
377 JAVAOPTS="$JAVAOPTS -numcore4gc $2"
378 GCCORES="GC_$2"
379 if [[ "$2" -eq "1" ]]
380 then
381 GC1COREFLAG=true
382 fi
383 shift
384 elif [[ $1 = '-raw' ]]
385 then
386 RAWFLAG=true
387 JAVAOPTS="$JAVAOPTS -raw"
388 elif [[ $1 = '-tilera_bme' ]]
389 then
390 TILERAFLAG=true
391 TILERABMEFLAG=true
392 elif [[ $1 = '-tilera_zlinux' ]]
393 then
394 TILERAFLAG=true
395 TILERAZLINUXFLAG=true
396 elif [[ $1 = '-tilera_memprof' ]]
397 then
398 TILERAMEMPROFFLAG=true
399 elif [[ $1 = '-tileraconfig' ]]
400 then
401 TILERACONFIG="$2"
402 shift
403 elif [[ $1 = '-cacheflush' ]]
404 then
405 CACHEFLUSHFLAG=true
406 elif [[ $1 = '-rawconfig' ]]
407 then
408 RAWCONFIG="$2"
409 shift
410 elif [[ $1 = '-interrupt' ]]
411 then
412 INTERRUPTFLAG=true
413 elif [[ $1 = '-abcclose' ]]
414 then
415 JAVAOPTS="$JAVAOPTS -abcclose"
416 elif [[ $1 = '-optional' ]]
417 then
418 JAVAOPTS="$JAVAOPTS -optional"
419 OPTIONALFLAG=true
420 elif [[ $1 = '-multicoregc' ]]
421 then
422 MULTICOREGCFLAG=true
423 JAVAOPTS="$JAVAOPTS -multicoregc"
424 elif [[ $1 = '-gcmem_local' ]]
425 then
426 GCMEMLOCALFLAG=true
427 elif [[ $1 = '-gcmem_fixed' ]]
428 then
429 GCMEMFIXEDFLAG=true
430 elif [[ $1 = '-gcmem_mixed' ]]
431 then
432 GCMEMMIXEDFLAG=true
433 elif [[ $1 = '-gcmem_global' ]]
434 then
435 GCMEMGLOBALFLAG=true
436 elif [[ $1 = '-gccache_local' ]]
437 then
438 GCCACHELOCALFLAG=true
439 elif [[ $1 = '-gccache_ran' ]]
440 then
441 GCCACHERANFLAG=true
442 elif [[ $1 = '-gccontroller_near' ]]
443 then
444 GCCONTROLLERNEARFLAG=true
445 elif [[ $1 = '-gccontroller_remote' ]]
446 then
447 GCCONTROLLERREMOTEFLAG=true
448 elif [[ $1 = '-gcsmallpagesize' ]]
449 then
450 GCSMALLPAGESIZEFLAG=true
451 elif [[ $1 = '-gcsmallpagesize2' ]]
452 then
453 GCSMALLPAGESIZEFLAG2=true
454 elif [[ $1 = '-gclargepagesize' ]]
455 then
456 GCLARGEPAGESIZEFLAG=true
457 elif [[ $1 = '-gclargesharedheap' ]]
458 then
459 GCLARGESHAREDHEAPFLAG=true
460 elif [[ $1 = '-gclargesharedheap2' ]]
461 then
462 GCLARGESHAREDHEAPFLAG2=true
463 elif [[ $1 = '-dmalloc' ]]
464 then
465 USEDMALLOC=true
466 elif [[ $1 = '-recover' ]]
467 then
468 RECOVERFLAG=true
469 JAVAOPTS="$JAVAOPTS -task"
470 elif [[ $1 = '-useprofile' ]]
471 then
472 JAVAOPTS="$JAVAOPTS -useprofile $2"
473 shift
474 elif [[ $1 = '-webinterface' ]]
475 then
476 JAVAOPTS="$JAVAOPTS -webinterface"
477 elif [[ $1 = '-instructionfailures' ]]
478 then
479 JAVAOPTS="$JAVAOPTS -instructionfailures"
480 elif [[ $1 = '-joptimize' ]]
481 then
482 JAVAOPTS="$JAVAOPTS -optimize"
483 elif [[ $1 = '-noloop' ]]
484 then
485 JAVAOPTS="$JAVAOPTS -noloop"
486 elif [[ $1 = '-dcopts' ]]
487 then
488 JAVAOPTS="$JAVAOPTS -dcopts"
489 elif [[ $1 = '-delaycomp' ]]
490 then
491 JAVAOPTS="$JAVAOPTS -delaycomp"
492 EXTRAOPTIONS="$EXTRAOPTIONS -DDELAYCOMP"
493 elif [[ $1 = '-hybrid' ]]
494 then
495 JAVAOPTS="$JAVAOPTS -hybrid"
496 EXTRAOPTIONS="$EXTRAOPTIONS -DHYBRID"
497 elif [[ $1 = '-minimize' ]]
498 then
499 JAVAOPTS="$JAVAOPTS -minimize"
500
501 elif [[ $1 = '-ooojava' ]]
502 then
503 MLP_ON=true
504 JAVAOPTS="$JAVAOPTS -ooojava $2 $3"
505 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
506 shift
507 shift
508
509 elif [[ $1 = '-coreprof' ]]
510 then
511 COREPROF=true
512 JAVAOPTS="$JAVAOPTS -coreprof"
513 EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF -I$ROBUSTROOT/Runtime/coreprof"
514
515 elif [[ $1 = '-mlp' ]]
516 then
517 MLP_ON=true
518 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
519 JAVAOPTS="$JAVAOPTS -mlp $2 $3"
520 shift
521 shift
522
523 elif [[ $1 = '-mlpdebug' ]]
524 then
525 JAVAOPTS="$JAVAOPTS -mlpdebug"
526
527 elif [[ $1 = '-check' ]]
528 then
529 CHECKFLAG=true
530 JAVAOPTS="$JAVAOPTS -conscheck"
531 elif [[ $1 = '-enable-assertions' ]]
532 then
533 JAVAFORWARDOPTS="$JAVAFORWARDOPTS -ea"
534 elif [[ $1 = '-specdir' ]]
535 then
536 cd $2
537 SPECDIR=`pwd`
538 cd $CURDIR
539 shift
540 elif [[ $1 = '-debug' ]]
541 then
542 DEBUGFLAG=true
543 EXTRAOPTIONS="$EXTRAOPTIONS -g -rdynamic"
544 elif [[ $1 = '-rawpath' ]]
545 then
546 RAWPATHFLAG=true
547 elif [[ $1 = '-runtimedebug' ]]
548 then
549 EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG"
550 elif [[ $1 = '-dsmcaching' ]]
551 then
552 EXTRAOPTIONS="$EXTRAOPTIONS -DCACHE"
553 elif [[ $1 = '-rangeprefetch' ]]
554 then
555 EXTRAOPTIONS="$EXTRAOPTIONS -DRANGEPREFETCH"
556 elif [[ $1 = '-nooptimize' ]]
557 then
558 EXTRAOPTIONS="$EXTRAOPTIONS -O0"
559 elif [[ $1 = '-optimize' ]]
560 then
561 EXTRAOPTIONS="$EXTRAOPTIONS -O3"
562 elif [[ $1 = '-thread' ]]
563 then
564 JAVAOPTS="$JAVAOPTS -thread"
565 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADS -lpthread"
566 THREADFLAG=true
567 elif [[ $1 = '-recovery' ]]
568 then
569 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERY"
570 DSMRECOVERY=true
571 elif [[ $1 = '-recoverystats' ]]
572 then
573 JAVAOPTS="$JAVAOPTS -recoverystats"
574 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERYSTATS"
575 elif [[ $1 = '-distributioninfo' ]]
576 then
577 JAVAOPTS="$JAVAOPTS -distributioninfo"
578 elif [[ $1 = '-disall' ]]
579 then
580 JAVAOPTS="$JAVAOPTS -disall"
581 elif [[ $1 = '-disstart' ]]
582 then
583 JAVAOPTS="$JAVAOPTS -disstart $2"
584 shift
585 elif [[ $1 = '-noc' ]]
586 then
587 CCOMPILEFLAG=false
588 elif [[ $1 = '-curdir' ]]
589 then
590 CURDIR=$2
591 shift
592 elif [[ $1 = '-outputdir' ]]
593 then
594 JAVAOPTS="$JAVAOPTS -outputdir $2"
595 shift
596 else
597 SRCFILES="$SRCFILES $1"
598 fi
599 shift
600 done
601
602 BUILDDIR="$CURDIR/$tmpbuilddirectory"
603
604 cd $1
605 cd $CURDIR
606 shift
607
608 mkdir $BUILDDIR
609
610 if $CHECKFLAG #Generate structure files for repair tool
611 then
612 JAVAOPTS="$JAVAOPTS -struct structfile"
613 fi
614
615 # Setup class path
616
617 if $RECOVERFLAG
618 then
619 if $FASTCHECK
620 then
621 #fast transactions
622 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/FastCheck"
623 else
624 #base bristlecone files
625 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Bristlecone"
626 fi
627 else
628 if $DSMFLAG
629 then
630 #dsm stuff
631 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaDSM"
632 elif $STM
633 then
634 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaSTM"
635 elif $THREADFLAG
636 then
637 #threading java stuff
638 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaThread"
639 fi
640 #base java stuff
641 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Java"
642 fi
643
644 # Build bristlecone/java sources
645
646 if $MULTICOREFLAG
647 then
648 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
649 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ \
650 -dir $BUILDDIR $JAVAOPTS $SRCFILES
651 then exit $?
652 fi
653 else
654 #if ! ${ROBUSTROOT}/ourjava -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
655 if ! $NOJAVA
656 then
657 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
658 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ -dir $BUILDDIR -precise \
659 $JAVAOPTS $SRCFILES
660 then exit $?
661 fi
662 fi
663 fi
664
665 if $EXITAFTERANALYSIS
666 then
667 exit
668 fi
669
670 # Build all of the consistency specs
671
672 if $CHECKFLAG # CHECKFLAG
673 then
674 cd $SPECDIR
675 mkdir $BUILDDIR/specdir
676 cp $REPAIRROOT/MCC/CRuntime/* $BUILDDIR/specdir
677
678 echo > $BUILDDIR/specs
679
680 # compile specs into C code
681 for i in * # iterate over all directories
682 do
683 if [[ "$i" != "CVS" ]] # CVSDIR CHECK
684 then
685 cd $SPECDIR/$i
686 cat $BUILDDIR/structfile.struct $i.label > $i.struct
687 java -cp $REPAIRROOT/:. MCC.Compiler -name $i -checkonly $i
688 cp size.[c,h] $BUILDDIR/specdir
689 cp $i.c $i\_aux.[c,h] $BUILDDIR/specdir
690 echo $i >> $BUILDDIR/specs
691 fi # CVSDIR CHECK
692 done # iterate over all directories
693
694 #compile C code
695
696 cd $BUILDDIR/specdir
697 ./buildrobust
698 echo > $BUILDDIR/checkers.h
699 for i in `cat $BUILDDIR/specs`
700 do
701 gcc -O0 -g -fbounds-check -c $i\_aux.c
702 echo \#include \"specdir\/$i\_aux.h\" >> $BUILDDIR/checkers.h
703 done
704 fi # CHECKFLAG
705
706 #build and link everything
707
708 if $RAWFLAG
709 then # RAWFLAG
710 RAWDIR="$CURDIR/raw"
711 MAKEFILE="Makefile.raw"
712 mkdir $RAWDIR
713 cd $RAWDIR
714 make clean
715 rm ./*
716
717 export RAWRGCCFLAGS="-DTASK -DMULTICORE -DRAW"
718
719 if $CACHEFLUSHFLAG
720 then # print path
721 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DCACHEFLUSH"
722 fi
723
724 if $RAWPATHFLAG
725 then # print path
726 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWPATH"
727 fi
728
729 if $DEBUGFLAG
730 then #debug version
731 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DDEBUG"
732 fi
733
734 if $PROFILEFLAG
735 then # profile version
736 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DPROFILE"
737 fi
738
739 if $ACCURATEPROFILEFLAG
740 then # accurateprofile version
741 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DACCURATEPROFILE"
742 fi
743
744 if $USEIOFLAG
745 then # useio version
746 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DUSEIO"
747 fi
748
749 if $INTERRUPTFLAG
750 then #INTERRUPT version
751 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DINTERRUPT"
752 fi #INTERRUPT version
753
754 if $USEIOFLAG
755 then # useio version
756 MAKEFILE="$MAKEFILE.io"
757 echo "+++++++++++use Makefile.raw.io++++++++++++++++"
758 else
759 MAKEFILE="$MAKEFILE.$RAWCONFIG"
760 fi #useio version
761
762 cp $ROBUSTROOT/Runtime/RAW/$MAKEFILE ./Makefile
763 cp ../Runtime/*.c ./
764 cp ../Runtime/*.h ./
765 cp ../Runtime/*.S ./
766 cp ../Runtime/*.s ./
767 cp ../Runtime/RAW/*.c ./
768 cp ../Runtime/RAW/*.h ./
769 cp ../Runtime/RAW/*.S ./
770 cp ../Runtime/RAW/*.s ./
771 cp ../$tmpbuilddirectory/*.c ./
772 cp ../$tmpbuilddirectory/*.h ./
773
774 make
775
776 elif $TILERAFLAG
777 then # TILERAFLAG
778 TILERADIR="$CURDIR/tilera"
779 if $TILERABMEFLAG
780 then # TILERABMEFLAG
781 TILERA_INDIR="BME"
782 MAKEFILE="Makefile.tilera.$TILERACONFIG"
783 SIMHVC="sim.hvc.$TILERACONFIG"
784 PCIHVC="pci.hvc.$TILERACONFIG"
785 if $GC1COREFLAG 
786 then # 1-core gc
787   if $TILERAN1COREFLAG
788   then # not only with 1 core
789         PCIHVC="$PCIHVC.1gc"
790   fi
791 fi
792 elif $TILERAZLINUXFLAG
793 then # TILERAZLINUXFLAG
794 TILERA_INDIR="ZLinux"
795 MAKEFILE="Makefile.tilera.$TILERACONFIG"
796 fi
797
798 mkdir $TILERADIR
799 cd $TILERADIR
800 make clean
801 rm ./*
802
803 export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
804
805 if $TILERAMEMPROFFLAG
806 then # not only with 1 core
807   PCIHVC="$PCIHVC.memprof"
808   TILERACFLAGS="${TILERACFLAGS} -DBAMBOO_MEMPROF"
809 fi
810
811 if $TILERABMEFLAG
812 then # TILERABMEFLAG
813 TILERACFLAGS="${TILERACFLAGS} -DTILERA_BME"
814 elif $TILERAZLINUXFLAG
815 then # TILERAZLINUXFLAG
816 TILERACFLAGS="${TILERACFLAGS} -DTILERA_ZLINUX"
817 fi
818
819 if $CACHEFLUSHFLAG
820 then # print path
821 TILERACFLAGS="${TILERACFLAGS} -DCACHEFLUSH"
822 fi
823
824 if $RAWPATHFLAG
825 then # print path
826 TILERACFLAGS="${TILERACFLAGS} -DRAWPATH"
827 fi
828
829 if $DEBUGFLAG
830 then #debug version
831 TILERACFLAGS="${TILERACFLAGS} -DDEBUG"
832 fi
833
834 if $PROFILEFLAG
835 then # profile version
836 TILERACFLAGS="${TILERACFLAGS} -DPROFILE"
837 fi
838
839 if $ACCURATEPROFILEFLAG
840 then # accurateprofile version
841 TILERACFLAGS="${TILERACFLAGS} -DACCURATEPROFILE"
842 fi
843
844 if $USEIOFLAG
845 then # useio version
846 TILERACFLAGS="${TILERACFLAGS} -DUSEIO"
847 fi
848
849 if $INTERRUPTFLAG
850 then #INTERRUPT version
851 TILERACFLAGS="${TILERACFLAGS} -DINTERRUPT"
852 fi #INTERRUPT version
853
854 if $MULTICOREGCFLAG
855 then #MULTICOREGC version
856 TILERACFLAGS="${TILERACFLAGS} -DMULTICORE_GC -D${GCCORES}"
857 fi
858
859 if $GCPROFILEFLAG
860 then # GC_PROFILE version
861 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE"
862 fi
863
864 if $GCPROFILESFLAG
865 then # GC_PROFILE_S version
866 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE_S"
867 fi
868
869 if $GCMEMLOCALFLAG
870 then # SMEMLOCAL version
871 TILERACFLAGS="${TILERACFLAGS} -DSMEML"
872 fi
873
874 if $GCMEMFIXEDFLAG
875 then # SMEMFIXED version
876 TILERACFLAGS="${TILERACFLAGS} -DSMEMF"
877 fi
878
879 if $GCMEMMIXEDFLAG
880 then # SMEMMIXED version
881 TILERACFLAGS="${TILERACFLAGS} -DSMEMM"
882 fi
883
884 if $GCMEMGLOBALFLAG
885 then # SMEMGLOBAL version
886 TILERACFLAGS="${TILERACFLAGS} -DSMEMG"
887 fi
888
889 if $GCCACHELOCALFLAG
890 then # CACHE_LOCAL version
891 TILERACFLAGS="${TILERACFLAGS} -DCACHE_LOCAL"
892 fi
893
894 if $GCCACHERANFLAG
895 then # CACHE_RAN version
896 TILERACFLAGS="${TILERACFLAGS} -DCACHE_RAN"
897 fi
898
899 if $GCCONTROLLERNEARFLAG
900 then # CONTROLLER_NEAR version
901 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_NEAR"
902 fi
903
904 if $GCCONTROLLERREMOTEFLAG
905 then # CONTROLLER_REMOTE version
906 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_REMOTE"
907 fi
908
909 if $GCSMALLPAGESIZEFLAG
910 then # GC_SMALLPAGESIZE version
911 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE"
912 fi
913
914 if $GCLARGEPAGESIZEFLAG
915 then # GC_LARGEPAGESIZE version
916 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGEPAGESIZE"
917 fi
918
919 if $GCLARGESHAREDHEAPFLAG
920 then # GC_LARGESHAREDHEAP version
921 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP"
922 fi
923
924 if $GCSMALLPAGESIZEFLAG2
925 then # GC_SMALLPAGESIZE2 version
926 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE2"
927 fi
928
929 if $GCLARGESHAREDHEAPFLAG2
930 then # GC_LARGESHAREDHEAP2 version
931 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP2"
932 fi
933
934
935 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$MAKEFILE ./Makefile
936 if $TILERABMEFLAG
937 then # TILERABMEFLAG
938 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$SIMHVC ./sim.hvc
939 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$PCIHVC ./pci.hvc
940 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc ./bamboo-vmlinux-pci.hvc
941 fi
942 cp ../Runtime/multicoretask.c ./
943 cp ../Runtime/multicoreruntime.c ./
944 cp ../Runtime/Queue.c ./
945 cp ../Runtime/file.c ./
946 cp ../Runtime/math.c ./
947 cp ../Runtime/object.c ./
948 cp ../Runtime/GenericHashtable.c ./
949 cp ../Runtime/SimpleHash.c ./
950 cp ../Runtime/GCSharedHash.c ./
951 cp ../Runtime/ObjectHash.c ./
952 cp ../Runtime/socket.c ./
953 cp ../Runtime/mem.c ./
954 cp ../Runtime/multicoregarbage.c ./
955 cp ../Runtime/MGCHash.c ./
956 cp ../Runtime/GenericHashtable.h ./
957 cp ../Runtime/mem.h ./
958 cp ../Runtime/multicoreruntime.h ./
959 cp ../Runtime/object.h ./
960 cp ../Runtime/ObjectHash.h ./
961 cp ../Runtime/Queue.h ./
962 cp ../Runtime/runtime.h ./
963 cp ../Runtime/SimpleHash.h ./
964 cp ../Runtime/GCSharedHash.h ./
965 cp ../Runtime/multicoregc.h ./
966 cp ../Runtime/multicoregarbage.h ./
967 cp ../Runtime/multicorehelper.h ./
968 cp ../Runtime/MGCHash.h ./
969 cp ../Tilera/Runtime/*.c ./
970 cp ../Tilera/Runtime/*.h ./
971 cp ../Tilera/Runtime/$TILERA_INDIR/*.c ./
972 cp ../Tilera/Runtime/$TILERA_INDIR/*.h ./
973 if $TILERAZLINUXFLAG
974 then # TILERAZLINUXFLAG
975 cp ../Tilera/Runtime/$TILERA_INDIR/*.S ./
976 fi
977 #if $TILERAMEMPROFFLAG
978 #then # TILERAMEMPROFFLAG
979 cp ../Tilera/Runtime/$TILERA_INDIR/linux_client.c ./
980 #fi
981 cp ../Tilera/lib/* ./
982 cp ../$tmpbuilddirectory/*.c ./
983 cp ../$tmpbuilddirectory/*.h ./
984
985 make
986
987 else #!RAWFLAG && !TILERABMEFLAG  && ! TILERAZLINUXFLAG
988 cd $CURDIR 
989
990 INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \
991 -I$BUILDDIR"
992
993 if $MULTICOREFLAG
994 then
995 RUNTIMEFILE="$ROBUSTROOT/Runtime/multicoreruntime.c $ROBUSTROOT/Runtime/multicoretask.c"
996 else
997 RUNTIMEFILE="$ROBUSTROOT/Runtime/runtime.c $ROBUSTROOT/Runtime/task.c"
998 fi
999
1000 FILES="$RUNTIMEFILE \
1001 $ROBUSTROOT/Runtime/file.c $ROBUSTROOT/Runtime/Queue.c \
1002 $ROBUSTROOT/Runtime/SimpleHash.c $ROBUSTROOT/Runtime/option.c \
1003 $ROBUSTROOT/Runtime/ObjectHash.c \
1004 $ROBUSTROOT/Runtime/garbage.c $ROBUSTROOT/Runtime/socket.c \
1005 $ROBUSTROOT/Runtime/math.c \
1006 $ROBUSTROOT/Runtime/GenericHashtable.c $ROBUSTROOT/Runtime/object.c"
1007
1008 if $NUMA
1009 then
1010 FILES="$FILES $ROBUSTROOT/Runtime/affinity.c"
1011 fi
1012
1013 if $EVENTMONITOR
1014 then
1015 FILES="$FILES $ROBUSTROOT/Runtime/STM/monitor.c"
1016 fi
1017
1018 if $FASTMEMCPY
1019 then
1020 FILES="$FILES $ROBUSTROOT/Runtime/memcpy32.o $ROBUSTROOT/Runtime/instrset32.o"
1021 fi
1022
1023 if $DSMFLAG
1024 then
1025 if $DSMRECOVERY
1026 then
1027 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRECOVERYRUNTIME"
1028 FILES="$FILES $DSMRECOVERYRUNTIME/trans.c $DSMRECOVERYRUNTIME/mcpileq.c $DSMRECOVERYRUNTIME/objstr.c $DSMRECOVERYRUNTIME/dstm.c $DSMRECOVERYRUNTIME/altmlookup.c $DSMRECOVERYRUNTIME/clookup.c $DSMRECOVERYRUNTIME/llookup.c $DSMRECOVERYRUNTIME/tlookup.c $DSMRECOVERYRUNTIME/threadnotify.c $DSMRECOVERYRUNTIME/dstmserver.c $DSMRECOVERYRUNTIME/plookup.c $DSMRECOVERYRUNTIME/ip.c $DSMRECOVERYRUNTIME/queue.c $DSMRECOVERYRUNTIME/altprelookup.c $DSMRECOVERYRUNTIME/machinepile.c $ROBUSTROOT/Runtime/localobjects.c $ROBUSTROOT/Runtime/thread.c $DSMRECOVERYRUNTIME/sockpool.c $DSMRECOVERYRUNTIME/addUdpEnhance.c $DSMRECOVERYRUNTIME/signal.c $DSMRECOVERYRUNTIME/gCollect.c $DSMRECOVERYRUNTIME/addPrefetchEnhance.c $DSMRECOVERYRUNTIME/dsmlock.c $DSMRECOVERYRUNTIME/translist.c $DSMRECOVERYRUNTIME/paxos.c"
1029 else
1030 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRUNTIME"
1031 FILES="$FILES $DSMRUNTIME/trans.c $DSMRUNTIME/mcpileq.c $DSMRUNTIME/objstr.c $DSMRUNTIME/dstm.c $DSMRUNTIME/clookup.c $DSMRUNTIME/llookup.c $DSMRUNTIME/threadnotify.c $DSMRUNTIME/dstmserver.c $DSMRUNTIME/plookup.c $DSMRUNTIME/ip.c $DSMRUNTIME/queue.c $DSMRUNTIME/altprelookup.c $DSMRUNTIME/machinepile.c $ROBUSTROOT/Runtime/localobjects.c $ROBUSTROOT/Runtime/thread.c $DSMRUNTIME/sockpool.c $DSMRUNTIME/addUdpEnhance.c $DSMRUNTIME/signal.c $DSMRUNTIME/gCollect.c $DSMRUNTIME/addPrefetchEnhance.c $DSMRUNTIME/dsmlock.c $DSMRUNTIME/prefetch.c $DSMRUNTIME/altmlookup.c"
1032 fi
1033 fi
1034
1035 if $STM
1036 then
1037 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -I$STMRUNTIME"
1038 FILES="$FILES $STMRUNTIME/stmlock.c $STMRUNTIME/stm.c $STMRUNTIME/stmlookup.c $ROBUSTROOT/Runtime/thread.c $STMRUNTIME/stats.c $STMRUNTIME/commit.c $STMRUNTIME/objstr.c"
1039 fi
1040
1041 if $SANDBOX
1042 then
1043 if $DSMFLAG
1044 then
1045 FILES="$FILES $DSMRUNTIME/sandbox.c"
1046 else
1047 FILES="$FILES $STMRUNTIME/sandbox.c"
1048 fi
1049 fi
1050
1051 if $ABORTREADERS
1052 then
1053 FILES="$FILES $DSMRUNTIME/abortreaders.c"
1054 fi
1055
1056 if $FASTCHECK
1057 then
1058 FILES="$FILES $ROBUSTROOT/Runtime/localobjects.c"
1059 fi
1060
1061 if $COREPROF
1062 then
1063 FILES="$FILES $ROBUSTROOT/Runtime/coreprof/coreprof.c"
1064 fi
1065
1066 if $MLP_ON
1067 then
1068 FILES="$FILES $ROBUSTROOT/Runtime/mlp_runtime.c"
1069 FILES="$FILES $ROBUSTROOT/Runtime/psemaphore.c"
1070 FILES="$FILES $ROBUSTROOT/Runtime/workschedule.c"
1071 fi
1072
1073 if $RECOVERFLAG
1074 then
1075 EXTRAOPTIONS="$EXTRAOPTIONS -DTASK"
1076 if $MULTICOREFLAG
1077 then
1078 EXTRAOPTIONS="$EXTRAOPTIONS -DMULTICORE"
1079 fi
1080 FILES="$FILES $tmpbuilddirectory/taskdefs.c $ROBUSTROOT/Runtime/checkpoint.c $ROBUSTROOT/Runtime/chash.c"
1081 if $RAWFLAG
1082 then
1083 EXTRAOPTIONS="$EXTRAOPTIONS -DRAW"
1084 fi
1085 if $THREADSIMULATEFLAG
1086 then
1087 # -lpthread for pthread functions, -lrt for message queue functions
1088 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADSIMULATE -lpthread -lrt"
1089 fi
1090 fi
1091
1092 if $OPTIONALFLAG
1093 then
1094 EXTRAOPTIONS="$EXTRAOPTIONS -DOPTIONAL"
1095 FILES="$FILES $tmpbuilddirectory/optionalarrays.c"
1096 fi
1097
1098 if $THREADFLAG
1099 then
1100 FILES="$FILES $ROBUSTROOT/Runtime/thread.c"
1101 fi
1102
1103 if $CHECKFLAG
1104 then
1105 EXTRAOPTIONS="$EXTRAOPTIONS -DCONSCHECK $BUILDDIR/specdir/*.o"
1106 INCLUDES="$INCLUDES -I$BUILDDIR/specdir"
1107 fi
1108
1109 if $USEDMALLOC
1110 then
1111 EXTRAOPTIONS="$EXTRAOPTIONS -ldmalloc -DDMALLOC"
1112 fi
1113
1114 if $ASSEMBLY
1115 then
1116 gcc -S $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1117 -c $tmpbuilddirectory/methods.c -lm
1118 fi
1119
1120 if $MULTICOREFLAG
1121 then
1122 gcc $INCLUDES $EXTRAOPTIONS \
1123 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin
1124 else
1125 gcc $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1126 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin
1127 fi
1128
1129 fi #!RAWFLAG
1130
1131
1132 exit
1133