home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 8
/
CDASC08.ISO
/
NEWS
/
RADIANCE
/
SRC
/
RT
/
RMAKEFIL
< prev
next >
Wrap
Text File
|
1993-10-07
|
7KB
|
274 lines
#
# SCCSid "@(#)Rmakefile 2.10 9/8/92 LBL"
# Compiles for ray tracing programs.
#
OPT = -O
MACH = -DBSD
CFLAGS = $(MACH) $(OPT) -I../common -L../lib
SPECIAL = aed
CC = cc
LINT = lint
LINTFLAGS = -DBSD -DVARIABLE -DFUNCTION \
-DINCHAN -DRCONST -DREDEFW
#
# The following are user-definable:
#
DESTDIR = .
INSTDIR = /usr/local/bin
INSTALL = cp
#
# The following paths must exist and be relative to root:
#
DEVDIR = $(INSTDIR)/dev
LIBDIR = /usr/local/lib/ray
#
# Library routines:
#
LIBS = -lrt -lm
#
# Device drivers for rview (see also devtable.c):
#
DOBJS = devtable.o devcomm.o editline.o x11.o x11twind.o \
colortab.o
DSRC = devtable.c devcomm.c editline.c x11.c x11twind.c \
colortab.c
DLIBS = -lX11
#
# Standard object files:
#
RTOBJS = rtmain.o rtrace.o $(ROBJS) Version.o
RTSRC = rmain.c rtrace.c $(RSRC) Version.c
RPOBJS = rpmain.o rpict.o $(ROBJS) Version.o
RPSRC = rmain.c rpict.c $(RSRC) Version.c
RVOBJS = rvmain.o rview.o rv2.o rv3.o $(DOBJS) $(ROBJS) Version.o
RVSRC = rmain.c rview.c rv2.c rv3.c $(DSRC) $(RSRC) Version.c
ROBJS = $(RAYOBJS) $(SURFOBJS) $(MATOBJS) \
$(MODOBJS) $(SUPPOBJS)
RSRC = $(RAYSRC) $(SURFSRC) $(MATSRC) \
$(MODSRC) $(SUPPSRC)
RAYOBJS = initotypes.o raytrace.o ambient.o ambcomp.o ambio.o
RAYSRC = initotypes.c raytrace.c ambient.c ambcomp.c ambio.c
SURFOBJS = source.o sphere.o srcsupp.o srcsamp.o virtuals.o o_face.o \
o_cone.o o_instance.o
SURFSRC = sphere.c source.c srcsupp.c virtuals.c o_face.c \
srcsamp.c o_cone.c o_instance.c
MATOBJS = aniso.o normal.o dielectric.o m_clip.o glass.o m_brdf.o \
m_mirror.o m_direct.o
MATSRC = normal.c dielectric.c m_clip.c glass.c m_brdf.c m_mirror.c \
m_direct.c
MODOBJS = p_func.o t_func.o p_data.o t_data.o text.o mx_func.o mx_data.o
MODSRC = p_func.c t_func.c p_data.c t_data.c text.c mx_func.c mx_data.c
SUPPOBJS = zeroes.o calexpr.o caldefn.o func.o noise3.o data.o readfargs.o \
malloc.o
SUPPSRC = zeroes.c calexpr.c caldefn.c func.c noise3.c data.c readfargs.c \
malloc.c
HEADERS = ambient.h ray.h data.h otspecial.h source.h
#
# What this makefile produces:
#
PROGS = $(DESTDIR)/rtrace $(DESTDIR)/rpict $(DESTDIR)/rview $(DESTDIR)/lookamb
all: $(PROGS) $(SPECIAL)
install: $(PROGS) $(SPECIAL) rayinit.cal
$(INSTALL) $(PROGS) $(INSTDIR)
rm -f $(LIBDIR)/rayinit.cal
cp rayinit.cal $(LIBDIR)
sun: $(DEVDIR)/sun $(DEVDIR)/sun.com
x10: $(DEVDIR)/x10
aed: $(DEVDIR)/aed
sgi: $(DEVDIR)/news
tiff:
clean:
set nonomatch; rm -f $(PROGS) *.o core
lint: $(RVSRC)
$(LINT) $(LINTFLAGS) -DRVIEW $(RVSRC) $(LIBS)
#
# Links:
#
$(DESTDIR)/rtrace: $(RTOBJS)
$(CC) $(CFLAGS) -o $(DESTDIR)/rtrace $(RTOBJS) $(LIBS)
$(DESTDIR)/rpict: $(RPOBJS)
$(CC) $(CFLAGS) -o $(DESTDIR)/rpict $(RPOBJS) $(LIBS)
$(DESTDIR)/rview: $(RVOBJS)
$(CC) $(CFLAGS) -o $(DESTDIR)/rview $(RVOBJS) $(DLIBS) $(LIBS)
$(DESTDIR)/lookamb: lookamb.o ambio.o
$(CC) $(CFLAGS) -o $(DESTDIR)/lookamb lookamb.o ambio.o -lrt
$(DEVDIR)/sun: sundev.o devmain.o colortab.o editline.o
$(CC) $(CFLAGS) -s -o $(DEVDIR)/sun devmain.o sundev.o colortab.o \
editline.o -lsuntool -lsunwindow -lpixrect $(LIBS)
$(DEVDIR)/sun.com: suncom.o editline.o
$(CC) $(CFLAGS) -s -o $(DEVDIR)/sun.com suncom.o editline.o
$(DEVDIR)/x10: x10.o xtwind.o colortab.o devmain.o editline.o
$(CC) $(CFLAGS) -s -o $(DEVDIR)/x10 x10.o xtwind.o devmain.o \
colortab.o editline.o -lX $(LIBS)
$(DEVDIR)/aed: aed.o colortab.o tty.o devmain.o editline.o
$(CC) $(CFLAGS) -s -o $(DEVDIR)/aed aed.o colortab.o \
devmain.o tty.o editline.o $(LIBS)
$(DEVDIR)/news: nwsdev.o devmain.o editline.o
$(CC) $(CFLAGS) -s -o $(DEVDIR)/news nwsdev.o devmain.o editline.o \
-lcps $(LIBS)
#
# Special compiles:
#
rtmain.o: rmain.c
$(CC) $(CFLAGS) -DRTRACE -DNICE=4 -DDEFPATH=\":$(LIBDIR)\" -c rmain.c
mv rmain.o rtmain.o
rpmain.o: rmain.c
$(CC) $(CFLAGS) -DRPICT -DNICE=6 -DDEFPATH=\":$(LIBDIR)\" -c rmain.c
mv rmain.o rpmain.o
rvmain.o: rmain.c
$(CC) $(CFLAGS) -DRVIEW -DDEFPATH=\":$(LIBDIR)\" -c rmain.c
mv rmain.o rvmain.o
readfargs.o: readfargs.c ../common/object.h
$(CC) $(CFLAGS) -DMEMHOG -c readfargs.c
malloc.o: malloc.c
$(CC) $(CFLAGS) -DMCOMP -c malloc.c
#
# Uncomment the following to model dispersion:
#
dielectric.o: dielectric.c source.h
$(CC) $(CFLAGS) -DDISPERSE -c dielectric.c
# end of dispersion compiles.
devcomm.o: devcomm.c
$(CC) $(CFLAGS) -DDEVPATH=\"$(DEVDIR)\" -c devcomm.c
sundev.o: sundev.c
$(CC) $(CFLAGS) -DTTYPROG=\"$(DEVDIR)/sun.com\" -Dsun_init=dinit -c sundev.c
x10.o: x10.c
$(CC) $(CFLAGS) -Dx_init=dinit -c x10.c
aed.o: aed.c
$(CC) $(CFLAGS) -Daed_init=dinit -c aed.c
calexpr.o: calexpr.c ../common/calcomp.h
$(CC) $(CFLAGS) -DVARIABLE -DFUNCTION -DINCHAN -DRCONST -c calexpr.c
caldefn.o: caldefn.c ../common/calcomp.h
$(CC) $(CFLAGS) -DFUNCTION -DREDEFW -c caldefn.c
nwsdev.o: nwsdev.c nwsdev.h newsconstants.h
$(CC) $(CFLAGS) -Dnws_init=dinit -c nwsdev.c
nwsdev.h: nwsdev.cps newsconstants.h
cps nwsdev.cps
#
# Version module:
#
Version.c: VERSION $(RSRC) $(HEADERS)
( cat VERSION ; date ; whoami ; hostname ) > Version.c
ed - Version.c < verscript.ed
#
# Include dependencies:
#
aed.o ambio.o colortab.o data.o devcomm.o \
devmain.o lookamb.o rview.o sundev.o x10.o x11.o: ../common/color.h
o_cone.o srcsupp.o: ../common/cone.h
data.o m_brdf.o mx_data.o p_data.o t_data.o: data.h
aed.o devcomm.o devmain.o devtable.o \
editline.o nwsdev.o sundev.o tty.o x10.o x11.o: driver.h
o_face.o srcsupp.o: ../common/face.h
ambient.o raytrace.o rpmain.o rtmain.o \
rtrace.o rvmain.o rv2.o rv3.o source.o: ../common/octree.h
o_instance.o: ../common/instance.h ../common/octree.h
ambient.o aniso.o dielectric.o func.o initotypes.o m_brdf.o \
normal.o o_cone.o text.o raytrace.o rtrace.o \
rv2.o source.o srcsupp.o virtuals.o sphere.o: ../common/otypes.h
ambient.o ambcomp.o aniso.o normal.o rpict.o \
rv3.o srcsamp.o virtuals.o: ../common/random.h
ambient.o ambcomp.o aniso.o dielectric.o func.o glass.o m_clip.o m_mirror.o \
m_brdf.o mx_data.o mx_func.o normal.o o_cone.o o_face.o o_instance.o \
p_data.o p_func.o text.o raytrace.o rpmain.o rtmain.o rvmain.o rpict.o \
rtrace.o rview.o rv2.o rv3.o source.o srcsamp.o srcsupp.o virtuals.o \
sphere.o t_data.o t_func.o: ray.h ../common/standard.h \
../common/mat4.h ../common/fvect.h ../common/object.h ../common/color.h
rv2.o rv3.o rview.o: rpaint.h driver.h ../common/view.h
m_direct.o m_mirror.o \
source.o srcsamp.o srcsupp.o virtuals.o: source.h
cone.o data.o devcomm.o initotypes.o \
octree.o: ../common/standard.h ../common/mat4.h ../common/fvect.h
initotypes.o raytrace.o: otspecial.h
sundev.o: suntools.icon
rpmain.o rtmain.o rvmain.o rpict.o: ../common/view.h
x10.o xtwind.o: xtwind.h
x11.o x11twind.o: x11twind.h
x11.o: x11icon.h
ambient.o ambcomp.o ambio.o lookamb.o: ambient.h
data.o rmain.o rpict.o rtrace.o rv2.o: ../common/resolu.h
aniso.o func.o m_brdf.o m_direct.o mx_data.o mx_func.o p_data.o \
p_func.o t_data.o t_func.o: func.h
devcomm.o: ../common/vfork.h
rtmain.o rpmain.o rvmain.o rpict.o: ../common/paths.h