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