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