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.20 by greg, Mon Sep 19 02:23:58 2005 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'
18          echo "  setenv RAYPATH .:$ldir"
19 <        echo 'For Bourne shell users, put the following into $HOME/profile'
19 >        echo 'For Bourne shell users, put the following into $HOME/.profile'
20          echo "  RAYPATH=.:$ldir"
21          echo "  export RAYPATH"
22          echo ""
23          exit 0
24   endif
25 < set srcdirs=( common meta cv gen ot rt px hd util cal )
25 > set srcdirs=( common rt meta cv gen ot px hd util cal )
26   if ( "$1" == install ) then
27          cat << _EOF_
28  
# 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
79 < cat << _EOF_
80 <
81 <                     RADIANCE LICENSE AGREEMENT
82 <
83 < Radiance is a registered copyright of The Regents of the University of
84 < California ("The Regents"). The Regents grant to you a nonexclusive,
85 < nontransferable license ("License") to use Radiance source code without
86 < fee.  You may not sell or distribute Radiance to others without the
87 < prior express written permission of The Regents.  You may compile and
88 < use this software on any machines to which you have personal access,
89 < and may share its use with others who have access to the same machines.
90 <
91 < NEITHER THE UNITED STATES NOR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY
92 < OF THEIR EMPLOYEES, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY
93 < LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS
94 < OF ANY INFORMATION, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS
95 < THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.  By downloading, using
96 < or copying this software, you agree to abide by the intellectual property laws
97 < and all other applicable laws of the United States, and by the terms of this
98 < License Agreement. Ownership of the software shall remain solely in The
99 < Regents.  The Regents shall have the right to terminate this License
100 < immediately by written notice upon your breach of, or noncompliance with, any
101 < of its terms.  You shall be liable for any infringement or damages resulting
102 < from your failure to abide by the terms of this License Agreement.
103 <
104 < _EOF_
87 > more src/common/copyright.h
88   echo -n "Do you understand and accept the terms of this agreement [n]? "
89   set ans="$<"
90   if ( "$ans" !~ [yY]* ) exit
108 echo -n "Are you a new Radiance user or with a new address [y]? "
109 set ans="$<"
110 if ( "$ans" !~ [nN]* ) then
111        csh -f newuser
112 else
113        echo `cat src/rt/VERSION` compiled by `whoami` | mail [email protected]
114 endif
115 skiplicense:
91   set special=
92   set arch=
93   set opt=
94   set mach=
95   set compat=
96   set extras=
97 + set esuffix=
98   cat << _EOF_
99  
100   Please select your system type from the following list:
# Line 129 | Line 105 | Please select your system type from the following list
105          4)      AIX (RS/6000)
106          5)      BSDI BSD/386
107          6)      Linux
108 <        7)      MacOS X
108 >        7)      MacOS X
109          8)      FreeBSD
110 <        9)      Other
110 >        9)      Cygwin
111 >        10)     Other
112  
113   _EOF_
114   echo -n "Choice? "
# Line 139 | Line 116 | set arch="$<"
116   switch ("$arch")
117   case 1:                 # SPARC Station
118          set arch=sun
119 <        if ( `uname -r` =~ 4.* ) then
120 <                set mach="-fsingle -DBSD /usr/lib/libm.il -I/usr/openwin/include -L/usr/openwin/lib -DNOSTEREO"
121 <                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
119 >        set mach="-I/usr/openwin/include -L/usr/openwin/lib -DNOSTEREO"
120 >        set opt="-O"
121 >        set compat="strcmp.o"
122          breaksw
123   case 2:                 # HP workstation
124          set mach=""
125 <        set opt="-O -DSPEED=80 -Aa -D_HPUX_SOURCE"
126 <        set compat="malloc.o getpagesize.o strcmp.o"
125 >        set opt="-O -Aa -D_HPUX_SOURCE"
126 >        set compat="strcmp.o"
127          set arch=hpux
128          breaksw
129   case 3:                 # Silicon Graphics
# Line 162 | Line 131 | case 3:                        # Silicon Graphics
131          switch (`uname -r`)
132          case 3.*:
133                  set mach="-noprototypes"
134 <                set opt="-O -DSPEED=80"
134 >                set opt="-O"
135                  set special="sgi"
136 <                set compat="malloc.o strcmp.o"
136 >                set compat="strcmp.o"
137                  breaksw
138          case 4.*:
139                  set mach=""
140 <                set opt="-O2 -DSPEED=100"
141 <                set compat="malloc.o strcmp.o"
140 >                set opt="-O2"
141 >                set compat="strcmp.o"
142                  set extras='"MLIB=-lfastm -lm"'
143                  breaksw
144          default:        # 5.x or later
145                  ln -s `which wish` $idir/wish4.0
146                  set path=($idir $path)
147                  set mach="-w"
148 <                set opt="-O2 -DSPEED=200"
148 >                set opt="-O2"
149                  set special="ogl"
150 <                set compat="malloc.o strcmp.o"
150 >                set compat="strcmp.o"
151                  breaksw
152          endsw
153          breaksw
154   case 4:                 # AIX
186        set mach="-Dvoid=char -D_NO_PROTO -DINCL_SEL_H"
155          set opt="-O"
156 <        set compat="bmalloc.o erf.o"
156 >        set compat="erf.o strcmp.o"
157 >        set arch=PowerPC
158          breaksw
159   case 5:                 # BSDI BSD/386
160          set mach="-DBSD -L/usr/X11/lib -I/usr/X11/include"
161 <        set opt="-O -DSPEED=100"
161 >        set opt="-O"
162          set arch=IBMPC
163 <        set compat="malloc.o erf.o strcmp.o"
163 >        set compat="erf.o strcmp.o"
164          breaksw
165   case 6:                 # Linux
166 <        set mach="-Dlinux -L/usr/X11R6/lib -I/usr/include/X11 -DNOSTEREO"
167 <        set opt="-O2 -DSPEED=200"
166 >        set mach="-Dlinux -D_FILE_OFFSET_BITS=64 -L/usr/X11R6/lib -I/usr/include/X11 -DNOSTEREO"
167 >        set opt="-O2"
168          set arch=IBMPC
169 <        set compat="bmalloc.o erf.o getpagesize.o"
169 >        set compat="erf.o"
170          set extras=CC=gcc
171          breaksw
172 < case 7:                # MacOS X
173 <        set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
174 <        set opt="-O2 -DSPEED=200"
175 <        set arch=PowerPC
176 <        set compat="bmalloc.o"
208 <        set extras="CC=cc CONFIGURE_ARCH=powerpc"
172 > case 7:                 # MacOS X
173 >        set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
174 >        set opt="-O2"
175 >        set arch=PowerPC
176 >        set extras="CC=cc CONFIGURE_ARCH=powerpc"
177          set special="ogl"
178 <        breaksw
178 >        breaksw
179   case 8:                 # FreeBSD
180 <        set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
181 <        set opt="-O -DSPEED=200"
182 <        set compat="bmalloc.o erf.o"
183 <        set extras="CC=cc"
180 >        set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
181 >        set opt="-O"
182 >        set compat="erf.o"
183 >        set extras='CC=cc MLIB="-lcompat -lm"'
184          set arch=IBMPC
185 <        breaksw
186 < case 9:                 # Other
185 >        breaksw
186 > case 9:                 # Cygwin
187 >        set mach="-Dfreebsd -L/usr/lib -L/usr/X11R6/lib -I/usr/include/X11 -I/usr/X11R6/include -DNOSTEREO"
188 >        set opt="-O2"
189 >        set arch=IBMPC
190 >        set compat="erf.o"
191 >        set extras="CC=gcc"
192 >        set special="ogl"
193 >        set esuffix=".exe"
194 >        breaksw
195 > case 10:                        # Other
196          set opt="-O"
197 <        set compat="bmalloc.o erf.o strcmp.o"
197 >        set compat="erf.o strcmp.o"
198          echo -n "Are you using the GNU C compiler [n]? "
199          if ( "$<" =~ [yY]* ) then
200                  set extras="CC=gcc"
201          endif
202 +        set arch=other
203          breaksw
204   default:
205          echo "Illegal choice\!"
# Line 229 | Line 207 | default:
207          exit 1
208          breaksw
209   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
210   source installib
211   sed 's/[        ]*$//' > $rmake << _EOF_
212   #!/bin/sh
# Line 268 | Line 216 | exec make "SPECIAL=$special" \
216          ARCH=$arch "COMPAT=$compat" \
217          INSTDIR=$idir \
218          LIBDIR=$ldir \
219 +        ESUFFIX=$esuffix \
220          $extras "\$@" -f Rmakefile
221   _EOF_
222   chmod 755 $rmake
# Line 306 | Line 255 | else
255          echo "Done."
256   endif
257   cd ..
258 < if (! -d /usr/tmp) then
259 <        ln -s /tmp /usr/tmp
260 <        if ($status) then
261 <                echo ""
262 <                echo "IMPORTANT: Execute 'sudo ln -s /tmp /usr/tmp'"
263 <                echo ""
264 <        endif
258 > if (! $inpath ) then
259 >        echo ""
260 >        echo "Add $idir to the beginning of your execution path:"
261 >        echo 'For C-shell users, put the following into ~/.cshrc'
262 >        echo "  set path=( $idir "'$path )'
263 >        echo 'For Bourne shell users, put the following into $HOME/.profile'
264 >        echo "  PATH=$idir"':$PATH'
265 >        echo "  export PATH"
266   endif
267   else
268   cd src
# Line 322 | Line 272 | foreach i ( $srcdirs )
272          make -f Rmakefile $*
273          popd
274   end
325 echo "Done."
275   cd ..
327 endif
276   foreach i ( $* )
277          if ( "$i" == clean ) then
278                  echo "Removing library archives..."
279 <                rm -f src/lib/*.a
279 >                rm -f src/lib/*.{a,o,la}
280          endif
281   end
282 + echo "Done."
283 + endif
284   exit 0

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines