ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/makeall
(Generate patch)

Comparing ray/makeall (file contents):
Revision 1.2 by greg, Fri Feb 28 20:06:51 2003 UTC vs.
Revision 1.10 by greg, Tue Nov 25 18:23:11 2003 UTC

# Line 1 | Line 1
1   #!/bin/csh -f
2   # RCSid $Id$
3   #
4 #Added macosX 2001-04-11 by Jean Brange
5 #Deleted obsolete systems 2001-04-18 by Greg Ward
6 #
4   # Make all the Radiance programs
5   #
6   if ( $#argv < 1 ) then
# Line 14 | Line 11 | if ( $#argv < 1 ) then
11   endif
12   if ( "$1" == library ) then
13          source installib
14 +        cp -f src/*/*.{cal,tab,hex} $ldir
15          echo ""
16          echo "Set the environment variable RAYPATH=.:$ldir"
17          echo 'For C-shell users, put the following into ~/.cshrc'
# Line 50 | Line 48 | again1:
48   echo -n "Where do you want the executables [/usr/local/bin]? "
49   set idir=$<
50   (echo $idir) >/dev/null
51 < if ( $status ) goto again1
51 > if ( $status ) then
52 >        goto again1
53 > endif
54   set idir=$idir
55   if ( "$idir" == "" ) then
56          set idir=/usr/local/bin
# Line 72 | Line 72 | if ( ! -d $idir/dev ) then
72                  goto again1
73          endif
74   endif
75 + set inpath=0
76 + foreach i ( $path )
77 +        if ( "$i" == "$idir" ) then
78 +                set inpath=1
79 +                break
80 +        endif
81 + end
82   set rmake=$idir/rmake
83 < if ( "`ls -tL $rmake $0 |& head -1`" == $rmake ) goto gotrmake
83 > if ( "`ls -tL $rmake $0 |& head -1`" == $rmake ) then
84 >        goto gotrmake
85 > endif
86   set newrmake
87   goto skiplicense
88   cat << _EOF_
# Line 119 | Line 128 | set opt=
128   set mach=
129   set compat=
130   set extras=
131 + set esuffix=
132   cat << _EOF_
133  
134   Please select your system type from the following list:
# Line 129 | Line 139 | Please select your system type from the following list
139          4)      AIX (RS/6000)
140          5)      BSDI BSD/386
141          6)      Linux
142 <        7)      MacOS X
142 >        7)      MacOS X
143          8)      FreeBSD
144 <        9)      Other
144 >        9)      Cygwin
145 >        10)     Other
146  
147   _EOF_
148   echo -n "Choice? "
# Line 139 | Line 150 | set arch="$<"
150   switch ("$arch")
151   case 1:                 # SPARC Station
152          set arch=sun
153 <        if ( `uname -r` =~ 4.* ) then
154 <                set mach="-fsingle -DBSD /usr/lib/libm.il -I/usr/openwin/include -L/usr/openwin/lib -DNOSTEREO"
155 <                set opt="-O -pipe -DSPEED=12"
145 <                set special="sun"
146 <                set compat="bmalloc.o strcmp.o"
147 <        else
148 <                set mach="-I/usr/openwin/include -L/usr/openwin/lib -DNOSTEREO"
149 <                set opt="-O -DSPEED=80"
150 <                set special="ogl"
151 <                set compat="bmalloc.o strcmp.o getpagesize.o"
152 <        endif
153 >        set mach="-I/usr/openwin/include -L/usr/openwin/lib -DNOSTEREO"
154 >        set opt="-O -DSPEED=80"
155 >        set compat="bmalloc.o strcmp.o getpagesize.o"
156          breaksw
157   case 2:                 # HP workstation
158          set mach=""
159          set opt="-O -DSPEED=80 -Aa -D_HPUX_SOURCE"
160 <        set compat="malloc.o getpagesize.o strcmp.o"
160 >        set compat="bmalloc.o getpagesize.o strcmp.o"
161          set arch=hpux
162          breaksw
163   case 3:                 # Silicon Graphics
# Line 178 | Line 181 | case 3:                        # Silicon Graphics
181                  set mach="-w"
182                  set opt="-O2 -DSPEED=200"
183                  set special="ogl"
184 <                set compat="malloc.o strcmp.o"
184 >                set compat="bmalloc.o strcmp.o"
185                  breaksw
186          endsw
187          breaksw
188   case 4:                 # AIX
186        set mach="-Dvoid=char -D_NO_PROTO -DINCL_SEL_H"
189          set opt="-O"
190 <        set compat="bmalloc.o erf.o"
190 >        set compat="bmalloc.o erf.o strcmp.o"
191 >        set arch=PowerPC
192          breaksw
193   case 5:                 # BSDI BSD/386
194          set mach="-DBSD -L/usr/X11/lib -I/usr/X11/include"
# Line 194 | Line 197 | case 5:                        # BSDI BSD/386
197          set compat="malloc.o erf.o strcmp.o"
198          breaksw
199   case 6:                 # Linux
200 <        set mach="-Dlinux -L/usr/X11R6/lib -I/usr/include/X11 -DNOSTEREO"
200 >        set mach="-Dlinux -D_FILE_OFFSET_BITS=64 -L/usr/X11R6/lib -I/usr/include/X11 -DNOSTEREO"
201          set opt="-O2 -DSPEED=200"
202          set arch=IBMPC
203          set compat="bmalloc.o erf.o getpagesize.o"
204          set extras=CC=gcc
205          breaksw
206 < case 7:                # MacOS X
207 <        set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
208 <        set opt="-O2 -DSPEED=200"
209 <        set arch=PowerPC
210 <        set compat="bmalloc.o"
211 <        set extras="CC=cc CONFIGURE_ARCH=powerpc"
206 > case 7:                 # MacOS X
207 >        set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
208 >        set opt="-O2 -DSPEED=200"
209 >        set arch=PowerPC
210 >        set compat="bmalloc.o"
211 >        set extras="CC=cc CONFIGURE_ARCH=powerpc"
212          set special="ogl"
213 <        breaksw
213 >        breaksw
214   case 8:                 # FreeBSD
215 <        set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
216 <        set opt="-O -DSPEED=200"
217 <        set compat="bmalloc.o erf.o"
218 <        set extras="CC=cc"
215 >        set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
216 >        set opt="-O -DSPEED=200"
217 >        set compat="bmalloc.o erf.o"
218 >        set extras="CC=cc"
219          set arch=IBMPC
220 <        breaksw
221 < case 9:                 # Other
220 >        breaksw
221 > case 9:                 # Cygwin
222 >        set mach="-Dfreebsd -L/usr/lib -L/usr/X11R6/lib -I/usr/include/X11 -I/usr/X11R6/include -DNOSTEREO"
223 >        set opt="-O2 -DSPEED=200"
224 >        set arch=IBMPC
225 >        set compat="bmalloc.o erf.o getpagesize.o"
226 >        set extras="CC=gcc"
227 >        set special="ogl"
228 >        set esuffix=".exe"
229 >        breaksw
230 > case 10:                        # Other
231          set opt="-O"
232          set compat="bmalloc.o erf.o strcmp.o"
233          echo -n "Are you using the GNU C compiler [n]? "
234          if ( "$<" =~ [yY]* ) then
235                  set extras="CC=gcc"
236          endif
237 +        set arch=other
238          breaksw
239   default:
240          echo "Illegal choice\!"
# Line 229 | Line 242 | default:
242          exit 1
243          breaksw
244   endsw
232 # We don't seem to have any more cramped machines out there, so...
233 set mem="-DBIGMEM"
234 if ( $?mem ) then
235        set mach="$mach $mem"
236 else
237        echo -n "Does the target machine have more than 24 Mbytes of RAM? "
238        set ans="$<"
239        if ( "$ans" =~ [yY]* ) then
240                echo -n "More than 96 Mbytes? "
241                set ans="$<"
242                if ( "$ans" =~ [yY]* ) then
243                        set mach="$mach -DBIGMEM"
244                        set sizemod="huge models (100,000+ surfaces)"
245                else
246                        set sizemod="very large models (30,000+ surfaces)"
247                endif
248        else
249                set sizemod="large models (10,000+ surfaces)"
250        endif
251 endif
252 # echo "Do you expect to be rendering $sizemod?"
253 # echo -n '(Answering "yes" may adversly affect rendering time and geometric accuracy) '
254 # set ans="$<"
255 # if ( "$ans" =~ [yY]* ) then
256 #       set opt="$opt -DSMLFLT"
257 # endif
258 # echo -n "Do you have X10 support [n]? "
259 # if ( "$<" =~ [yY]* ) then
260 #       set special="$special x10"
261 # endif
245   source installib
246   sed 's/[        ]*$//' > $rmake << _EOF_
247   #!/bin/sh
# Line 268 | Line 251 | exec make "SPECIAL=$special" \
251          ARCH=$arch "COMPAT=$compat" \
252          INSTDIR=$idir \
253          LIBDIR=$ldir \
254 +        ESUFFIX=$esuffix \
255          $extras "\$@" -f Rmakefile
256   _EOF_
257   chmod 755 $rmake
# Line 306 | Line 290 | else
290          echo "Done."
291   endif
292   cd ..
293 + if (! $inpath ) then
294 +        echo ""
295 +        echo "Add $idir to the beginning of your execution path:"
296 +        echo 'For C-shell users, put the following into ~/.cshrc'
297 +        echo "  set path=( $idir "'$path )'
298 +        echo 'For Bourne shell users, put the following into $HOME/profile'
299 +        echo "  PATH=$idir"':$PATH'
300 +        echo "  export PATH"
301 + endif
302   if (! -d /usr/tmp) then
303          ln -s /tmp /usr/tmp
304          if ($status) then
305                  echo ""
306                  echo "IMPORTANT: Execute 'sudo ln -s /tmp /usr/tmp'"
314                echo ""
307          endif
308   endif
309   else
# Line 322 | Line 314 | foreach i ( $srcdirs )
314          make -f Rmakefile $*
315          popd
316   end
325 echo "Done."
317   cd ..
327 endif
318   foreach i ( $* )
319          if ( "$i" == clean ) then
320                  echo "Removing library archives..."
321 <                rm -f src/lib/*.a
321 >                rm -f src/lib/*.[ao]
322          endif
323   end
324 + echo "Done."
325 + endif
326   exit 0

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines