| 1 | greg | 1.56 | # | 
| 2 | greg | 1.1 | # SCCSid "$SunId$ LBL" | 
| 3 | greg | 2.2 | # Compiles for ray tracing programs. | 
| 4 | greg | 1.1 | # | 
| 5 |  |  |  | 
| 6 | greg | 1.66 | OPT = -O | 
| 7 | greg | 1.68 | MACH = -DBSD | 
| 8 | greg | 1.59 | CFLAGS = $(MACH) $(OPT) -I../common -L../lib | 
| 9 | greg | 1.67 | SPECIAL = aed | 
| 10 | greg | 1.26 | CC = cc | 
| 11 | greg | 2.15 | MLIB = -lm | 
| 12 | greg | 1.35 | LINT = lint | 
| 13 | greg | 1.68 | LINTFLAGS = -DBSD -DVARIABLE -DFUNCTION \ | 
| 14 |  |  | -DINCHAN -DRCONST -DREDEFW | 
| 15 | greg | 1.1 |  | 
| 16 |  |  | # | 
| 17 |  |  | # The following are user-definable: | 
| 18 |  |  | # | 
| 19 |  |  | DESTDIR = . | 
| 20 | greg | 1.66 | INSTDIR = /usr/local/bin | 
| 21 | greg | 1.5 | INSTALL = cp | 
| 22 | greg | 1.1 |  | 
| 23 |  |  | # | 
| 24 |  |  | # The following paths must exist and be relative to root: | 
| 25 |  |  | # | 
| 26 | greg | 1.33 | DEVDIR = $(INSTDIR)/dev | 
| 27 | greg | 1.1 | LIBDIR = /usr/local/lib/ray | 
| 28 |  |  |  | 
| 29 |  |  | # | 
| 30 | greg | 1.2 | # Library routines: | 
| 31 | greg | 1.1 | # | 
| 32 | greg | 2.15 | LIBS = -lrt $(MLIB) | 
| 33 | greg | 1.1 |  | 
| 34 |  |  | # | 
| 35 |  |  | # Device drivers for rview (see also devtable.c): | 
| 36 |  |  | # | 
| 37 | greg | 1.39 | DOBJS = devtable.o devcomm.o editline.o x11.o x11twind.o \ | 
| 38 |  |  | colortab.o | 
| 39 | greg | 1.46 | DSRC = devtable.c devcomm.c editline.c x11.c x11twind.c \ | 
| 40 | greg | 1.39 | colortab.c | 
| 41 |  |  | DLIBS = -lX11 | 
| 42 | greg | 1.1 |  | 
| 43 |  |  | # | 
| 44 |  |  | # Standard object files: | 
| 45 |  |  | # | 
| 46 |  |  |  | 
| 47 | greg | 2.11 | RTOBJS = rtmain.o rtrace.o duphead.o persist.o preload.o $(ROBJS) Version.o | 
| 48 | greg | 1.62 | RTSRC = rmain.c rtrace.c $(RSRC) Version.c | 
| 49 | greg | 1.1 |  | 
| 50 | greg | 2.11 | RPOBJS = rpmain.o rpict.o duphead.o persist.o preload.o $(ROBJS) Version.o | 
| 51 | greg | 1.62 | RPSRC = rmain.c rpict.c $(RSRC) Version.c | 
| 52 | greg | 1.1 |  | 
| 53 | greg | 2.12 | RVOBJS = rvmain.o rview.o rv2.o rv3.o freeobjmem.o $(DOBJS) $(ROBJS) Version.o | 
| 54 |  |  | RVSRC = rmain.c rview.c rv2.c rv3.c freeobjmem.c $(DSRC) $(RSRC) Version.c | 
| 55 | greg | 1.1 |  | 
| 56 | greg | 1.51 | ROBJS = $(RAYOBJS) $(SURFOBJS) $(MATOBJS) \ | 
| 57 | greg | 1.61 | $(MODOBJS) $(SUPPOBJS) | 
| 58 | greg | 1.51 | RSRC = $(RAYSRC) $(SURFSRC) $(MATSRC) \ | 
| 59 |  |  | $(MODSRC) $(SUPPSRC) | 
| 60 | greg | 1.1 |  | 
| 61 | greg | 2.7 | RAYOBJS = initotypes.o raytrace.o ambient.o ambcomp.o ambio.o | 
| 62 |  |  | RAYSRC = initotypes.c raytrace.c ambient.c ambcomp.c ambio.c | 
| 63 | greg | 1.1 |  | 
| 64 | greg | 1.64 | SURFOBJS = source.o sphere.o srcsupp.o srcsamp.o virtuals.o o_face.o \ | 
| 65 |  |  | o_cone.o o_instance.o | 
| 66 | greg | 1.51 | SURFSRC = sphere.c source.c srcsupp.c virtuals.c o_face.c \ | 
| 67 | greg | 1.64 | srcsamp.c o_cone.c o_instance.c | 
| 68 | greg | 1.1 |  | 
| 69 | greg | 2.3 | MATOBJS = aniso.o normal.o dielectric.o m_clip.o glass.o m_brdf.o \ | 
| 70 | greg | 2.14 | m_mirror.o m_direct.o fprism.o | 
| 71 | greg | 2.13 | MATSRC = aniso.c normal.c dielectric.c m_clip.c glass.c m_brdf.c \ | 
| 72 | greg | 2.14 | m_mirror.c m_direct.c fprism.c | 
| 73 | greg | 1.1 |  | 
| 74 | greg | 1.3 | MODOBJS = p_func.o t_func.o p_data.o t_data.o text.o mx_func.o mx_data.o | 
| 75 | greg | 1.35 | MODSRC = p_func.c t_func.c p_data.c t_data.c text.c mx_func.c mx_data.c | 
| 76 | greg | 1.1 |  | 
| 77 | greg | 2.17 | SUPPOBJS = zeroes.o calexpr.o caldefn.o func.o noise3.o malloc.o data.o \ | 
| 78 |  |  | readfargs.o | 
| 79 |  |  | SUPPSRC = zeroes.c calexpr.c caldefn.c func.c noise3.c data.c malloc.c \ | 
| 80 |  |  | readfargs.c | 
| 81 | greg | 1.1 |  | 
| 82 | greg | 1.62 | HEADERS = ambient.h ray.h data.h otspecial.h source.h | 
| 83 |  |  |  | 
| 84 | greg | 1.1 | # | 
| 85 |  |  | # What this makefile produces: | 
| 86 |  |  | # | 
| 87 |  |  |  | 
| 88 |  |  | PROGS = $(DESTDIR)/rtrace $(DESTDIR)/rpict $(DESTDIR)/rview $(DESTDIR)/lookamb | 
| 89 |  |  |  | 
| 90 | greg | 1.67 | all:    $(PROGS) $(SPECIAL) | 
| 91 | greg | 1.1 |  | 
| 92 | greg | 1.67 | install:        $(PROGS) $(SPECIAL) rayinit.cal | 
| 93 | greg | 1.1 | $(INSTALL) $(PROGS) $(INSTDIR) | 
| 94 | greg | 1.58 | rm -f $(LIBDIR)/rayinit.cal | 
| 95 |  |  | cp rayinit.cal $(LIBDIR) | 
| 96 | greg | 1.1 |  | 
| 97 | greg | 1.39 | sun:    $(DEVDIR)/sun $(DEVDIR)/sun.com | 
| 98 |  |  |  | 
| 99 |  |  | x10:    $(DEVDIR)/x10 | 
| 100 |  |  |  | 
| 101 | greg | 1.40 | aed:    $(DEVDIR)/aed | 
| 102 | greg | 1.39 |  | 
| 103 | greg | 1.69 | sgi:    $(DEVDIR)/news | 
| 104 |  |  |  | 
| 105 | greg | 1.57 | tiff: | 
| 106 |  |  |  | 
| 107 | greg | 1.1 | clean: | 
| 108 | greg | 1.41 | set nonomatch; rm -f $(PROGS) *.o core | 
| 109 | greg | 1.35 |  | 
| 110 |  |  | lint:   $(RVSRC) | 
| 111 |  |  | $(LINT) $(LINTFLAGS) -DRVIEW $(RVSRC) $(LIBS) | 
| 112 | greg | 1.1 |  | 
| 113 |  |  | # | 
| 114 |  |  | # Links: | 
| 115 |  |  | # | 
| 116 |  |  |  | 
| 117 | greg | 1.59 | $(DESTDIR)/rtrace:      $(RTOBJS) | 
| 118 | greg | 1.26 | $(CC) $(CFLAGS) -o $(DESTDIR)/rtrace $(RTOBJS) $(LIBS) | 
| 119 | greg | 1.1 |  | 
| 120 | greg | 1.59 | $(DESTDIR)/rpict:       $(RPOBJS) | 
| 121 | greg | 1.26 | $(CC) $(CFLAGS) -o $(DESTDIR)/rpict $(RPOBJS) $(LIBS) | 
| 122 | greg | 1.1 |  | 
| 123 | greg | 1.59 | $(DESTDIR)/rview:       $(RVOBJS) | 
| 124 | greg | 1.26 | $(CC) $(CFLAGS) -o $(DESTDIR)/rview $(RVOBJS) $(DLIBS) $(LIBS) | 
| 125 | greg | 1.1 |  | 
| 126 | greg | 2.7 | $(DESTDIR)/lookamb:     lookamb.o ambio.o | 
| 127 |  |  | $(CC) $(CFLAGS) -o $(DESTDIR)/lookamb lookamb.o ambio.o -lrt | 
| 128 | greg | 1.1 |  | 
| 129 | greg | 1.33 | $(DEVDIR)/sun:  sundev.o devmain.o colortab.o editline.o | 
| 130 |  |  | $(CC) $(CFLAGS) -s -o $(DEVDIR)/sun devmain.o sundev.o colortab.o \ | 
| 131 | greg | 1.22 | editline.o -lsuntool -lsunwindow -lpixrect $(LIBS) | 
| 132 | greg | 1.1 |  | 
| 133 |  |  | $(DEVDIR)/sun.com:      suncom.o editline.o | 
| 134 | greg | 1.33 | $(CC) $(CFLAGS) -s -o $(DEVDIR)/sun.com suncom.o editline.o | 
| 135 | greg | 1.1 |  | 
| 136 | greg | 1.39 | $(DEVDIR)/x10:  x10.o xtwind.o colortab.o devmain.o editline.o | 
| 137 |  |  | $(CC) $(CFLAGS) -s -o $(DEVDIR)/x10 x10.o xtwind.o devmain.o \ | 
| 138 |  |  | colortab.o editline.o -lX $(LIBS) | 
| 139 | greg | 1.15 |  | 
| 140 | greg | 1.40 | $(DEVDIR)/aed:  aed.o colortab.o tty.o devmain.o editline.o | 
| 141 |  |  | $(CC) $(CFLAGS) -s -o $(DEVDIR)/aed aed.o colortab.o \ | 
| 142 |  |  | devmain.o tty.o editline.o $(LIBS) | 
| 143 |  |  |  | 
| 144 | greg | 1.69 | $(DEVDIR)/news: nwsdev.o devmain.o editline.o | 
| 145 |  |  | $(CC) $(CFLAGS) -s -o $(DEVDIR)/news nwsdev.o devmain.o editline.o \ | 
| 146 |  |  | -lcps $(LIBS) | 
| 147 |  |  |  | 
| 148 | greg | 1.1 | # | 
| 149 |  |  | # Special compiles: | 
| 150 |  |  | # | 
| 151 |  |  |  | 
| 152 |  |  | rtmain.o:       rmain.c | 
| 153 | greg | 2.16 | $(CC) $(CFLAGS) -DRTRACE -DNICE=4 -c rmain.c | 
| 154 | greg | 1.1 | mv rmain.o rtmain.o | 
| 155 |  |  |  | 
| 156 |  |  | rpmain.o:       rmain.c | 
| 157 | greg | 2.16 | $(CC) $(CFLAGS) -DRPICT -DNICE=6 -c rmain.c | 
| 158 | greg | 1.1 | mv rmain.o rpmain.o | 
| 159 |  |  |  | 
| 160 |  |  | rvmain.o:       rmain.c | 
| 161 | greg | 2.16 | $(CC) $(CFLAGS) -DRVIEW -c rmain.c | 
| 162 | greg | 1.1 | mv rmain.o rvmain.o | 
| 163 | greg | 1.56 |  | 
| 164 |  |  | readfargs.o:    readfargs.c ../common/object.h | 
| 165 |  |  | $(CC) $(CFLAGS) -DMEMHOG -c readfargs.c | 
| 166 | greg | 1.60 |  | 
| 167 |  |  | malloc.o:       malloc.c | 
| 168 |  |  | $(CC) $(CFLAGS) -DMCOMP -c malloc.c | 
| 169 | greg | 1.1 |  | 
| 170 |  |  | # | 
| 171 | greg | 1.51 | # Uncomment the following to model dispersion: | 
| 172 | greg | 1.1 | # | 
| 173 | greg | 1.55 | dielectric.o:   dielectric.c source.h | 
| 174 |  |  | $(CC) $(CFLAGS) -DDISPERSE -c dielectric.c | 
| 175 |  |  |  | 
| 176 | greg | 1.1 | # end of dispersion compiles. | 
| 177 |  |  |  | 
| 178 | greg | 1.33 | devcomm.o:      devcomm.c | 
| 179 |  |  | $(CC) $(CFLAGS) -DDEVPATH=\"$(DEVDIR)\" -c devcomm.c | 
| 180 |  |  |  | 
| 181 | greg | 1.1 | sundev.o:       sundev.c | 
| 182 | greg | 1.33 | $(CC) $(CFLAGS) -DTTYPROG=\"$(DEVDIR)/sun.com\" -Dsun_init=dinit -c sundev.c | 
| 183 | greg | 1.1 |  | 
| 184 | greg | 1.39 | x10.o:  x10.c | 
| 185 |  |  | $(CC) $(CFLAGS) -Dx_init=dinit -c x10.c | 
| 186 | greg | 1.40 |  | 
| 187 |  |  | aed.o:  aed.c | 
| 188 |  |  | $(CC) $(CFLAGS) -Daed_init=dinit -c aed.c | 
| 189 | greg | 1.1 |  | 
| 190 | greg | 1.53 | calexpr.o:      calexpr.c ../common/calcomp.h | 
| 191 | greg | 1.26 | $(CC) $(CFLAGS) -DVARIABLE -DFUNCTION -DINCHAN -DRCONST -c calexpr.c | 
| 192 | greg | 1.1 |  | 
| 193 | greg | 1.53 | caldefn.o:      caldefn.c ../common/calcomp.h | 
| 194 |  |  | $(CC) $(CFLAGS) -DFUNCTION -DREDEFW -c caldefn.c | 
| 195 | greg | 1.1 |  | 
| 196 | greg | 1.27 | nwsdev.o:       nwsdev.c nwsdev.h newsconstants.h | 
| 197 | greg | 1.69 | $(CC) $(CFLAGS) -Dnws_init=dinit -c nwsdev.c | 
| 198 | greg | 1.27 |  | 
| 199 |  |  | nwsdev.h:       nwsdev.cps newsconstants.h | 
| 200 |  |  | cps nwsdev.cps | 
| 201 | greg | 1.62 |  | 
| 202 |  |  | # | 
| 203 |  |  | # Version module: | 
| 204 |  |  | # | 
| 205 |  |  |  | 
| 206 | greg | 1.63 | Version.c:      VERSION $(RSRC) $(HEADERS) | 
| 207 |  |  | ( cat VERSION ; date ; whoami ; hostname ) > Version.c | 
| 208 | greg | 1.62 | ed - Version.c < verscript.ed | 
| 209 | greg | 1.27 |  | 
| 210 | greg | 1.1 | # | 
| 211 |  |  | # Include dependencies: | 
| 212 |  |  | # | 
| 213 |  |  |  | 
| 214 | greg | 2.7 | aed.o ambio.o colortab.o data.o devcomm.o \ | 
| 215 | greg | 1.52 | devmain.o lookamb.o rview.o sundev.o x10.o x11.o:       ../common/color.h | 
| 216 | greg | 1.1 |  | 
| 217 | greg | 1.54 | o_cone.o srcsupp.o:     ../common/cone.h | 
| 218 | greg | 1.1 |  | 
| 219 | greg | 1.37 | data.o m_brdf.o mx_data.o p_data.o t_data.o:    data.h | 
| 220 | greg | 1.1 |  | 
| 221 | greg | 1.19 | aed.o devcomm.o devmain.o devtable.o \ | 
| 222 | greg | 1.27 | editline.o nwsdev.o sundev.o tty.o x10.o x11.o: driver.h | 
| 223 | greg | 1.1 |  | 
| 224 | greg | 1.52 | o_face.o srcsupp.o:     ../common/face.h | 
| 225 | greg | 1.1 |  | 
| 226 | greg | 1.51 | ambient.o raytrace.o rpmain.o rtmain.o \ | 
| 227 | greg | 1.52 | rtrace.o rvmain.o rv2.o rv3.o source.o: ../common/octree.h | 
| 228 | greg | 1.1 |  | 
| 229 | greg | 1.52 | o_instance.o:   ../common/instance.h ../common/octree.h | 
| 230 | greg | 1.1 |  | 
| 231 | greg | 2.18 | ambient.c aniso.c dielectric.c freeobjmem.c func.c initotypes.c \ | 
| 232 |  |  | m_brdf.c m_direct.c m_mirror.c normal.c o_cone.c preload.c \ | 
| 233 |  |  | raytrace.c rtrace.c rv2.c source.c sphere.c srcsupp.c text.c \ | 
| 234 |  |  | virtuals.c:     ../common/otypes.h | 
| 235 | greg | 1.1 |  | 
| 236 | greg | 2.3 | ambient.o ambcomp.o aniso.o normal.o rpict.o \ | 
| 237 | greg | 2.4 | rv3.o srcsamp.o virtuals.o:     ../common/random.h | 
| 238 | greg | 1.1 |  | 
| 239 | greg | 2.3 | ambient.o ambcomp.o aniso.o dielectric.o func.o glass.o m_clip.o m_mirror.o \ | 
| 240 | greg | 1.37 | m_brdf.o mx_data.o mx_func.o normal.o o_cone.o o_face.o o_instance.o \ | 
| 241 | greg | 1.24 | p_data.o p_func.o text.o raytrace.o rpmain.o rtmain.o rvmain.o rpict.o \ | 
| 242 | greg | 1.65 | rtrace.o rview.o rv2.o rv3.o source.o srcsamp.o srcsupp.o virtuals.o \ | 
| 243 | greg | 2.19 | sphere.o t_data.o t_func.o persist.o:   ray.h ../common/standard.h \ | 
| 244 | greg | 1.65 | ../common/mat4.h ../common/fvect.h ../common/object.h ../common/color.h | 
| 245 | greg | 1.1 |  | 
| 246 | greg | 1.52 | rv2.o rv3.o rview.o:    rpaint.h driver.h ../common/view.h | 
| 247 | greg | 1.1 |  | 
| 248 | greg | 1.70 | m_direct.o m_mirror.o \ | 
| 249 |  |  | source.o srcsamp.o srcsupp.o virtuals.o:        source.h | 
| 250 | greg | 1.1 |  | 
| 251 | greg | 2.14 | cone.o data.o devcomm.o freeobjmem.o initotypes.o fprism.o \ | 
| 252 | greg | 2.19 | duphead.o octree.o:     ../common/standard.h ../common/mat4.h ../common/fvect.h | 
| 253 | greg | 1.38 |  | 
| 254 | greg | 1.44 | initotypes.o raytrace.o:        otspecial.h | 
| 255 |  |  |  | 
| 256 | greg | 1.1 | sundev.o:       suntools.icon | 
| 257 |  |  |  | 
| 258 | greg | 1.52 | rpmain.o rtmain.o rvmain.o rpict.o:     ../common/view.h | 
| 259 | greg | 1.1 |  | 
| 260 |  |  | x10.o xtwind.o: xtwind.h | 
| 261 | greg | 1.15 |  | 
| 262 |  |  | x11.o x11twind.o: x11twind.h | 
| 263 | greg | 1.42 |  | 
| 264 |  |  | x11.o:  x11icon.h | 
| 265 | greg | 1.47 |  | 
| 266 | greg | 2.7 | ambient.o ambcomp.o ambio.o lookamb.o:  ambient.h | 
| 267 | greg | 1.70 |  | 
| 268 | greg | 2.6 | data.o rmain.o rpict.o rtrace.o rv2.o:  ../common/resolu.h | 
| 269 | greg | 2.2 |  | 
| 270 | greg | 2.3 | aniso.o func.o m_brdf.o m_direct.o mx_data.o mx_func.o p_data.o \ | 
| 271 | greg | 2.2 | p_func.o t_data.o t_func.o:     func.h | 
| 272 | greg | 2.12 |  | 
| 273 |  |  | freeobjmem.o:   ../common/object.h | 
| 274 | greg | 2.5 |  | 
| 275 |  |  | devcomm.o:      ../common/vfork.h | 
| 276 | greg | 2.9 |  | 
| 277 | greg | 2.11 | rtmain.o rpmain.o rvmain.o persist.o duphead.o rpict.o: ../common/paths.h |