From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <199701230422.WAA29383@saratoga.compassnet.com> Date: Sat, 23 Nov 1996 00:17:08 -0000 From: Terence D. Hairston Subject: Radiance on Linux Alpha I've just downloaded Radiance and hope to install it on my Alphastation = 200 series running Redhat Linux version 4.0 (Kernel 2.0.27). I was = wondering if anyone had any experience or advice running Radiance under = Linux-Alpha? The makefile that comes with the Radiance distribution does include = support the Alpha system running under Digitial Unix, however the Linux = setup appears to be geared towards only x86 systems. There is a generic = Unix option which may work for Linux-Alpha, or even possibly the Digital = Unix option may do the trick. Since I'm relatively new to Unix/Linux, I = was hoping for some insight regarding getting Radiance running on my = Alphastation. Below I've attached the makefile, any insight that could = be offered would be most appreciated, thanks in advance! Terence #!/bin/csh -f # SCCSid "@(#)makeall 2.58 6/19/96 LBL" # # Make all the Radiance programs # if ( $#argv < 1 ) then echo "Usage: makeall install [clean] [make options]" echo " or: makeall clean" exit 1 endif if ( "$1" =3D=3D install ) then cat << _EOF_ `cat src/rt/VERSION` INSTALLATION This script rebuilds all of the Radiance programs and installs them on your system. You should read the file README before running this script. You can type ^C (followed by return) at any time to abort. You must first answer the following questions. _EOF_ if ( ! $?EDITOR ) then echo -n "What is your preferred editor [vi]? " set ans=3D"$<" if ( "$ans" !=3D "" ) then setenv EDITOR "$ans" else setenv EDITOR vi endif endif again1: echo -n "Where do you want the executables [/usr/local/bin]? " set idir=3D$< (echo $idir) >/dev/null if ( $status ) goto again1 set idir=3D$idir if ( "$idir" =3D=3D "" ) then set idir=3D/usr/local/bin else if ( "$idir" !~ /* ) then echo "Directory must be relative to root, please reenter" goto again1 endif if ( ! -d $idir ) then mkdir $idir if ( $status ) then echo "Cannot create directory, please reenter" goto again1 endif endif if ( ! -d $idir/dev ) then mkdir $idir/dev if ( $status ) then echo "Cannot create subdirectory, please reenter" goto again1 endif endif set rmake=3D$idir/rmake if ( "`ls -tL $rmake $0 |& head -1`" =3D=3D $rmake ) goto gotrmake set newrmake echo -n "Are you a new Radiance user or with a new address? " set ans=3D"$<" if ( "$ans" =3D~ [yY]* ) then csh -f newuser else echo `cat src/rt/VERSION` compiled by `whoami` | mail GJWard@lbl.gov endif set special=3D set arch=3D set opt=3D set mach=3D set compat=3D set extras=3D cat << _EOF_ Please select your system type from the following list: 1) Sun SPARC Station 2) DECstation 3) VAXstation running ULTRIX 4) DEC Alpha running OSF 5) HP workstation 6) Silicon Graphics 7) Apple Mac II or Quadra running A/UX 8) NeXT Workstation 9) AIX (RS/6000) 10) BSDI BSD/386 11) Linux 12) PowerPC running MachTen 13) Other _EOF_ echo -n "Choice? " set arch=3D"$<" switch ("$arch") case 1: # SPARC Station set arch=3Dsun if ( `uname -r` =3D~ 4.* ) then set mach=3D"-DBSD -fsingle -DALIGN=3Ddouble /usr/lib/libm.il = -I/usr/openwin/include -L/usr/openwin/lib -DSPEED=3D12 -DDCL_ATOF" set opt=3D"-O -pipe" set special=3D"sun tiff" set compat=3D"bmalloc.o strcmp.o" else set mach=3D"-DALIGN=3Ddouble -I/usr/openwin/include -L/usr/openwin/lib = -DSPEED=3D36 -DDCL_ATOF" set opt=3D-O set special=3D set compat=3D"bmalloc.o strcmp.o getpagesize.o" endif breaksw case 2: # DECstation set mach=3D"-DALIGN=3Ddouble -DBSD -DSPEED=3D12" set opt=3D"-O" set special=3D"tiff" set compat=3D"malloc.o erf.o strcmp.o" set arch=3Dmips breaksw case 3: # VAXstation set mach=3D"-DBSD -DWFLUSH=3D30 -DSPEED=3D2" set opt=3D"-O" set special=3D"tiff" set compat=3D"malloc.o erf.o strcmp.o" set arch=3Dvax breaksw case 4: # DEC Alpha running OSF set mach=3D"-DALIGN=3Ddouble -DSPEED=3D64 -Dvoid=3Dchar -DDCL_ATOF" set opt=3D"-O" set compat=3D"bmalloc.o strcmp.o" set arch=3Dalpha breaksw case 5: # HP workstation set mach=3D"-DALIGN=3Ddouble -DSPEED=3D36 -D_HPUX_SOURCE" set opt=3D"-O" set special=3D"tiff" set compat=3D"malloc.o getpagesize.o strcmp.o" set arch=3Dhpux breaksw case 6: # Silicon Graphics set arch=3Dsgi switch (`uname -r`) case 3.*: set mach=3D"-DALIGN=3Ddouble -noprototypes -DSPEED=3D36" set opt=3D"-O" set special=3D"sgi tiff" set compat=3D"malloc.o strcmp.o" breaksw case 4.*: set mach=3D"-DALIGN=3Ddouble -cckr -DSPEED=3D36" set opt=3D"-O2" set special=3D"tiff" set compat=3D"malloc.o strcmp.o" set extras=3D'"MLIB=3D-lfastm -lm"' breaksw case 5.*: # 5.x set special=3D"tiff" # fall through default: # 6.x or later set mach=3D"-DALIGN=3Ddouble -cckr -DSPEED=3D36" set opt=3D"-O2 -Wl,-ignore_unresolved" hinv -t cpu | grep R3000 >/dev/null if ( $status ) then set opt=3D"$opt -mips2" endif set compat=3D"malloc.o strcmp.o" breaksw endsw breaksw case 7: # Mac II or Quadra set mach=3D"-DSPEED=3D8 -DDCL_ATOF -D_POSIX_SOURCE" set opt=3D"-O" set special=3Dtiff set compat=3D"malloc.o getpagesize.o erf.o strcmp.o" set arch=3Dmac2 set extras=3D'"LIBS=3D-lrt -lposix -lm"' breaksw case 8: # NeXT set mach=3D"-DBSD -DSPEED=3D6 -DDCL_ATOF" set opt=3D"-O" set special=3D set arch=3Dnext set compat=3D"bmalloc.o erf.o" set canmalloc breaksw case 9: # AIX set mach=3D"-Dvoid=3Dchar -D_NO_PROTO -DDCL_ATOF -DALIGN=3Ddouble" set opt=3D"-O" set compat=3D"bmalloc.o erf.o" breaksw case 10: # BSDI BSD/386 set mach=3D"-DBSD -DSPEED=3D25 -DDCL_ATOF -L/usr/X11/lib = -I/usr/X11/include" set opt=3D"-O" set arch=3DIBMPC set compat=3D"malloc.o erf.o strcmp.o" breaksw case 11: # Linux set mach=3D"-DBSD -DSPEED=3D40 -DDCL_ATOF" set opt=3D"-O2" set arch=3DIBMPC set compat=3D"malloc.o erf.o getpagesize.o" set extras=3DCC=3Dgcc set canmalloc breaksw case 12: # PowerPC running MachTen set mach=3D"-DBSD -DALIGN=3Ddouble -DSPEED=3D100 -DDCL_ATOF = -I/usr/X11/include -L/usr/X11" set opt=3D"-O" set arch=3DPowerPC set compat=3D"bmalloc.o erf.o strcmp.o" set extras=3D"CC=3Dgcc" breaksw case 13: # Other set opt=3D"-O" set compat=3D"bmalloc.o erf.o strcmp.o" echo -n "Is the UNIX a Berkeley derivative [n]? " if ( "$<" =3D~ [yY]* ) then set mach=3D"$mach -DBSD" else echo -n "Is this OSF UNIX [n]? " if ( "$<" =3D~ [yY]* ) then set mach=3D"$mach -Dvoid=3Dchar -DDCL_ATOF" else set compat=3D"$compat getpagesize.o" endif endif echo -n "Are you using the GNU C compiler [n]? " if ( "$<" =3D~ [yY]* ) then set canmalloc set extras=3D"CC=3Dgcc" endif echo -n "Is the machine a RISC architecture [n]? " if ( "$<" =3D~ [yY]* ) then set mach=3D"$mach -DALIGN=3Ddouble" endif breaksw default: echo "Illegal choice\!" echo "Installation aborted." exit 1 breaksw endsw if ( $?mem ) then set mach=3D"$mach $mem" else echo -n "Does the target machine have more than 8 Mbytes of RAM? " set ans=3D"$<" if ( "$ans" =3D~ [yY]* ) then echo -n "More than 24 Mbytes? " set ans=3D"$<" if ( "$ans" =3D~ [yY]* ) then set mach=3D"$mach -DBIGMEM" set sizemod=3D"huge models (60,000+ surfaces)" else set sizemod=3D"very large models (20,000+ surfaces)" endif else set sizemod=3D"large models (8,000+ surfaces)" endif endif # echo "Do you expect to be rendering $sizemod?" # echo -n '(Answering "yes" may adversly affect rendering time and = geometric accuracy) ' # set ans=3D"$<" # if ( "$ans" =3D~ [yY]* ) then # set opt=3D"$opt -DSMLFLT" # endif # echo -n "Do you have X10 support [n]? " # if ( "$<" =3D~ [yY]* ) then # set special=3D"$special x10" # endif if ( $?canmalloc ) then chmod 644 src/{ot,rt}/Rmakefile ed - src/ot/Rmakefile <<'_EOF_' 1,$s/ malloc\.o/ / w e src/rt/Rmakefile 1,$s/ malloc\.o/ / w q '_EOF_' endif again2: echo -n "Where do you want the library files [/usr/local/lib/ray]? " set ldir=3D$< (echo $ldir) >/dev/null if ( $status ) goto again2 set ldir=3D$ldir if ( "$ldir" =3D=3D "" ) then set ldir=3D/usr/local/lib/ray else if ( "$ldir" !~ /* ) then echo "Directory must be relative to root, please reenter" goto again2 endif if ( $ldir !=3D $cwd/lib ) then if ( ! -d $ldir ) then mkdir $ldir if ( $status ) then echo "Cannot create directory, please reenter" goto again2 endif endif cmp -s lib $ldir if ($status) then echo -n "Install library files now [n]? " if ( "$<" =3D~ [yY]* ) then echo -n "Copying library files to $ldir... " (cd lib ; tar -cf - *) | (cd $ldir ; tar -xf -) echo "Done." endif endif endif sed 's/[ ]*$//' > $rmake << _EOF_ #!/bin/sh exec make "SPECIAL=3D$special" \ "OPT=3D$opt" \ "MACH=3D$mach" \ ARCH=3D$arch "COMPAT=3D$compat" \ INSTDIR=3D$idir \ LIBDIR=3D$ldir \ $extras "\$@" -f Rmakefile _EOF_ chmod 755 $rmake chmod 644 src/*/Rmakefile src/rt/devtable.c gotrmake: echo "Current rmake command is:" cat $rmake echo -n "Do you want to change it? " set ans=3D"$<" if ( "$ans" =3D~ [yY]* ) then cp $rmake /tmp/rmake$$ $EDITOR $rmake if ( `cat $rmake /tmp/rmake$$ | grep OPT=3D | uniq | wc -l` =3D=3D 2 ) = set newrmake rm -f /tmp/rmake$$ endif if ( ! -d src/lib ) then mkdir src/lib endif if ( $?newrmake ) then echo 'New rmake command -- running "makeall clean"...' csh -f $0 clean endif cd src echo "Making programs..." set errs=3D0 foreach i ( common meta cv cv/dxfcvt gen ot rt px util = cal/{ev,calc,rcalc,util} ) pushd $i echo "In directory $i..." $rmake -k $* @ errs +=3D $status popd end if ( $errs ) then echo "There were some errors." else echo "Done." endif cd .. else cd src foreach i ( common cv cv/dxfcvt gen ot px rt util = cal/{ev,calc,rcalc,util} meta ) pushd $i echo "In directory $i..." make -f Rmakefile $* popd end echo "Done." cd .. endif foreach i ( $* ) if ( "$i" =3D=3D clean ) then echo "Removing library archives..." rm -f src/lib/*.a endif end exit 0 -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com