| 1 | greg | 1.1 | # SCCSid "$SunId$ LBL" | 
| 2 |  |  |  | 
| 3 |  |  | # | 
| 4 |  |  | #  Compiles for ray tracing programs. | 
| 5 |  |  | # | 
| 6 |  |  |  | 
| 7 | greg | 1.11 | OPT = -O | 
| 8 | greg | 1.17 | MACH = -DSTRUCTASSIGN -DBSD -DIEEE -f68881 /usr/lib/f68881.il | 
| 9 | greg | 1.11 | CFLAGS = $(MACH) $(OPT) | 
| 10 | greg | 1.1 |  | 
| 11 |  |  | # | 
| 12 |  |  | # The following are user-definable: | 
| 13 |  |  | # | 
| 14 |  |  | DESTDIR = . | 
| 15 |  |  | INSTDIR = /usr/local/ray | 
| 16 | greg | 1.5 | INSTALL = cp | 
| 17 | greg | 1.1 |  | 
| 18 |  |  | # | 
| 19 |  |  | # The following paths must exist and be relative to root: | 
| 20 |  |  | # | 
| 21 | greg | 1.8 | DEVDIR = $(INSTDIR) | 
| 22 | greg | 1.1 | LIBDIR = /usr/local/lib/ray | 
| 23 |  |  |  | 
| 24 |  |  | # | 
| 25 | greg | 1.2 | # Library routines: | 
| 26 | greg | 1.1 | # | 
| 27 | greg | 1.2 | LIBS = -lm | 
| 28 | greg | 1.1 | COMPAT = malloc.o | 
| 29 |  |  |  | 
| 30 |  |  | # | 
| 31 |  |  | # Device drivers for rview (see also devtable.c): | 
| 32 |  |  | # | 
| 33 | greg | 1.13 | DOBJS = devtable.o devcomm.o aed.o tty.o editline.o x10.o xtwind.o \ | 
| 34 | greg | 1.9 | colortab.o | 
| 35 | greg | 1.1 | DLIBS = -lX | 
| 36 | greg | 1.21 | DRIVERS = $(DEVDIR)/sundev $(DEVDIR)/sun.com $(DEVDIR)/x11dev | 
| 37 | greg | 1.1 |  | 
| 38 |  |  | # | 
| 39 |  |  | # Standard object files: | 
| 40 |  |  | # | 
| 41 |  |  |  | 
| 42 |  |  | RTOBJS = rtmain.o rtrace.o $(ROBJS) | 
| 43 |  |  |  | 
| 44 |  |  | RPOBJS = rpmain.o rpict.o image.o $(ROBJS) | 
| 45 |  |  |  | 
| 46 |  |  | RVOBJS = rvmain.o rview.o rv2.o rv3.o image.o $(DOBJS) $(ROBJS) | 
| 47 |  |  |  | 
| 48 |  |  | ROBJS = $(OCTOBJS) $(RAYOBJS) $(SURFOBJS) $(MATOBJS) \ | 
| 49 |  |  | $(MODOBJS) $(SUPPOBJS) $(MISCOBJS) $(COMPAT) | 
| 50 |  |  |  | 
| 51 |  |  | OCTOBJS = octree.o readobj.o readoct.o objset.o otypes.o | 
| 52 |  |  |  | 
| 53 |  |  | RAYOBJS = raytrace.o ambient.o | 
| 54 |  |  |  | 
| 55 |  |  | SURFOBJS = face.o sphere.o source.o o_face.o cone.o \ | 
| 56 |  |  | o_cone.o o_instance.o instance.o | 
| 57 |  |  |  | 
| 58 |  |  | MATOBJS = normal.o dielectric.o m_clip.o glass.o | 
| 59 |  |  |  | 
| 60 | greg | 1.3 | MODOBJS = p_func.o t_func.o p_data.o t_data.o text.o mx_func.o mx_data.o | 
| 61 | greg | 1.1 |  | 
| 62 |  |  | SUPPOBJS = zeroes.o calexpr.o caldefn.o calfunc.o func.o noise3.o data.o | 
| 63 |  |  |  | 
| 64 | greg | 1.10 | MISCOBJS = misc.o color.o header.o mat4.o xf.o fvect.o savestr.o \ | 
| 65 |  |  | fgetline.o ealloc.o | 
| 66 | greg | 1.1 |  | 
| 67 |  |  | # | 
| 68 |  |  | # What this makefile produces: | 
| 69 |  |  | # | 
| 70 |  |  |  | 
| 71 |  |  | PROGS = $(DESTDIR)/rtrace $(DESTDIR)/rpict $(DESTDIR)/rview $(DESTDIR)/lookamb | 
| 72 |  |  |  | 
| 73 |  |  | all:    $(PROGS) $(DRIVERS) | 
| 74 |  |  |  | 
| 75 |  |  | install:        all | 
| 76 |  |  | $(INSTALL) $(PROGS) $(INSTDIR) | 
| 77 |  |  |  | 
| 78 |  |  | clean: | 
| 79 |  |  | rm -f *.o core | 
| 80 |  |  |  | 
| 81 |  |  | # | 
| 82 |  |  | # Links: | 
| 83 |  |  | # | 
| 84 |  |  |  | 
| 85 |  |  | $(DESTDIR)/rtrace:      $(RTOBJS) | 
| 86 | greg | 1.2 | cc $(CFLAGS) -o $(DESTDIR)/rtrace $(RTOBJS) $(LIBS) | 
| 87 | greg | 1.1 |  | 
| 88 |  |  | $(DESTDIR)/rpict:       $(RPOBJS) | 
| 89 | greg | 1.2 | cc $(CFLAGS) -o $(DESTDIR)/rpict $(RPOBJS) $(LIBS) | 
| 90 | greg | 1.1 |  | 
| 91 |  |  | $(DESTDIR)/rview:       $(RVOBJS) | 
| 92 | greg | 1.2 | cc $(CFLAGS) -o $(DESTDIR)/rview $(RVOBJS) $(DLIBS) $(LIBS) | 
| 93 | greg | 1.1 |  | 
| 94 |  |  | $(DESTDIR)/lookamb:     lookamb.o | 
| 95 |  |  | cc $(CFLAGS) -o $(DESTDIR)/lookamb lookamb.o | 
| 96 |  |  |  | 
| 97 | greg | 1.13 | $(DEVDIR)/sundev:       sundev.o devmain.o colortab.o | 
| 98 |  |  | cc $(CFLAGS) -o $(DEVDIR)/sundev devmain.o sundev.o colortab.o \ | 
| 99 | greg | 1.2 | -lsuntool -lsunwindow -lpixrect $(LIBS) | 
| 100 | greg | 1.1 |  | 
| 101 |  |  | $(DEVDIR)/sun.com:      suncom.o editline.o | 
| 102 |  |  | cc $(CFLAGS) -o $(DEVDIR)/sun.com suncom.o editline.o | 
| 103 |  |  |  | 
| 104 | greg | 1.21 | $(DEVDIR)/x11dev:       x11.o x11twind.o colortab.o devmain.o editline.o | 
| 105 |  |  | cc $(CFLAGS) -o $(DEVDIR)/x11dev x11.o x11twind.o devmain.o \ | 
| 106 |  |  | colortab.o editline.o -lX11 $(LIBS) | 
| 107 | greg | 1.15 |  | 
| 108 | greg | 1.1 | # | 
| 109 |  |  | # Special compiles: | 
| 110 |  |  | # | 
| 111 |  |  |  | 
| 112 |  |  | rtmain.o:       rmain.c | 
| 113 |  |  | cc $(CFLAGS) -DRTRACE -DNICE=4 -DDEFPATH=\":$(LIBDIR)\" -c rmain.c | 
| 114 |  |  | mv rmain.o rtmain.o | 
| 115 |  |  |  | 
| 116 |  |  | rpmain.o:       rmain.c | 
| 117 |  |  | cc $(CFLAGS) -DRPICT -DNICE=6 -DDEFPATH=\":$(LIBDIR)\" -c rmain.c | 
| 118 |  |  | mv rmain.o rpmain.o | 
| 119 |  |  |  | 
| 120 |  |  | rvmain.o:       rmain.c | 
| 121 |  |  | cc $(CFLAGS) -DRVIEW -DDEFPATH=\":$(LIBDIR)\" -c rmain.c | 
| 122 |  |  | mv rmain.o rvmain.o | 
| 123 |  |  |  | 
| 124 |  |  | # | 
| 125 |  |  | # Uncomment the following to model dispersion: | 
| 126 |  |  | # | 
| 127 |  |  | #dielectric.o:  dielectric.c source.h | 
| 128 |  |  | #       cc $(CFLAGS) -DDISPERSE -c dielectric.c | 
| 129 |  |  | # | 
| 130 |  |  | #color.o:       color.c color.h | 
| 131 |  |  | #       cc $(CFLAGS) -DSPEC_RGB -c color.c | 
| 132 |  |  | # | 
| 133 |  |  | # end of dispersion compiles. | 
| 134 |  |  |  | 
| 135 |  |  | sundev.o:       sundev.c | 
| 136 | greg | 1.20 | cc $(CFLAGS) -Dsun_init=dinit -c sundev.c | 
| 137 | greg | 1.1 |  | 
| 138 | greg | 1.21 | x11.o:  x11.c | 
| 139 |  |  | cc $(CFLAGS) -Dx11_init=dinit -c x11.c | 
| 140 | greg | 1.1 |  | 
| 141 |  |  | ambient.o:      ambient.c | 
| 142 |  |  | cc $(CFLAGS) -DAMBFLUSH=16 -c ambient.c | 
| 143 |  |  |  | 
| 144 |  |  | calexpr.o:      calexpr.c calcomp.h | 
| 145 |  |  | cc $(CFLAGS) -DVARIABLE -DFUNCTION -DINCHAN -DRCONST -c calexpr.c | 
| 146 |  |  |  | 
| 147 |  |  | caldefn.o:      caldefn.c calcomp.h | 
| 148 |  |  | cc $(CFLAGS) -DFUNCTION -c caldefn.c | 
| 149 |  |  |  | 
| 150 |  |  | calfunc.o:      calfunc.c calcomp.h | 
| 151 |  |  | cc $(CFLAGS) -DVARIABLE -DBIGLIB -c calfunc.c | 
| 152 |  |  |  | 
| 153 |  |  | xf.o:   xf.c | 
| 154 |  |  | cc $(CFLAGS) -DINVXF -c xf.c | 
| 155 |  |  |  | 
| 156 |  |  | # | 
| 157 |  |  | # Include dependencies: | 
| 158 |  |  | # | 
| 159 |  |  |  | 
| 160 |  |  | caldefn.o calexpr.o calfunc.o:  calcomp.h | 
| 161 |  |  |  | 
| 162 | greg | 1.9 | aed.o color.o colortab.o data.o devcomm.o \ | 
| 163 | greg | 1.18 | devmain.o lookamb.o rview.o sundev.o x10.o:     color.h | 
| 164 | greg | 1.1 |  | 
| 165 |  |  | cone.o o_cone.o source.o:       cone.h | 
| 166 |  |  |  | 
| 167 | greg | 1.3 | data.o mx_data.o p_data.o t_data.o:     data.h | 
| 168 | greg | 1.1 |  | 
| 169 | greg | 1.19 | aed.o devcomm.o devmain.o devtable.o \ | 
| 170 |  |  | editline.o sundev.o tty.o x10.o:        driver.h | 
| 171 | greg | 1.1 |  | 
| 172 |  |  | face.o o_face.o source.o:       face.h | 
| 173 |  |  |  | 
| 174 |  |  | fvect.o:        fvect.h | 
| 175 |  |  |  | 
| 176 |  |  | cone.o face.o objset.o otypes.o readobj.o readoct.o:    object.h | 
| 177 |  |  |  | 
| 178 | greg | 1.7 | ambient.o objset.o octree.o raytrace.o \ | 
| 179 | greg | 1.14 | readoct.o rmain.o rv2.o rv3.o source.o: octree.h | 
| 180 | greg | 1.1 |  | 
| 181 |  |  | o_instance.o instance.o:        instance.h octree.h | 
| 182 |  |  |  | 
| 183 | greg | 1.16 | ambient.o cone.o dielectric.o func.o normal.o o_cone.o otypes.o \ | 
| 184 | greg | 1.1 | text.o raytrace.o readobj.o readoct.o rtrace.o \ | 
| 185 |  |  | rv2.o source.o sphere.o:        otypes.h | 
| 186 |  |  |  | 
| 187 |  |  | ambient.o rpict.o rv3.o source.o:       random.h | 
| 188 |  |  |  | 
| 189 | greg | 1.12 | ambient.o dielectric.o func.o glass.o m_clip.o \ | 
| 190 | greg | 1.1 | mx_data.o mx_func.o normal.o o_cone.o o_face.o o_instance.o \ | 
| 191 |  |  | p_data.o p_func.o text.o raytrace.o rmain.o rpict.o \ | 
| 192 |  |  | rtrace.o rv2.o rv3.o source.o \ | 
| 193 | greg | 1.3 | sphere.o t_data.o t_func.o:     ray.h standard.h fvect.h object.h color.h | 
| 194 | greg | 1.1 |  | 
| 195 |  |  | rv2.o rv3.o rview.o:    rpaint.h driver.h view.h | 
| 196 |  |  |  | 
| 197 | greg | 1.7 | source.o:       source.h | 
| 198 | greg | 1.1 |  | 
| 199 | greg | 1.17 | cone.o data.o devcomm.o face.o image.o misc.o objset.o octree.o otypes.o \ | 
| 200 | greg | 1.1 | readobj.o readoct.o rview.o:    standard.h fvect.h | 
| 201 |  |  |  | 
| 202 |  |  | sundev.o:       suntools.icon | 
| 203 |  |  |  | 
| 204 |  |  | image.o rmain.o rpict.o:        view.h | 
| 205 |  |  |  | 
| 206 |  |  | x10.o xtwind.o: xtwind.h | 
| 207 | greg | 1.15 |  | 
| 208 |  |  | x11.o x11twind.o: x11twind.h |