forked from SAnsell/CombLayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetMk.pl
executable file
·145 lines (119 loc) · 6.31 KB
/
getMk.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#!/usr/bin/perl -w
## use lib "/home/ansell/exe/getMk";
use getMake;
use strict;
## EXECUTABLES
my @masterprog=("fullBuild","ess","muBeam",
"sns","t1Real","t1MarkII","testMain");
my @noncompile=("bilbau","clayer","cuBuild","d4c","detectSim",
"epb","ess","fussion","lens",
"pressure","reactor","vcn","power");
## CXX Directory
my @sublibdir=("src","attachComp","bibBuild","build", # 0
"chip","construct","crystal","cuBlock", # 4
"d4cModel","delft","endf","epbBuild", # 8
"essBuild","funcBase","geometry","global", # 12
"imat","input","instrument","lensModel", # 16
"log","md5","moderator","mersenne", # 20
"monte","muon","physics","poly", # 24
"process","scatMat","snsBuild","source", # 28
"support", "tally","t1Build","t1Upgrade", # 32
"transport","visit","weights","world", # 36
"work","xml","zoom","special", # 40
"test");
my @core=qw( src attachComp construct crystal endf funcBase
geometry global input instrument log md5 monte
mersenne physics poly process scatMat source
support tally transport visit weights
world work xml special test);
my @coreInc=qw( include attachCompInc constructInc crystalInc
endfInc funcBaseInc geomInc globalInc inputInc
instrumentInc logInc md5Inc mersenneInc
monteInc muonInc physicsInc polyInc processInc scatMatInc
sourceInc supportInc tallyInc transportInc visitInc
weightsInc worldInc workInc xmlInc specialInc testInclude);
my @libnames=@sublibdir;
## INCLUDES
my @incdir=("include","attachCompInc","bibBuildInc","buildInc","chipInc",
"constructInc","crystalInc","cuBlockInc","d4cModelInc",
"delftInc","endfInc","epbBuildInc","essBuildInc",
"funcBaseInc","geomInc","globalInc","imatInc",
"inputInc","instrumentInc","lensModelInc","logInc",
"md5Inc","mersenneInc","moderatorInc","monteInc",
"muonInc","physicsInc","polyInc",
"processInc","scatMatInc","snsBuildInc","sourceInc","specialInc",
"supportInc","tallyInc","t1BuildInc","t1UpgradeInc",
"transportInc","visitInc","weightsInc","workInc",
"worldInc","xmlInc","zoomInc","testInclude"); ## Includes
## Flags on executables
my @controlflags=("-S -B","-S -B","-S -B","-S -B",
"-S -B","-S -B","-S -B",
"-S -B","-S -B","-S -B","-S -B",
"-S -B");
## Lib flags
my @libflags=("","","","","",
"","","","","","",
"","","","","-S","",
"","","","",
"","","","",
"","","","",
"","","","","","");
my $gM=new getMake;
$gM->addMasterProgs(\@masterprog,\@controlflags);
$gM->addCoreItems(\@core,\@coreInc);
$gM->addLibs(\@libnames,\@sublibdir,\@libflags);
$gM->addIncDir(\@incdir);
# my @libnames=("mcnpx","build","funcBase","geometry", 0,1,2,3
# "log","monte","mersenne","poly", 4,5,6,7,
# "process","support","test","lensModel");
$gM->addDepUnit("bilbau", [2,9,37,0,26,17,31,24,13,20,33,5,6,36,29,21,10,28,39,40,24,14,23,0,41,27,32,38,15,1,37,3]);
$gM->addDepUnit("pressure", [37,42,0,24,15,13,20,4,24,23,26,14,33,40,41,27,17,28,37,38,21,1,37]);
$gM->addDepUnit("divide", [43,37,4,3,42,0,26,24,13,20,24,23,0,14,17,28,40,41,27,32,38,21,15,1,37]);
$gM->addDepUnit("fullBuild",[3,37,4,22,3,42,16,0,26,5,36,29,6,10,17,31,24,13,20,33,28,33,39,24,14,23,0,40,41,27,32,38,21,15,1,37]);
$gM->addDepUnit("d4c", [8,19,37,0,26,17,18,31,24,13,20,5,6,36,29,10,36,29,33,28,33,39,5,24,14,23,0,41,27,32,38,40,21,15,1,37]);
$gM->addDepUnit("lens", [19,37,0,26,17,31,24,13,20,5,6,36,29,10,36,29,33,28,33,39,5,24,14,23,0,41,27,32,38,21,15,1,37]);
$gM->addDepUnit("simple", [37,26,0,17,31,24,13,20,6,36,29,10,28,33,39,24,14,23,0,41,27,32,38,21,15,1,28,40,33,37]);
$gM->addDepUnit("t1MarkII", [35,34,16,4,3,37,22,42,0,5,6,36,29,10,26,17,28,31,24,13,20,24,33,14,23,0,39,40,41,27,32,38,21,15,1,37,27]);
$gM->addDepUnit("ts1layer", [3,37,4,22,3,42,0,26,17,28,24,13,20,24,33,14,23,0,40,41,27,32,38,21,15,1,37,27]);
$gM->addDepUnit("t1Real", [34,16,4,3,37,22,42,0,5,6,36,29,10,26,17,28,31,24,13,20,24,33,14,23,0,39,40,41,27,32,38,21,15,1,37,27]);
$gM->addDepUnit("reactor", [9,37,0,26,17,31,24,13,20,5,36,29,6,10,33,28,33,39,24,14,23,0,41,27,32,38,21,40,15,1,37]);
$gM->addDepUnit("siMod", [37,0,26,17,31,24,13,20,33,5,6,36,29,10,28,39,24,14,23,0,41,27,32,38,15,1,37]);
$gM->addDepUnit("cuBuild", [7,9,37,0,26,17,31,24,13,20,33,5,6,36,29,21,10,28,39,40,24,14,23,0,41,27,32,38,15,1,37]);
$gM->addDepUnit("ess", [12,37,0,26,17,31,24,13,20,33,5,6,36,29,21,10,28,39,40,24,14,23,0,41,27,32,38,15,1,37]);
$gM->addDepUnit("sns", [30,37,0,26,17,31,24,13,20,33,5,6,36,29,21,10,28,39,40,24,14,23,0,41,27,32,38,15,1,37]);
$gM->addDepUnit("epb", [11,9,37,0,26,17,31,24,13,20,33,5,6,36,29,21,10,28,39,40,24,14,23,0,41,27,32,38,15,1,37]);
$gM->addDepUnit("muBeam", [25,34,16,4,3,37,22,42,0,5,6,36,29,10,26,17,28,31,24,13,20,24,33,14,23,0,39,40,41,27,32,38,21,15,1,37,27]);
$gM->addDepUnit("testMain", [44,3,37,4,35,16,22,3,42,5,6,36,29,10,34,0,26,17,28,31,24,13,20,14,33,23,0,40,41,27,32,39,38,21,15,1,37,27]);
##
## START OF MAIN:::
##
if (@ARGV==0)
{
print STDERR "Options \n";
print STDERR " -O :: optimise \n";
print STDERR " -P :: profile \n";
print STDERR " -G :: Glut \n";
print STDERR " -g :: No debug\n";
print STDERR " -K :: GTK \n";
print STDERR " -S :: GSL \n";
print STDERR " -NS :: No GSL \n";
print STDERR " -M :: GTKmm \n";
print STDERR " -L :: Don't make library\n";
print STDERR " -m :: masterprog : Set master prog\n";
print STDERR " -o :: outputDir \n";
print STDERR " -s :: shared \n";
print STDERR " -u :: lua \n";
print STDERR " -v :: Add -v to the linker \n";
print STDERR " -w :: SWIG lua \n";
print STDERR " -x :: executable name \n";
$gM->findNonUniq();
exit(1);
}
$gM->setParameters(\@ARGV);
$gM->setPrintFile("Makefile");
$gM->printHeaders();
$gM->runSubDir();
$gM->runMainDir();
$gM->runSwigDir();
$gM->appPrintFile("Makefile");
$gM->printMainAll();