Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
deployment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
delphi
deployment
Commits
9294b392
Commit
9294b392
authored
6 months ago
by
Ulrich Schwickerath
Browse files
Options
Downloads
Patches
Plain Diff
Unify building on Darwin
parent
aa0b3644
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/make_dellib
+29
-46
29 additions, 46 deletions
scripts/make_dellib
scripts/phlib.csh
+2
-0
2 additions, 0 deletions
scripts/phlib.csh
with
31 additions
and
46 deletions
scripts/make_dellib
+
29
−
46
View file @
9294b392
...
...
@@ -167,6 +167,9 @@ if ($OS_ARCH eq 'x86_64') {
$CFLAGS
=
"
$CFLAGS
-mfpmath=387
";
$ADDFOPT
=
"
$ADDFOPT
-mfpmath=387
";
}
if
(
$OS
eq
'
Darwin
'){
$LDFLAGS
=
"
$LDFLAGS
-Wl,-ld_classic,-dead_strip
";
}
my
$gfortran_version
;
if
(
$OS
eq
"
Linux
"
||
$OS
eq
"
Darwin
"){
$gfortran_version
=
`
echo '__GNUC__'| gfortran -E -P -
`;
...
...
@@ -180,7 +183,6 @@ if ($OS eq "Linux" || $OS eq "Darwin"){
$ENV
{"
ADDFOPT
"}
=
$ADDFOPT
;
$ENV
{"
ADDCOPT
"}
=
$ADDCOPT
;
}
#
# parse the options
#
...
...
@@ -232,36 +234,29 @@ my %LIBRARIES;
if
(
grep
{
$VERSION
=~
/$_/
}
@lep1
){
%LIBRARIES
=
(
"
delana
"
=>
[
qw(ddapp cargo dplot delanagen deltask pxtag25
ufield delanamod tanagra322 uhlib delphys ux26
[
qw(ddapp cargo dplot delanagen deltask pxtag25
phdst
ufield delanamod tanagra322 uhlib delphys ux26
uxxx
pxdst33 trigglib fxsolv delana43.exe delblkd
comlib)
],
"
delsim
"
=>
[
qw(simrun36 modsim36 delsim36 jetst732 dbsnap shortdst longdst dbzeb)
]
);
push
(
@
{
$LIBRARIES
{
delsim
}},
qw[dstana10 vdclap phdst]
);
# pxdst defines the symbols _qnext and _zend which are also defined in CERNLIB. This should be generally fine
# but for shortdst and longdst which do not use the routines (pxloop and pxend) using those, and the Apple linker
# links these and their dependencies, resulting in thee need of adding most of the other DELPHI libraries albeit they
# should not be used. To remedy this, on Apple we create an additional library pxdstext which contains only those symbols
# of pxdst which are needed for (x)shortdst and longdst, and link against this one instead when creating these execs.
push
(
@
{
$LIBRARIES
{
delana
}},
qw[pxdstext]
)
if
$OS
eq
"
Darwin
";
}
else
{
%LIBRARIES
=
(
"
dstana
"
=>
[
qw(uxxx bsaurus dstanaxx herlibxx kalxx phdst
pxdstxx
[
qw(uxxx bsaurus dstanaxx herlibxx kalxx phdst
pxtagxx skelana tanagraxx triggerxx ufield
uhlib vdclapxx vfclapxx tauplus errhp delblkd)
],
"
delana
"
=>
[
qw(ddapp cargo dplot delanagen deltask pxtag25
[
qw(ddapp cargo dplot delanagen deltask pxtag25
phdst
ufield delanamod tanagra322 uhlib delphys
pxdst34 trigglib ux26 fxsolv delana45.exe delblkd
pxdst34 trigglib ux26
uxxx
fxsolv delana45.exe delblkd
comlib)
],
"
delsim
"
=>
[
qw(simrun36 modsim delsim jetst732 dbsnap xshortdst dbzeb)
]
);
push
(
@
{
$LIBRARIES
{
delsim
}},
qw[dstanaxx vdclapxx vfclapxx phdst]
);
push
(
@
{
$LIBRARIES
{
delana
}},
qw[pxdstext]
)
if
$OS
eq
"
Darwin
";
};
# only create dstana and delana executables for event server
undef
$LIBRARIES
{
delsim
}
if
defined
$DATA
;
...
...
@@ -587,7 +582,7 @@ sub MakeLibs {
if
(
$PACKAGE
eq
"
dstana
"){
print
CRA
"
+USE, SHIFT.
\n
+USE,
$PLINAM
,*
$PLINAM
.
\n
+USE, UNIX.
\n
";
}
else
{
print
CRA
"
+USE, SHIFT.
\n
+USE,
$PLINAM
,*
$PLINAM
.
\n
+USE, UNIX.
\n
"
if
grep
{
$_
eq
$lib
}
qw(pxdst33 pxdst34 ux26 dstanaxx vdclapxx vfclapxx ufield)
;
print
CRA
"
+USE, SHIFT.
\n
+USE,
$PLINAM
,*
$PLINAM
.
\n
+USE, UNIX.
\n
"
if
grep
{
$_
eq
$lib
}
qw(pxdst33 pxdst34 ux26
uxxx
dstanaxx vdclapxx vfclapxx ufield)
;
}
close
(
CRA
);
my
$delcra
=
$lib
;
...
...
@@ -1137,7 +1132,7 @@ sub CreateSimrun {
#
# Compile and link the executable
#
my
$command
=
"
$F77
{
$OS
}
$LDFLAGS
$FFLAGS
$ADDFOPT
-o
$lib
*.f
$DELPHI_BLKD
/simblkd.o
$dellib
$cernlib
";
my
$command
=
"
$F77
{
$OS
}
-v
$LDFLAGS
$FFLAGS
$ADDFOPT
-o
$lib
*.f
$DELPHI_BLKD
/simblkd.o
$dellib
$cernlib
";
PrintInfo
("
running
\"
$command
\"
");
system
(
$command
);
PrintInfo
("
No executable
\"
$lib
\"
created
")
if
not
-
f
$lib
;
...
...
@@ -1162,7 +1157,7 @@ sub CreateDelana {
my
$dellib
;
my
@liblist
;
if
(
$LEP1flag
){
@liblist
=
qw(trigglib pxdst33 pxtag25 pxdst33 delphys deltask delanamod delanagen delanamod ux
26
ddappxx tanagra322 uhlib ufield com)
;
@liblist
=
qw(trigglib pxdst33 pxtag25 pxdst33 delphys deltask delanamod delanagen delanamod ux
xx phdstxx
ddappxx tanagra322 uhlib ufield com)
;
map
{
PrintError
("
Cannot create
\"
$lib
.exe
\"
: no library
$DELPHI_LIB
/lib
$_
.a
")
if
not
-
f
"
$DELPHI_LIB
/lib
$_
.a
"}
@liblist
;
map
{
PrintError
("
Cannot create
\"
$lib
.exe
\"
: no object
$_
")
if
not
-
f
$_
}
("
$DELPHI_BLKD
/anablkd.o
","
$DELPHI_LIB
/fxsolv.o
");
#
...
...
@@ -1170,10 +1165,10 @@ sub CreateDelana {
#
map
{
$_
=
"
-l
$_
"}
@liblist
;
# prepend each library with "-l"
PrintInfo
(
@liblist
);
$dellib
=
"
$DELPHI_LIB
/fxsolv.o -L
$DELPHI_LIB
@liblist
";
$dellib
=
"
$DELPHI_LIB
/fxsolv.o -L
$DELPHI_LIB
@liblist
-lz
";
}
else
{
#LEP2
@liblist
=
qw(trigglib pxdst34 pxtag25 pxdst34 delphys deltask delanamod delanagen delanamod ux
26
ddappxx tanagra322 uhlib ufield com)
;
@liblist
=
qw(trigglib pxdst34 pxtag25 pxdst34 delphys deltask delanamod delanagen delanamod ux
xx phdstxx
ddappxx tanagra322 uhlib ufield com
)
;
map
{
PrintError
("
Cannot create
\"
$lib
.exe
\"
: no library
$DELPHI_LIB
/lib
$_
.a
")
if
not
-
f
"
$DELPHI_LIB
/lib
$_
.a
"}
@liblist
;
map
{
PrintError
("
Cannot create
\"
$lib
.exe
\"
: no object
$_
")
if
not
-
f
$_
}
("
$DELPHI_BLKD
/anablkd.o
","
$DELPHI_LIB
/fxsolv.o
");
#
...
...
@@ -1181,7 +1176,7 @@ sub CreateDelana {
#
map
{
$_
=
"
-l
$_
"}
@liblist
;
# prepend each library with "-l"
PrintInfo
(
@liblist
);
$dellib
=
"
$DELPHI_LIB
/fxsolv.o -L
$DELPHI_LIB
@liblist
";
$dellib
=
"
$DELPHI_LIB
/fxsolv.o -L
$DELPHI_LIB
@liblist
-lz
";
}
#
# create and fix the cradle
...
...
@@ -1218,7 +1213,7 @@ sub CreateDelana {
#
# Compile and link the executable
#
my
$command
=
"
$F77
{
$OS
}
$LDFLAGS
$FFLAGS
$ADDFOPT
-o
$lib
.exe *.f
$DELPHI_BLKD
/anablkd.o
$dellib
$cernlib
";
my
$command
=
"
$F77
{
$OS
}
-v
$LDFLAGS
$FFLAGS
$ADDFOPT
-o
$lib
.exe *.f
$DELPHI_BLKD
/anablkd.o
$dellib
$cernlib
";
PrintInfo
("
running
\"
$command
\"
");
system
(
$command
);
PrintInfo
("
No executable
\"
$lib
.exe
\"
created
")
if
not
-
f
"
$lib
.exe
";
...
...
@@ -1245,13 +1240,13 @@ sub MakeXShorty {
# make sure all necessary libraries are available
#
symlink
"
libtanagra322.a
","
$DELPHI_LIB
/libtanagraxx.a
"
if
-
f
"
$DELPHI_LIB
/libtanagra322.a
";
symlink
"
libux26.a
","
$DELPHI_LIB
/libuxxx.a
"
if
-
f
"
$DELPHI_LIB
/libux26.a
";
#
symlink "libux26.a","$DELPHI_LIB/libuxxx.a" if -f "$DELPHI_LIB/libux26.a";
symlink
"
libpxdst34.a
","
$DELPHI_LIB
/libpxdstxx.a
"
if
-
f
"
$DELPHI_LIB
/libpxdst34.a
";
symlink
"
libpxtag25.a
","
$DELPHI_LIB
/libpxtag2xx.a
"
if
-
f
"
$DELPHI_LIB
/libpxtag25.a
";
symlink
"
libufield.a
","
$DELPHI_LIB
/libufieldxx.a
"
if
-
f
"
$DELPHI_LIB
/libufield.a
";
symlink
"
libtrigglib.a
","
$DELPHI_LIB
/libtriggerxx.a
"
if
-
f
"
$DELPHI_LIB
/libtrigglib.a
";
symlink
"
libuhlib.a
","
$DELPHI_LIB
/libuhlibxx.a
"
if
-
f
"
$DELPHI_LIB
/libuhlib.a
";
my
@liblist
=
qw(dstana
xx
vdclap
xx
vfclap
xx
ufield
xx phdstx
x)
;
my
@liblist
=
qw(dstana vdclap vfclap ufield
pxtag tanagra trigger uhlib u
x)
;
map
{
PrintInfo
("
\"
$lib
.exe
\"
: no library
$DELPHI_LIB
/lib
$_
.a
")
if
not
-
f
"
$DELPHI_LIB
/lib
$_
.a
"}
@liblist
;
map
{
PrintError
("
Cannot create
\"
$lib
.exe
\"
: no object
$_
")
if
not
-
f
$_
}
("
$DELPHI_BLKD
/delblkd.o
");
#
...
...
@@ -1274,13 +1269,12 @@ sub MakeXShorty {
#
# Delphi libraries
#
chomp
(
my
$dellib
=
"
$libdir
"
.
`
$dellib
@liblist
`);
if
(
$OS
eq
"
Darwin
")
{
$dellib
.=
"
-lpxdstext
"
}
else
{
$dellib
.=
"
-lpxdst34
"
}
PrintInfo
("
Final DELPHI libraries for
$OS
$dellib
\n
");
#chomp (my $dellib = "$libdir " . `$dellib @liblist`);
#$dellib .= ' -lpxdst34 -lphdstxx -ldelanagen -ldelanamod -ldeltask';
my
$dellib
=
'
-L$DELPHI_LIB -lphdstxx
';
#phdst
$dellib
.=
'
-ldstanaxx -lpxdst34 -lufield -lvdclapxx -lvfclapxx -lphdstxx -ldstanaxx -luxxx -ltanagra322 -lpxtag25 -ltrigglib -luhlib -ldelanagen -ldelanamod -ldeltask
';
$dellib
.=
"
$libdir
-lz
";
PrintInfo
("
Final DELPHI libraries for
$OS
$dellib
\n
");
#
# Cern and system libraries
#
...
...
@@ -1318,13 +1312,12 @@ sub MakeShorty {
# make sure all necessary libraries are available
#
symlink
"
libtanagra322.a
","
$DELPHI_LIB
/libtanagraxx.a
"
if
-
f
"
$DELPHI_LIB
/libtanagra322.a
";
symlink
"
libux26.a
","
$DELPHI_LIB
/libuxxx.a
"
if
-
f
"
$DELPHI_LIB
/libux26.a
";
symlink
"
libpxdst33.a
","
$DELPHI_LIB
/libpxdstxx.a
"
if
-
f
"
$DELPHI_LIB
/libpxdst33.a
";
symlink
"
libpxtag25.a
","
$DELPHI_LIB
/libpxtag2xx.a
"
if
-
f
"
$DELPHI_LIB
/libpxtag25.a
";
symlink
"
libufield.a
","
$DELPHI_LIB
/libufieldxx.a
"
if
-
f
"
$DELPHI_LIB
/libufield.a
";
symlink
"
libtrigglib.a
","
$DELPHI_LIB
/libtriggerxx.a
"
if
-
f
"
$DELPHI_LIB
/libtrigglib.a
";
symlink
"
libuhlib.a
","
$DELPHI_LIB
/libuhlibxx.a
"
if
-
f
"
$DELPHI_LIB
/libuhlib.a
";
my
@liblist
=
qw(dstana10 ufield vdclap phdstxx pxdst33)
;
my
@liblist
=
qw(dstana10 ufield vdclap phdstxx pxdst33
uxxx tanagra322
)
;
map
{
PrintError
("
Cannot create
\"
$lib
.exe
\"
: no library
$DELPHI_LIB
/lib
$_
.a
")
if
not
-
f
"
$DELPHI_LIB
/lib
$_
.a
"}
@liblist
;
map
{
PrintError
("
Cannot create
\"
$lib
.exe
\"
: no object
$_
")
if
not
-
f
$_
}
("
$DELPHI_BLKD
/delblkd.o
");
#
...
...
@@ -1348,12 +1341,7 @@ sub MakeShorty {
# Delphi libraries
#
my
$dellib
=
'
-L$DELPHI_LIB -lphdstxx
';
#phdst
$dellib
.=
'
-ldstana10 -lufield -lvdclap -ldstana10 -lphdstxx
';
if
(
$OS
eq
"
Darwin
")
{
$dellib
.=
"
-lpxdstext
"
}
else
{
$dellib
.=
"
-lpxdst33
"
}
$dellib
.=
'
-ldstana10 -lpxdst33 -lufield -lvdclap -lphdstxx -ldstana10 -luxxx -ltanagra322 -lpxtag25 -ltrigglib -luhlib -ldelanagen -ldelanamod -ldeltask
';
$dellib
.=
"
$libdir
-lz
";
#
# Cern and system libraries
...
...
@@ -1362,7 +1350,7 @@ sub MakeShorty {
#
# Compile and link the executable
#
my
$command
=
"
$F77
{
$OS
}
$F
FLAGS
$
LD
FLAGS
$ADDFOPT
-o
$lib
.exe *.f
$DELPHI_BLKD
/delblkd.o -v
$dellib
$cernlib
";
my
$command
=
"
$F77
{
$OS
}
-v
$LD
FLAGS
$
F
FLAGS
$ADDFOPT
-o
$lib
.exe *.f
$DELPHI_BLKD
/delblkd.o -v
$dellib
$cernlib
";
PrintInfo
("
running
\"
$command
\"
");
system
(
$command
);
if
(
not
-
f
"
$lib
.exe
")
{
...
...
@@ -1388,7 +1376,7 @@ sub MakeLongy {
# make sure all necessary libraries are available
#
symlink
"
libtanagra322.a
","
$DELPHI_LIB
/libtanagraxx.a
"
if
-
f
"
$DELPHI_LIB
/libtanagra322.a
";
symlink
"
libux26.a
","
$DELPHI_LIB
/libuxxx.a
"
if
-
f
"
$DELPHI_LIB
/libux26.a
";
#
symlink "libux26.a","$DELPHI_LIB/libuxxx.a" if -f "$DELPHI_LIB/libux26.a";
symlink
"
libpxtag25.a
","
$DELPHI_LIB
/libpxtag2xx.a
"
if
-
f
"
$DELPHI_LIB
/libpxtag25.a
";
symlink
"
libpxdst33.a
","
$DELPHI_LIB
/libpxdstxx.a
"
if
-
f
"
$DELPHI_LIB
/libpxdst33.a
";
symlink
"
libufield.a
","
$DELPHI_LIB
/libufieldxx.a
"
if
-
f
"
$DELPHI_LIB
/libufield.a
";
...
...
@@ -1418,12 +1406,7 @@ sub MakeLongy {
# Delphi libraries
#
my
$dellib
=
'
-L$DELPHI_LIB -lphdstxx
';
#phdst
$dellib
.=
'
-ldstana10 -lufield -lvdclap -ldstana10 -lphdstxx
';
if
(
$OS
eq
"
Darwin
")
{
$dellib
.=
"
-lpxdstext
"
}
else
{
$dellib
.=
"
-lpxdst33
"
}
$dellib
.=
'
-ldstana10 -lpxdst33 -lufield -lvdclap -lphdstxx -ldstana10 -luxxx -ltanagra322 -lpxtag25 -ltrigglib -luhlib -ldelanagen -ldelanamod -ldeltask
';
$dellib
.=
"
$libdir
-lz
";
#
# Cern and system libraries
...
...
@@ -1432,7 +1415,7 @@ sub MakeLongy {
#
# Compile and link the executable
#
my
$command
=
"
$F77
{
$OS
}
$F
FLAGS
$
LD
FLAGS
$ADDFOPT
-fbounds-check -o
$lib
.exe *.f
$DELPHI_BLKD
/delblkd.o -v
$dellib
$cernlib
";
my
$command
=
"
$F77
{
$OS
}
-v
$LD
FLAGS
$
F
FLAGS
$ADDFOPT
-fbounds-check -o
$lib
.exe *.f
$DELPHI_BLKD
/delblkd.o -v
$dellib
$cernlib
";
PrintInfo
("
running
\"
$command
\"
");
system
(
$command
);
if
(
not
-
f
"
$lib
.exe
")
{
...
...
This diff is collapsed.
Click to expand it.
scripts/phlib.csh
+
2
−
0
View file @
9294b392
...
...
@@ -52,6 +52,7 @@ switch ( $Machine )
set CompileC = "cc -c -O2 -I/usr/local/include "
set Library = "ar srl "
breaksw
case LINUX:
case Linux:
set Ppatch = "LINUX, SHIFT"
set CompileF = "gfortran $FOPT -c"
...
...
@@ -59,6 +60,7 @@ switch ( $Machine )
set Library = "ar sr "
breaksw
case Darwin:
case DARWIN:
set Ppatch = "DARWIN, SHIFT"
set CompileF = "gfortran $FOPT -c"
set CompileC = "gcc $COPT -c"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment