1 | #!/bin/csh
|
---|
2 | # SOPHYA configuration managment script
|
---|
3 | # C. Magneville / R. Ansari - Mai 2005
|
---|
4 | # Exemple: ./configure -sbase /laltmp/ansari/sbase/ -scxx cxx -extp /exp/planck/ExtLibs/Include/ \
|
---|
5 | # -extp /exp/planck/ExtLibs/OSF1-cxx/
|
---|
6 |
|
---|
7 | #----------------------------------------------------------------------
|
---|
8 | #### liste des modules
|
---|
9 | set SOPMODOK = ( 1 1 1 1 1 1 1 1 1 )
|
---|
10 | set SOPMOD = ( BaseTools SysTools SUtils TArray NTools HiStats SkyMap Samba SkyT )
|
---|
11 | set ALLSOPLIBS = ( '-lBaseTools' '-lSysTools' '-lSUtils' '-lTArray' '-lNTools' '-lHiStats' '-lSkyMap' '-lSamba' '-lSkyT' )
|
---|
12 |
|
---|
13 | set SOPPIOK = ( 1 1 1 )
|
---|
14 | set SOPPI = ( PI PIext PIGcont )
|
---|
15 | set ALLPILIBS = ( '-lPI' '-lPIext' '-lPIGcont' )
|
---|
16 |
|
---|
17 | set SOPEXT = ( FitsIOServer IFFTW LinAlg XAstroPack )
|
---|
18 | set EXTCURNAME = ( fits fftw lapack astro )
|
---|
19 | set SOPEXTOK = ( 1 1 1 1 )
|
---|
20 | set EXTINCNAME = ( FitsIO/fitsio.h FFTW/fftw3.h PASDEINC XAstro/astro.h )
|
---|
21 | set EXTLIBNAME = ( libcfitsio.a libfftw3.a liblapack.a libxastro.a )
|
---|
22 | set ALLEXTLIBS = ( '-lcfitsio' '-lfftw3' '-llapack -lblas' '-lxastro' )
|
---|
23 |
|
---|
24 | #FFTW2: set EXTINCNAME = ( FitsIO/fitsio.h FFTW/fftw.h PASDEINC XAstro/astro.h )
|
---|
25 | #FFTW2: set EXTLIBNAME = ( libcfitsio.a libfftw.a liblapack.a libxastro.a )
|
---|
26 | #FFTW2: set ALLEXTLIBS = ( '-lcfitsio' '-lfftw -lrfftw' '-llapack -lblas' '-lxastro' )
|
---|
27 |
|
---|
28 | set defextinc = ( /usr/include /usr/local/include )
|
---|
29 | set defextlib = ( /usr/lib /usr/local/lib )
|
---|
30 |
|
---|
31 |
|
---|
32 | #----------------------------------------------------------------------
|
---|
33 | #### Decodage arguments
|
---|
34 | set cmdline = "$0 $*"
|
---|
35 | set extpath
|
---|
36 | set extpathinc
|
---|
37 | set extpathlib
|
---|
38 | unset incln
|
---|
39 | unset mincname
|
---|
40 | unset usefftw2
|
---|
41 | unset uselapack2
|
---|
42 | unset singleslb
|
---|
43 | while ( $#argv > 0 )
|
---|
44 |
|
---|
45 | if( "$1" == "-h" ) then
|
---|
46 | echo 'configure [-sbase SOPHYABASE] [-scxx SOPHYACXX] [-incln] [-minc mymake.inc] '
|
---|
47 | echo ' [-extp dir1 -extp dir2 ...] [-extip dir1 -extip dir2 ... ] [-extlp dir1 -extlp dir2 ... ]'
|
---|
48 | echo ' [-noextlib -noext fits -noext fftw -noext lapack -noext astro]'
|
---|
49 | echo ' [-usefftw2 -uselapack2] [-singleslb]'
|
---|
50 | exit -1
|
---|
51 | endif
|
---|
52 | if( "$1" == "-sbase" ) then
|
---|
53 | setenv SOPHYABASE $2
|
---|
54 | shift
|
---|
55 | endif
|
---|
56 | if( "$1" == "-scxx" ) then
|
---|
57 | setenv SOPHYACXX $2
|
---|
58 | shift
|
---|
59 | endif
|
---|
60 | if( "$1" == "-incln" ) then
|
---|
61 | set incln
|
---|
62 | endif
|
---|
63 | if( "$1" == "-minc" ) then
|
---|
64 | set mincname = ( $2 )
|
---|
65 | shift
|
---|
66 | endif
|
---|
67 | if( "$1" == "-extp" ) then
|
---|
68 | set extpath = ( $extpath $2 )
|
---|
69 | shift
|
---|
70 | endif
|
---|
71 | if( "$1" == "-extip" ) then
|
---|
72 | set extpathinc = ( $extpathinc $2 )
|
---|
73 | shift
|
---|
74 | endif
|
---|
75 | if( "$1" == "-extlp" ) then
|
---|
76 | set extpathlib = ( $extpathlib $2 )
|
---|
77 | shift
|
---|
78 | endif
|
---|
79 | if( "$1" == "-noextlib" ) then
|
---|
80 | set i = 0
|
---|
81 | while ( $i < $#SOPEXTOK )
|
---|
82 | @ i += 1
|
---|
83 | set SOPEXTOK[$i] = 0
|
---|
84 | end
|
---|
85 | endif
|
---|
86 | if( "$1" == "-noext" ) then
|
---|
87 | set i = 0
|
---|
88 | while ( $i < $#EXTCURNAME )
|
---|
89 | @ i += 1
|
---|
90 | if( "$2" == "$EXTCURNAME[$i]" ) set SOPEXTOK[$i] = 0
|
---|
91 | end
|
---|
92 | shift
|
---|
93 | endif
|
---|
94 | if( "$1" == "-usefftw2" ) then
|
---|
95 | # version FFTW 2 au lieu de V3
|
---|
96 | set usefftw2
|
---|
97 | set i = 0
|
---|
98 | while ( $i < $#EXTCURNAME )
|
---|
99 | @ i += 1
|
---|
100 | if( "fftw" == "$EXTCURNAME[$i]" ) then
|
---|
101 | set EXTINCNAME[$i] = 'FFTW/fftw.h'
|
---|
102 | set EXTLIBNAME[$i] = 'libfftw.a'
|
---|
103 | set ALLEXTLIBS[$i] = '-lfftw -lrfftw'
|
---|
104 | endif
|
---|
105 | end
|
---|
106 | endif
|
---|
107 | if( "$1" == "-uselapack2" ) then
|
---|
108 | # version LAPACK 2 au lieu de V3
|
---|
109 | set uselapack2
|
---|
110 | endif
|
---|
111 | if( "$1" == "-singleslb" ) then
|
---|
112 | # Pour utiliser une seule librairie libsophyaPIext.so au lieu
|
---|
113 | # des 3 libsophya.so libextsophya.so libPI.so
|
---|
114 | set singleslb
|
---|
115 | endif
|
---|
116 |
|
---|
117 | shift
|
---|
118 | end
|
---|
119 |
|
---|
120 |
|
---|
121 | #----------------------------------------------------------------------
|
---|
122 | #### Verification generale
|
---|
123 | if( ! $?SOPHYABASE ) then
|
---|
124 | echo ERROR: define SOPHYABASE or use script arguments
|
---|
125 | exit -2
|
---|
126 | endif
|
---|
127 | if( ! $?SOPHYACXX ) then
|
---|
128 | echo ERROR: define SOPHYACXX or use script arguments
|
---|
129 | echo " SOPHYACXX define the name of the C++ compiler (ex: g++ cxx ...)"
|
---|
130 | exit -2
|
---|
131 | endif
|
---|
132 | if( ! $?TMPDIR ) setenv TMPDIR /tmp
|
---|
133 | touch $TMPDIR/tmp_test
|
---|
134 | if( $status != 0 ) then
|
---|
135 | echo ERROR: no write acces in temporary directory: $TMPDIR
|
---|
136 | echo '----> define TMPDIR environment variable: "setenv TMPDIR ..."'
|
---|
137 | exit -2
|
---|
138 | endif
|
---|
139 | rm -f $TMPDIR/tmp_test
|
---|
140 | if( ! $?mincname ) then
|
---|
141 | set mincname = `uname`_${SOPHYACXX}_make.inc
|
---|
142 | endif
|
---|
143 | if( ! -e $mincname ) then
|
---|
144 | echo ERROR: file $mincname NOT found
|
---|
145 | exit -2
|
---|
146 | endif
|
---|
147 | if( ! -e ../BaseTools/machdefs_mkmf.h ) then
|
---|
148 | echo ERROR: file machdefs_mkmf.h NOT found in BaseTools
|
---|
149 | exit -2
|
---|
150 | endif
|
---|
151 | echo SOPEXTOK: $SOPEXTOK
|
---|
152 |
|
---|
153 | #----------------------------------------------------------------------
|
---|
154 | #### creation des variables chemins sophya core
|
---|
155 | echo " "
|
---|
156 | echo ">>>>>> 1/ Creating directory tree under $SOPHYABASE "
|
---|
157 | set sinc = $SOPHYABASE/include
|
---|
158 | set slib = $SOPHYABASE/lib
|
---|
159 | set sslb = $SOPHYABASE/slb
|
---|
160 | set sobj = $SOPHYABASE/obj
|
---|
161 | set sexe = $SOPHYABASE/exe
|
---|
162 | set sconf = $sinc/SophyaConfInfo
|
---|
163 | foreach d ( $sinc $slib $sslb $sobj $sexe $sconf )
|
---|
164 | if( ! -d $d ) then
|
---|
165 | mkdir $d
|
---|
166 | if( $status ) then
|
---|
167 | echo ERROR: creation of $d failed
|
---|
168 | exit -3
|
---|
169 | endif
|
---|
170 | echo Directory $d created
|
---|
171 | endif
|
---|
172 | touch $d/tmp_test
|
---|
173 | if( $status ) then
|
---|
174 | echo ERROR: no write acces to $d
|
---|
175 | exit -4
|
---|
176 | endif
|
---|
177 | rm -f $d/tmp_test
|
---|
178 | end
|
---|
179 |
|
---|
180 |
|
---|
181 | #----------------------------------------------------------------------
|
---|
182 | #### Fichier confinfo - log e configure
|
---|
183 | set conflog = $sconf/conf.log
|
---|
184 | rm -f $conflog ; touch $conflog
|
---|
185 | echo ' --- Log of SOPHYA configure script - Date= ' `date` >> $conflog
|
---|
186 | echo "$cmdline" >> $conflog
|
---|
187 | set inclistf = $sconf/include.list
|
---|
188 | rm -f $inclistf ; touch $inclistf
|
---|
189 |
|
---|
190 |
|
---|
191 | #----------------------------------------------------------------------
|
---|
192 | #### liens ou copie des *.h
|
---|
193 | echo " "
|
---|
194 | if( $?incln ) then
|
---|
195 | echo ">>>>>> 2/ Creating symbolic link for include files in $sinc "
|
---|
196 | else
|
---|
197 | echo ">>>>>> 2/ Copying include files to $sinc "
|
---|
198 | endif
|
---|
199 |
|
---|
200 | cd ../ > /dev/null
|
---|
201 | set srcd = `pwd`
|
---|
202 | set cpln = "cp -p "
|
---|
203 | if( $?incln ) set cpln = "ln -s -f "
|
---|
204 | foreach d ( $SOPMOD $SOPEXT $SOPPI )
|
---|
205 | if ( -d $srcd/$d ) then
|
---|
206 | if ( $?incln ) then
|
---|
207 | echo Creating link to include files for module $d
|
---|
208 | else
|
---|
209 | echo Copying include files for module $d
|
---|
210 | endif
|
---|
211 |
|
---|
212 | cd $srcd/$d;
|
---|
213 | set file = ( *.h )
|
---|
214 | cd $sinc; if( $status == 0 ) rm -f $file
|
---|
215 | # on vire le .h de $file si .h dans excludeinc du module
|
---|
216 | cd $srcd/$d
|
---|
217 | if( -e excludeinc ) then
|
---|
218 | if( `cat excludeinc | wc -l` > 0 ) then
|
---|
219 | set file
|
---|
220 | foreach f ( *.h )
|
---|
221 | grep -q "$f:r\.h" excludeinc
|
---|
222 | if( $status != 0 ) set file = ( $file $f )
|
---|
223 | end
|
---|
224 | endif
|
---|
225 | endif
|
---|
226 | # on copie ou link dans $sinc
|
---|
227 | if( `echo $file | wc -w` > 0 ) then
|
---|
228 | foreach f ( $file )
|
---|
229 | $cpln $srcd/$d/$f $sinc/$f
|
---|
230 | end
|
---|
231 | endif
|
---|
232 | echo $file >> $inclistf
|
---|
233 | endif
|
---|
234 | end
|
---|
235 | rm -f $sinc/machdefs_ac.h $sinc/machdefs_mkmf.h
|
---|
236 | cd $srcd/BuildMgr/.
|
---|
237 |
|
---|
238 |
|
---|
239 | #----------------------------------------------------------------------
|
---|
240 | #### lien des .h des librairies externes
|
---|
241 | echo " "
|
---|
242 | echo ">>>>>> 3/ Include files for external libraries "
|
---|
243 | set i = 0
|
---|
244 | while ( $i < $#SOPEXT )
|
---|
245 | @ i += 1
|
---|
246 | if( "$EXTINCNAME[$i]" == "PASDEINC" ) continue
|
---|
247 | if( $SOPEXTOK[$i] <= 0 ) continue
|
---|
248 | set nom = $EXTINCNAME[$i]:t
|
---|
249 | set rac = $EXTINCNAME[$i]:h
|
---|
250 | if( -d ../$SOPEXT[$i] ) then
|
---|
251 | echo "Searching include file for $SOPEXT[$i] ..."
|
---|
252 | foreach d ( $extpathinc $extpath $defextinc )
|
---|
253 | set duminc = `find $d -name $nom -print -follow | head -1 `
|
---|
254 | set dumrep = $duminc:h
|
---|
255 | if ( "$dumrep" != "" ) then
|
---|
256 | rm -f $sinc/$rac
|
---|
257 | ln -f -s $dumrep $sinc/$rac
|
---|
258 | echo Includes for $SOPEXT[$i] found in $dumrep
|
---|
259 | break
|
---|
260 | endif
|
---|
261 | end
|
---|
262 | if ( "$dumrep" == "" ) then
|
---|
263 | echo WARNING: Includes for $SOPEXT[$i] NOT found
|
---|
264 | echo " Compilation of module $SOPEXT[$i] disabled"
|
---|
265 | set SOPEXTOK[$i] = 0
|
---|
266 | endif
|
---|
267 | endif
|
---|
268 | end
|
---|
269 |
|
---|
270 |
|
---|
271 | #----------------------------------------------------------------------
|
---|
272 | #### liens des librairies externes
|
---|
273 | echo " "
|
---|
274 | echo ">>>>>> 4.1/ External libraries "
|
---|
275 | set fpath = $TMPDIR/fpath
|
---|
276 | rm -f $fpath; touch $fpath
|
---|
277 | set extliblib
|
---|
278 | set i = 0
|
---|
279 | while ( $i < $#SOPEXT )
|
---|
280 | @ i += 1
|
---|
281 | if( "$EXTLIBNAME[$i]" == "PASDELIB" ) continue
|
---|
282 | if( $SOPEXTOK[$i] <= 0 ) continue
|
---|
283 | set nom = $EXTLIBNAME[$i]
|
---|
284 | if( -d ../$SOPEXT[$i] ) then
|
---|
285 | echo "Searching libraries path for $SOPEXT[$i] ..."
|
---|
286 | foreach d ( $extpathlib $extpath $defextlib )
|
---|
287 | set dumlib = `find $d -name $nom -print -follow | head -1 `
|
---|
288 | if ( "$dumlib" != "" ) then
|
---|
289 | echo "-L$dumlib:h" >> $fpath
|
---|
290 | set extliblib = ( $extliblib $ALLEXTLIBS[$i] )
|
---|
291 | break
|
---|
292 | endif
|
---|
293 | end
|
---|
294 | if ( "$dumlib" == "" ) then
|
---|
295 | echo WARNING: Libraries for $SOPEXT[$i] NOT found
|
---|
296 | echo " Check the generated make.inc file"
|
---|
297 | endif
|
---|
298 | endif
|
---|
299 | end
|
---|
300 | set extlibpath = `cat $fpath | sort -u`
|
---|
301 | echo extlibpath= $extlibpath
|
---|
302 | echo extliblib= $extliblib
|
---|
303 | rm -f $fpath
|
---|
304 |
|
---|
305 |
|
---|
306 | #----------------------------------------------------------------------
|
---|
307 | #### Identification des librairies archives Sophya
|
---|
308 | echo " "
|
---|
309 | echo ">>>>>> 4.2/ Sophya libraries archives "
|
---|
310 | set sopmodlib
|
---|
311 | set i = 0
|
---|
312 | while ( $i < $#SOPMOD )
|
---|
313 | @ i += 1
|
---|
314 | if( $SOPMODOK[$i] <= 0 ) continue
|
---|
315 | if( -d ../$SOPMOD[$i] ) then
|
---|
316 | set sopmodlib = ( $sopmodlib $ALLSOPLIBS[$i] )
|
---|
317 | else
|
---|
318 | echo "WARNING: module "$SOPMOD[$i]" not found"
|
---|
319 | endif
|
---|
320 | end
|
---|
321 | echo sopmodlib= $sopmodlib
|
---|
322 |
|
---|
323 | echo " "
|
---|
324 | echo ">>>>>> 4.3/ PI-Sophya libraries archives "
|
---|
325 | set soppilib
|
---|
326 | set i = 0
|
---|
327 | while ( $i < $#SOPPI )
|
---|
328 | @ i += 1
|
---|
329 | if( $SOPPIOK[$i] <= 0 ) continue
|
---|
330 | if( -d ../$SOPPI[$i] ) then
|
---|
331 | set soppilib = ( $soppilib $ALLPILIBS[$i] )
|
---|
332 | else
|
---|
333 | echo "WARNING: module "$SOPPI[$i]" not found"
|
---|
334 | endif
|
---|
335 | end
|
---|
336 | echo soppilib= $soppilib
|
---|
337 |
|
---|
338 | #----------------------------------------------------------------------
|
---|
339 | #### Generation de sophyamake.inc
|
---|
340 | # On le cree dans le repertoire temporaire d'abord
|
---|
341 | set mfile = $sinc/sophyamake.inc
|
---|
342 | rm -f $mfile
|
---|
343 | echo " "
|
---|
344 | echo ">>>>>> 5/ Creating $mfile from $mincname "
|
---|
345 | echo "# -----------------------------------------------" > $mfile
|
---|
346 | echo "# File make.inc - generated by SOPHYA configure" >> $mfile
|
---|
347 | echo "# Date" `date` >> $mfile
|
---|
348 | echo "# Seed file : $mincname " >> $mfile
|
---|
349 | echo "# -----------------------------------------------" >> $mfile
|
---|
350 | echo " " >> $mfile
|
---|
351 | echo "# SOPHYA Base installation directory " >> $mfile
|
---|
352 | echo "SOPHYABASE = $SOPHYABASE" >> $mfile
|
---|
353 | echo " " >> $mfile
|
---|
354 | echo 'SOPHYAINCP = $(SOPHYABASE)/include/' >> $mfile
|
---|
355 | echo 'SOPHYAOBJP = $(SOPHYABASE)/obj/' >> $mfile
|
---|
356 | echo 'SOPHYALIBP = $(SOPHYABASE)/lib/' >> $mfile
|
---|
357 | echo 'SOPHYASLBP = $(SOPHYABASE)/slb/' >> $mfile
|
---|
358 | echo 'SOPHYAEXEP = $(SOPHYABASE)/exe/' >> $mfile
|
---|
359 |
|
---|
360 | echo " " >> $mfile
|
---|
361 | echo "# module libraries " >> $mfile
|
---|
362 | echo "SOPMODLIBLIST = $sopmodlib" >> $mfile
|
---|
363 |
|
---|
364 | echo " " >> $mfile
|
---|
365 | echo "# External libraries PATH " >> $mfile
|
---|
366 | echo "SOPEXTLIBP = $extlibpath" >> $mfile
|
---|
367 | echo "SOPEXTLIBLIST = $extliblib" >> $mfile
|
---|
368 |
|
---|
369 | echo " " >> $mfile
|
---|
370 | echo "# PI libraries " >> $mfile
|
---|
371 | echo "SOPPILIBLIST = $soppilib" >> $mfile
|
---|
372 |
|
---|
373 | echo " " >> $mfile
|
---|
374 | cat $mincname >> $mfile
|
---|
375 |
|
---|
376 | rm -f $mfile:t
|
---|
377 | ln -s $mfile $mfile:t
|
---|
378 |
|
---|
379 |
|
---|
380 | #----------------------------------------------------------------------
|
---|
381 | #### Copie de machdefs.h
|
---|
382 | set mdefname = $TMPDIR/machdefs.h
|
---|
383 | echo " "
|
---|
384 | echo ">>>>>> 6.a/ Creating machdefs.h from BaseTools/machdefs_mkmf.h"
|
---|
385 | rm -f $mdefname; touch $mdefname
|
---|
386 | echo "/*** machdefs.h generated by SOPHYA configure ***/" >> $mdefname
|
---|
387 | echo "#ifndef MACHDEFS_SEEN" >> $mdefname
|
---|
388 | echo "#define MACHDEFS_SEEN" >> $mdefname
|
---|
389 | echo "/*------ Code generation switch ---- */" >> $mdefname
|
---|
390 | echo "/* System selector (uname) */" >> $mdefname
|
---|
391 | set sname = `uname`
|
---|
392 | echo "#ifndef $sname" >> $mdefname
|
---|
393 | echo "#define $sname 1 " >> $mdefname
|
---|
394 | echo "#endif" >> $mdefname
|
---|
395 | echo "/* #define SO_BOUNDCHECKING 1 */" >> $mdefname
|
---|
396 | if ( "$sname" == "IRIX64" ) then
|
---|
397 | # SGI_ARCH64 : compile avec -64 (en 64 bits)
|
---|
398 | echo "#define SGI_ARCH64 1 /* Compile avec -64 */" >> $mdefname
|
---|
399 | if ( "$SOPHYACXX" == "CC" ) then
|
---|
400 | # __SGICC__ : flag indiquant que c'est le compilo CC de SGI
|
---|
401 | echo "#define __SGICC__ 1" >> $mdefname
|
---|
402 | endif
|
---|
403 | endif
|
---|
404 |
|
---|
405 |
|
---|
406 | echo " " >> $mdefname
|
---|
407 | grep -v -e '#ifndef *MACHDEFS_SEEN' -e '#define *MACHDEFS_SEEN' ../BaseTools/machdefs_mkmf.h >> $mdefname
|
---|
408 | # On ne copie que si machdefs.h est different
|
---|
409 | if (-e $sinc/machdefs.h ) then
|
---|
410 | diff $mdefname $sinc/machdefs.h >& /dev/null
|
---|
411 | if ($status != 0) then
|
---|
412 | cp -f -p $mdefname $sinc/machdefs.h
|
---|
413 | echo " file $sinc/machdefs.h changed -> replaced"
|
---|
414 | else
|
---|
415 | echo " file $sinc/machdefs.h has not changed -> kept"
|
---|
416 | endif
|
---|
417 | else
|
---|
418 | cp -f -p $mdefname $sinc/machdefs.h
|
---|
419 | echo " file $sinc/machdefs.h created"
|
---|
420 | endif
|
---|
421 | rm -f $mdefname
|
---|
422 |
|
---|
423 |
|
---|
424 | #### Creation de sspvflags.h
|
---|
425 | echo " "
|
---|
426 | echo ">>>>>> 6.b/ Creating $sinc/sspvflags.h "
|
---|
427 | rm -f $sinc/sspvflags.h; touch $sinc/sspvflags.h
|
---|
428 |
|
---|
429 | echo "#ifndef SSPVFLAGS_SEEN" >> $sinc/sspvflags.h
|
---|
430 | echo "#define SSPVFLAGS_SEEN" >> $sinc/sspvflags.h
|
---|
431 | echo " " >> $sinc/sspvflags.h
|
---|
432 | echo "/*------ External libraries no-use flag ---- */" >> $sinc/sspvflags.h
|
---|
433 | set i = 0
|
---|
434 | while ( $i < $#SOPEXTOK )
|
---|
435 | @ i += 1
|
---|
436 | if( $SOPEXTOK[$i] > 0 ) continue
|
---|
437 | echo "#define SOPHYA_NO_$SOPEXT[$i]" >> $sinc/sspvflags.h
|
---|
438 | end
|
---|
439 |
|
---|
440 | echo " " >> $sinc/sspvflags.h
|
---|
441 | echo "/*------ Version selection flags ---- */" >> $sinc/sspvflags.h
|
---|
442 | if( $?usefftw2 ) then
|
---|
443 | echo "#define FFTW_V2_EXTSOP" >> $sinc/sspvflags.h
|
---|
444 | endif
|
---|
445 | if( $?uselapack2 ) then
|
---|
446 | echo "#define LAPACK_V2_EXTSOP" >> $sinc/sspvflags.h
|
---|
447 | endif
|
---|
448 | echo " " >> $sinc/sspvflags.h
|
---|
449 | echo "/*------ Use of single shared lib for SOPHYA+extlibs+PI ---- */" >> $sinc/sspvflags.h
|
---|
450 | if( $?singleslb ) then
|
---|
451 | echo "#define SINGLESLB_SOPHYA_PI_EXT" >> $sinc/sspvflags.h
|
---|
452 | endif
|
---|
453 | echo " " >> $sinc/sspvflags.h
|
---|
454 | echo "#endif " >> $sinc/sspvflags.h
|
---|
455 |
|
---|
456 |
|
---|
457 | #----------------------------------------------------------------------
|
---|
458 | #### Creation des fichiers contenant les listes d'objets et d'includes
|
---|
459 | echo " "
|
---|
460 | echo ">>>>>> 7/ Creating object list files for shared library creation "
|
---|
461 | set objlistname = $sconf/libsophya.objlist
|
---|
462 | echo " 7.a/ Creating $objlistname "
|
---|
463 | rm -f $objlistname ; touch $objlistname
|
---|
464 | foreach d ( $SOPMOD )
|
---|
465 | rm -f $sconf/$d.conf
|
---|
466 | if ( ! -d ../$d ) continue
|
---|
467 | cat ../$d/objlist.list >> $objlistname
|
---|
468 | touch $sconf/$d.conf
|
---|
469 | end
|
---|
470 |
|
---|
471 | set objlistname = $sconf/libextsophya.objlist
|
---|
472 | echo " 7.b/ Creating $objlistname "
|
---|
473 | rm -f $objlistname ; touch $objlistname
|
---|
474 | set i = 0
|
---|
475 | while ( $i < $#SOPEXT )
|
---|
476 | @ i += 1
|
---|
477 | set d = $SOPEXT[$i]
|
---|
478 | rm -f $sconf/$d.conf
|
---|
479 | if( $SOPEXTOK[$i] <= 0 ) continue
|
---|
480 | if ( ! -d ../$d ) continue
|
---|
481 | cat ../$d/objlist.list >> $objlistname
|
---|
482 | touch $sconf/$d.conf
|
---|
483 | end
|
---|
484 |
|
---|
485 | set objlistname = $sconf/libPI.objlist
|
---|
486 | echo " 7.c/ Creating $objlistname "
|
---|
487 | rm -f $objlistname ; touch $objlistname
|
---|
488 | foreach d ( $SOPPI )
|
---|
489 | rm -f $sconf/$d.conf
|
---|
490 | if ( ! -d ../$d ) continue
|
---|
491 | cat ../$d/objlist.list >> $objlistname
|
---|
492 | touch $sconf/$d.conf
|
---|
493 | end
|
---|
494 |
|
---|
495 |
|
---|
496 | #----------------------------------------------------------------------
|
---|
497 | exit 0
|
---|