0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 # gccopts.sh Shell script for configuring MEX-file creation script,
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3 # mex. These options were tested with the specified compiler.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 # usage: Do not call this file directly; it is sourced by the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 # mex shell script. Modify only if you don't like the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 # defaults after running mex. No spaces are allowed
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 # around the '=' in the variable assignment.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 # Note: For the version of system compiler supported with this release,
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 # refer to the Supported and Compatible Compiler List at:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 # http://www.mathworks.com/support/compilers/current_release/
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 # SELECTION_TAGs occur in template option files and are used by MATLAB
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 # tools, such as mex and mbuild, to determine the purpose of the contents
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 # of an option file. These tags are only interpreted when preceded by '#'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 # and followed by ':'.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 #SELECTION_TAG_MEX_OPT: Template Options file for building gcc MEX-files
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 # Copyright 1984-2008 The MathWorks, Inc.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 # $Revision: 1.43.4.15 $ $Date: 2008/11/04 19:40:06 $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 #----------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 TMW_ROOT="$MATLAB"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 MFLAGS=''
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 if [ "$ENTRYPOINT" = "mexLibrary" ]; then
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 MLIBS="-L$TMW_ROOT/bin/$Arch -lmx -lmex -lmat -lmwservices -lut"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 MLIBS="-L$TMW_ROOT/bin/$Arch -lmx -lmex -lmat"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 fi
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 case "$Arch" in
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34 Undetermined)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35 #----------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 # Change this line if you need to specify the location of the MATLAB
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 # root directory. The script needs to know where to find utility
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38 # routines so that it can determine the architecture; therefore, this
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 # assignment needs to be done while the architecture is still
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40 # undetermined.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 #----------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 MATLAB="$MATLAB"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 ;;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44 glnx86)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 #----------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 RPATH="-Wl,-rpath-link,$TMW_ROOT/bin/$Arch"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 # StorageVersion: 1.0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48 # CkeyName: GNU C
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 # CkeyManufacturer: GNU
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50 # CkeyLanguage: C
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51 # CkeyVersion:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 CC='gcc'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53 CFLAGS='-ansi -D_GNU_SOURCE'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 CFLAGS="$CFLAGS -fPIC -pthread -m32"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55 CFLAGS="$CFLAGS -fexceptions"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57 CLIBS="$RPATH $MLIBS -lm"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58 COPTIMFLAGS='-O -DNDEBUG'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59 CDEBUGFLAGS='-g'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60 CLIBS="$CLIBS -lstdc++"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62 # C++keyName: GNU C++
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
63 # C++keyManufacturer: GNU
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
64 # C++keyLanguage: C++
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
65 # C++keyVersion:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66 CXX='g++'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
67 CXXFLAGS='-ansi -D_GNU_SOURCE'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
68 CXXFLAGS="$CXXFLAGS -D_FILE_OFFSET_BITS=64"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
69 CXXFLAGS="$CXXFLAGS -fPIC -pthread"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
70 CXXLIBS="$RPATH $MLIBS -lm"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
71 CXXOPTIMFLAGS='-O -DNDEBUG'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
72 CXXDEBUGFLAGS='-g'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
73 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
74 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
75 # FortrankeyName: g95
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
76 # FortrankeyManufacturer: GNU
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
77 # FortrankeyLanguage: Fortran
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
78 # FortrankeyVersion:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
79 FC='g95'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
80 FFLAGS='-fexceptions'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
81 FFLAGS="$FFLAGS -fPIC"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
82 FLIBS="$RPATH $MLIBS -lm"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
83 FOPTIMFLAGS='-O'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
84 FDEBUGFLAGS='-g'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
85 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
86 LD="$COMPILER"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
87 LDEXTENSION='.mexglx'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
88 LDFLAGS="-pthread -shared -m32 -Wl,--version-script,$TMW_ROOT/extern/lib/$Arch/$MAPFILE -Wl,--no-undefined"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
89 LDOPTIMFLAGS='-O'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
90 LDDEBUGFLAGS='-g'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
91 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
92 POSTLINK_CMDS=':'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
93 #----------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
94 ;;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
95 glnxa64)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
96 #----------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
97 RPATH="-Wl,-rpath-link,$TMW_ROOT/bin/$Arch"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
98 # StorageVersion: 1.0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
99 # CkeyName: GNU C
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
100 # CkeyManufacturer: GNU
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
101 # CkeyLanguage: C
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
102 # CkeyVersion:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
103 CC='gcc'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
104 CFLAGS='-ansi -D_GNU_SOURCE'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
105 CFLAGS="$CFLAGS -fexceptions"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
106 CFLAGS="$CFLAGS -fPIC -fno-omit-frame-pointer -pthread"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
107 CLIBS="$RPATH $MLIBS -lm"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
108 COPTIMFLAGS='-O -DNDEBUG'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
109 CDEBUGFLAGS='-g'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
110 CLIBS="$CLIBS -lstdc++"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
111 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
112 # C++keyName: GNU C++
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
113 # C++keyManufacturer: GNU
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
114 # C++keyLanguage: C++
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
115 # C++keyVersion:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
116 CXX='g++'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
117 CXXFLAGS='-ansi -D_GNU_SOURCE'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
118 CXXFLAGS="$CXXFLAGS -fPIC -fno-omit-frame-pointer -pthread"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
119 CXXLIBS="$RPATH $MLIBS -lm"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
120 CXXOPTIMFLAGS='-O -DNDEBUG'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
121 CXXDEBUGFLAGS='-g'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
122 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
123 # FortrankeyName: g95
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
124 # FortrankeyManufacturer: GNU
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
125 # FortrankeyLanguage: Fortran
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
126 # FortrankeyVersion:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
127 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
128 FC='g95'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
129 FFLAGS='-fexceptions'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
130 FFLAGS="$FFLAGS -fPIC -fno-omit-frame-pointer"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
131 FLIBS="$RPATH $MLIBS -lm"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
132 FOPTIMFLAGS='-O'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
133 FDEBUGFLAGS='-g'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
134 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
135 LD="$COMPILER"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
136 LDEXTENSION='.mexa64'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
137 LDFLAGS="-pthread -shared -Wl,--version-script,$TMW_ROOT/extern/lib/$Arch/$MAPFILE -Wl,--no-undefined"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
138 LDOPTIMFLAGS='-O'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
139 LDDEBUGFLAGS='-g'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
140 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
141 POSTLINK_CMDS=':'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
142 #----------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
143 ;;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
144 sol64)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
145 #----------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
146 # StorageVersion: 1.0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
147 # CkeyName: GNU C
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
148 # CkeyManufacturer: GNU
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
149 # CkeyLanguage: C
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
150 # CkeyVersion:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
151 CC='gcc'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
152 GCC_LIBDIR=`$CC -print-file-name=libgcc_s.so | sed -e 's|libgcc_s.so||'`
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
153 CFLAGS='-fPIC -fexceptions -m64'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
154 CLIBS="$MLIBS -lm"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
155 COPTIMFLAGS='-O -DNDEBUG'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
156 CDEBUGFLAGS='-g'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
157 # C++keyName: GNU C++
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
158 # C++keyManufacturer: GNU
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
159 # C++keyLanguage: C++
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
160 # C++keyVersion:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
161 CXXDEBUGFLAGS='-g'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
162 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
163 CXX='g++'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
164 CXXFLAGS='-fPIC -m64'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
165 CXXLIBS="$MLIBS -lm"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
166 CXXOPTIMFLAGS='-O -DNDEBUG'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
167 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
168 LD="$COMPILER"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
169 LDEXTENSION='.mexs64'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
170 LDFLAGS="-shared -Wl,-M,$TMW_ROOT/extern/lib/$Arch/$MAPFILE,-R,$GCC_LIBDIR -m64"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
171 LDOPTIMFLAGS='-O'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
172 LDDEBUGFLAGS='-g'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
173 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
174 POSTLINK_CMDS=':'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
175 #----------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
176 ;;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
177 mac)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
178 #----------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
179 echo "Error: Did not imbed 'options.sh' code"; exit 1 #imbed options.sh mac 12
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
180 #----------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
181 ;;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
182 maci)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
183 #----------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
184 # StorageVersion: 1.0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
185 # CkeyName: GNU C
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
186 # CkeyManufacturer: GNU
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
187 # CkeyLanguage: C
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
188 # CkeyVersion:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
189 CC='gcc-4.0'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
190 SDKROOT='/Developer/SDKs/MacOSX10.5.sdk'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
191 MACOSX_DEPLOYMENT_TARGET='10.5'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
192 ARCHS='i386'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
193 CFLAGS="-fno-common -no-cpp-precomp -arch $ARCHS -isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
194 CFLAGS="$CFLAGS -fexceptions"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
195 CLIBS="$MLIBS"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
196 COPTIMFLAGS='-O2 -DNDEBUG'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
197 CDEBUGFLAGS='-g'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
198 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
199 CLIBS="$CLIBS -lstdc++"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
200 # C++keyName: GNU C++
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
201 # C++keyManufacturer: GNU
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
202 # C++keyLanguage: C++
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
203 # C++keyVersion:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
204 CXX=g++-4.0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
205 CXXFLAGS="-fno-common -no-cpp-precomp -fexceptions -arch $ARCHS -isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
206 CXXLIBS="$MLIBS -lstdc++"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
207 CXXOPTIMFLAGS='-O2 -DNDEBUG'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
208 CXXDEBUGFLAGS='-g'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
209 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
210 # FortrankeyName: GNU Fortran
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
211 # FortrankeyManufacturer: GNU
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
212 # FortrankeyLanguage: Fortran
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
213 # FortrankeyVersion:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
214 FC='gfortran'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
215 FFLAGS='-fexceptions -fbackslash'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
216 FC_LIBDIR=`$FC -print-file-name=libgfortran.dylib 2>&1 | sed -n '1s/\/*libgfortran\.dylib//p'`
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
217 FC_LIBDIR2=`$FC -print-file-name=libgfortranbegin.a 2>&1 | sed -n '1s/\/*libgfortranbegin\.a//p'`
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
218 FLIBS="$MLIBS -L$FC_LIBDIR -lgfortran -L$FC_LIBDIR2 -lgfortranbegin"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
219 FOPTIMFLAGS='-O'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
220 FDEBUGFLAGS='-gdwarf-2'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
221 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
222 LD="$CC"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
223 LDEXTENSION='.mexmaci'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
224 LDFLAGS="-Wl,-twolevel_namespace -undefined error -arch $ARCHS -Wl,-syslibroot,$SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
225 LDFLAGS="$LDFLAGS -bundle -Wl,-exported_symbols_list,$TMW_ROOT/extern/lib/$Arch/$MAPFILE"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
226 LDOPTIMFLAGS='-O'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
227 LDDEBUGFLAGS='-g'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
228 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
229 POSTLINK_CMDS=':'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
230 #----------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
231 ;;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
232 maci64)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
233 #----------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
234 # StorageVersion: 1.0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
235 # CkeyName: GNU C
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
236 # CkeyManufacturer: GNU
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
237 # CkeyLanguage: C
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
238 # CkeyVersion:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
239 CC='gcc-4.0'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
240 SDKROOT='/Developer/SDKs/MacOSX10.5.sdk'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
241 MACOSX_DEPLOYMENT_TARGET='10.5'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
242 ARCHS='x86_64'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
243 CFLAGS="-fno-common -no-cpp-precomp -arch $ARCHS -isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
244 CFLAGS="$CFLAGS -fexceptions"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
245 CLIBS="$MLIBS"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
246 COPTIMFLAGS='-O2 -DNDEBUG'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
247 CDEBUGFLAGS='-g'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
248 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
249 CLIBS="$CLIBS -lstdc++"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
250 # C++keyName: GNU C++
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
251 # C++keyManufacturer: GNU
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
252 # C++keyLanguage: C++
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
253 # C++keyVersion:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
254 CXX=g++-4.0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
255 CXXFLAGS="-fno-common -no-cpp-precomp -fexceptions -arch $ARCHS -isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
256 CXXLIBS="$MLIBS -lstdc++"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
257 CXXOPTIMFLAGS='-O2 -DNDEBUG'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
258 CXXDEBUGFLAGS='-g'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
259 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
260 # FortrankeyName: GNU Fortran
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
261 # FortrankeyManufacturer: GNU
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
262 # FortrankeyLanguage: Fortran
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
263 # FortrankeyVersion:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
264 FC='gfortran'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
265 FFLAGS='-fexceptions -m64 -fbackslash'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
266 FC_LIBDIR=`$FC -print-file-name=libgfortran.dylib 2>&1 | sed -n '1s/\/*libgfortran\.dylib//p'`
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
267 FC_LIBDIR2=`$FC -print-file-name=libgfortranbegin.a 2>&1 | sed -n '1s/\/*libgfortranbegin\.a//p'`
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
268 FLIBS="$MLIBS -L$FC_LIBDIR -lgfortran -L$FC_LIBDIR2 -lgfortranbegin"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
269 FOPTIMFLAGS='-O'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
270 FDEBUGFLAGS='-g'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
271 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
272 LD="$CC"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
273 LDEXTENSION='.mexmaci64'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
274 LDFLAGS="-Wl,-twolevel_namespace -undefined error -arch $ARCHS -Wl,-syslibroot,$SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
275 LDFLAGS="$LDFLAGS -bundle -Wl,-exported_symbols_list,$TMW_ROOT/extern/lib/$Arch/$MAPFILE"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
276 LDOPTIMFLAGS='-O'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
277 LDDEBUGFLAGS='-g'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
278 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
279 POSTLINK_CMDS=':'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
280 #----------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
281 ;;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
282 esac
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
283 #############################################################################
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
284 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
285 # Architecture independent lines:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
286 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
287 # Set and uncomment any lines which will apply to all architectures.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
288 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
289 #----------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
290 # CC="$CC"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
291 # CFLAGS="$CFLAGS"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
292 # COPTIMFLAGS="$COPTIMFLAGS"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
293 # CDEBUGFLAGS="$CDEBUGFLAGS"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
294 # CLIBS="$CLIBS"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
295 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
296 # FC="$FC"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
297 # FFLAGS="$FFLAGS"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
298 # FOPTIMFLAGS="$FOPTIMFLAGS"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
299 # FDEBUGFLAGS="$FDEBUGFLAGS"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
300 # FLIBS="$FLIBS"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
301 #
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
302 # LD="$LD"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
303 # LDFLAGS="$LDFLAGS"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
304 # LDOPTIMFLAGS="$LDOPTIMFLAGS"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
305 # LDDEBUGFLAGS="$LDDEBUGFLAGS"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
306 #----------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
307 #############################################################################
|