--- ray/src/rt/Rmakefile 1989/02/21 14:56:15 1.2 +++ ray/src/rt/Rmakefile 1991/10/08 15:32:43 1.61 @@ -1,195 +1,248 @@ -# SCCSid "$SunId$ LBL" - # +# SCCSid "$SunId$ LBL" # Compiles for ray tracing programs. # -CFLAGS = -DBSD -O -DIEEE -f68881 /usr/lib/f68881.il +OPT = -O -pipe +MACH = -DSTRUCTASSIGN -DBSD -DIEEE -f68881 /usr/lib/libm.il +CFLAGS = $(MACH) $(OPT) -I../common -L../lib +CC = cc +LINT = lint +LINTFLAGS = -DSTRUCTASSIGN -DBSD -DIEEE -DVARIABLE -DFUNCTION \ +-DINCHAN -DRCONST -DREDEFW -DBIGLIB # # The following are user-definable: # DESTDIR = . -INSTDIR = /usr/local/ray +INSTDIR = /lumen/lumen/ray/bin.sun3 INSTALL = cp # # The following paths must exist and be relative to root: # -DEVDIR = $(LIBDIR)/lib +DEVDIR = $(INSTDIR)/dev LIBDIR = /usr/local/lib/ray # # Library routines: # -LIBS = -lm -COMPAT = malloc.o +LIBS = -lrt -lm # # Device drivers for rview (see also devtable.c): # -DOBJS = devtable.o devcomm.o aed.o tty.o editline.o sun.o x10.o xtwind.o -DLIBS = -lX -DRIVERS = $(DEVDIR)/sun.dev $(DEVDIR)/sun.com +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) +RTSRC = rmain.c rtrace.c $(RSRC) -RPOBJS = rpmain.o rpict.o image.o $(ROBJS) +RPOBJS = rpmain.o rpict.o $(ROBJS) +RPSRC = rmain.c rpict.c $(RSRC) -RVOBJS = rvmain.o rview.o rv2.o rv3.o image.o $(DOBJS) $(ROBJS) +RVOBJS = rvmain.o rview.o rv2.o rv3.o $(DOBJS) $(ROBJS) +RVSRC = rmain.c rview.c rv2.c rv3.c $(DSRC) $(RSRC) -ROBJS = $(OCTOBJS) $(RAYOBJS) $(SURFOBJS) $(MATOBJS) \ - $(MODOBJS) $(SUPPOBJS) $(MISCOBJS) $(COMPAT) +ROBJS = $(RAYOBJS) $(SURFOBJS) $(MATOBJS) \ + $(MODOBJS) $(SUPPOBJS) +RSRC = $(RAYSRC) $(SURFSRC) $(MATSRC) \ + $(MODSRC) $(SUPPSRC) -OCTOBJS = octree.o readobj.o readoct.o objset.o otypes.o +RAYOBJS = initotypes.o raytrace.o ambient.o ambcomp.o +RAYSRC = initotypes.c raytrace.c ambient.c ambcomp.c -RAYOBJS = raytrace.o ambient.o +SURFOBJS = source.o sphere.o srcsupp.o virtuals.o o_face.o o_cone.o \ + o_instance.o +SURFSRC = sphere.c source.c srcsupp.c virtuals.c o_face.c \ + o_cone.c o_instance.c -SURFOBJS = face.o sphere.o source.o o_face.o cone.o \ - o_cone.o o_instance.o instance.o +MATOBJS = 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 -MATOBJS = normal.o dielectric.o m_clip.o glass.o +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 -MODOBJS = p_func.o t_func.o p_data.o text.o mx_func.o mx_data.o +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 -SUPPOBJS = zeroes.o calexpr.o caldefn.o calfunc.o func.o noise3.o data.o - -MISCOBJS = misc.o color.o header.o mat4.o xf.o fvect.o savestr.o ealloc.o - # # What this makefile produces: # PROGS = $(DESTDIR)/rtrace $(DESTDIR)/rpict $(DESTDIR)/rview $(DESTDIR)/lookamb -all: $(PROGS) $(DRIVERS) +all: $(PROGS) -install: all +install: $(PROGS) 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 + +tiff: + clean: - rm -f *.o core + 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) + $(CC) $(CFLAGS) -o $(DESTDIR)/rtrace $(RTOBJS) $(LIBS) $(DESTDIR)/rpict: $(RPOBJS) - cc $(CFLAGS) -o $(DESTDIR)/rpict $(RPOBJS) $(LIBS) + $(CC) $(CFLAGS) -o $(DESTDIR)/rpict $(RPOBJS) $(LIBS) $(DESTDIR)/rview: $(RVOBJS) - cc $(CFLAGS) -o $(DESTDIR)/rview $(RVOBJS) $(DLIBS) $(LIBS) + $(CC) $(CFLAGS) -o $(DESTDIR)/rview $(RVOBJS) $(DLIBS) $(LIBS) $(DESTDIR)/lookamb: lookamb.o - cc $(CFLAGS) -o $(DESTDIR)/lookamb lookamb.o + $(CC) $(CFLAGS) -o $(DESTDIR)/lookamb lookamb.o -$(DEVDIR)/sun.dev: sundev.o - cc $(CFLAGS) -o $(DEVDIR)/sun.dev sundev.o \ --lsuntool -lsunwindow -lpixrect $(LIBS) +$(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) -o $(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) + # # Special compiles: # rtmain.o: rmain.c - cc $(CFLAGS) -DRTRACE -DNICE=4 -DDEFPATH=\":$(LIBDIR)\" -c 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 + $(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 + $(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 -# -#color.o: color.c color.h -# cc $(CFLAGS) -DSPEC_RGB -c color.c -# +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\" -c sundev.c + $(CC) $(CFLAGS) -DTTYPROG=\"$(DEVDIR)/sun.com\" -Dsun_init=dinit -c sundev.c -devcomm.o: devcomm.c - cc $(CFLAGS) -DDEVPATH=\"$(DEVDIR)\" -c devcomm.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 + ambient.o: ambient.c - cc $(CFLAGS) -DAMBFLUSH=16 -c ambient.c + $(CC) $(CFLAGS) -DAMBFLUSH=16 -c ambient.c -calexpr.o: calexpr.c calcomp.h - cc $(CFLAGS) -DVARIABLE -DFUNCTION -DINCHAN -DRCONST -c calexpr.c +calexpr.o: calexpr.c ../common/calcomp.h + $(CC) $(CFLAGS) -DVARIABLE -DFUNCTION -DINCHAN -DRCONST -c calexpr.c -caldefn.o: caldefn.c calcomp.h - cc $(CFLAGS) -DFUNCTION -c caldefn.c +caldefn.o: caldefn.c ../common/calcomp.h + $(CC) $(CFLAGS) -DFUNCTION -DREDEFW -c caldefn.c -calfunc.o: calfunc.c calcomp.h - cc $(CFLAGS) -DVARIABLE -DBIGLIB -c calfunc.c +nwsdev.o: nwsdev.c nwsdev.h newsconstants.h + $(CC) $(CFLAGS) -c nwsdev.c -xf.o: xf.c - cc $(CFLAGS) -DINVXF -c xf.c +nwsdev.h: nwsdev.cps newsconstants.h + cps nwsdev.cps # # Include dependencies: # -caldefn.o calexpr.o calfunc.o: calcomp.h +aed.o colortab.o data.o devcomm.o \ +devmain.o lookamb.o rview.o sundev.o x10.o x11.o: ../common/color.h -aed.o color.o data.o devcomm.o lookamb.o rview.o sundev.o x10.o: color.h +o_cone.o srcsupp.o: ../common/cone.h -cone.o o_cone.o source.o: cone.h +data.o m_brdf.o mx_data.o p_data.o t_data.o: data.h -data.o mx_data.o p_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 -aed.o devcomm.o devtable.o sun.o sundev.o tty.o x10.o: driver.h +o_face.o srcsupp.o: ../common/face.h -face.o o_face.o source.o: face.h +ambient.o raytrace.o rpmain.o rtmain.o \ +rtrace.o rvmain.o rv2.o rv3.o source.o: ../common/octree.h -fvect.o: fvect.h +o_instance.o: ../common/instance.h ../common/octree.h -cone.o face.o objset.o otypes.o readobj.o readoct.o: object.h +ambient.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 objset.o octree.o raytrace.o readoct.o rmain.o rv2.o: octree.h +ambient.o ambcomp.o rpict.o rv3.o source.o: ../common/random.h -o_instance.o instance.o: instance.h octree.h +ambient.o ambcomp.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 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 -cone.o dielectric.o func.o normal.o o_cone.o otypes.o \ -text.o raytrace.o readobj.o readoct.o rtrace.o \ -rv2.o source.o sphere.o: otypes.h +rv2.o rv3.o rview.o: rpaint.h driver.h ../common/view.h -ambient.o rpict.o rv3.o source.o: random.h +mirror.o source.o srcsupp.o virtuals.o: source.h -ambient.o dielectric.o func.o glass.o image.o m_clip.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 rmain.o rpict.o \ -rtrace.o rv2.o rv3.o source.o \ -sphere.o t_func.o: ray.h standard.h fvect.h object.h color.h +cone.o data.o devcomm.o initotypes.o \ +octree.o: ../common/standard.h ../common/mat4.h ../common/fvect.h -rv2.o rv3.o rview.o: rpaint.h driver.h view.h +initotypes.o raytrace.o: otspecial.h -dielectric.o normal.o source.o: source.h - -cone.o data.o face.o misc.o objset.o octree.o otypes.o \ -readobj.o readoct.o rview.o: standard.h fvect.h - sundev.o: suntools.icon -image.o rmain.o rpict.o: view.h +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 lookamb.o: ambient.h