| 1 | < | # SCCSid "$SunId$ LBL" | 
| 2 | < |  | 
| 1 | > | # RCSid: $Id$ | 
| 2 |  | # | 
| 3 |  | # Makefile for object generation programs | 
| 4 |  | # | 
| 5 |  |  | 
| 6 |  | OPT = -O | 
| 7 |  | MACH = -DBSD | 
| 8 | < | CFLAGS = $(MACH) $(OPT) -I../common -L../lib | 
| 8 | > | CFLAGS = -I../common -I../rt -L../lib $(OPT) $(MACH) | 
| 9 | > | CC = cc | 
| 10 | > | MLIB = -lm | 
| 11 |  |  | 
| 12 | + | INSTALL = cp | 
| 13 | + |  | 
| 14 |  | INSTDIR = /usr/local/bin | 
| 15 |  |  | 
| 16 |  | LIBDIR = /usr/local/lib/ray | 
| 17 |  |  | 
| 18 | < | PROGS = genbox gensky xform genblinds genrev genworm \ | 
| 19 | < | gensurf genprism replmarks mkillum | 
| 18 | > | PROGS = genbox gensky xform genblinds genrev genworm gendaylit gendaymtx \ | 
| 19 | > | gensurf genprism replmarks mkillum mksource genclock genssky | 
| 20 |  |  | 
| 21 | < | CALFILES = illum.cal rev.cal skybright.cal surf.cal | 
| 21 | > | LIBFILES = illum.cal rev.cal skybright.cal surf.cal clockface.hex \ | 
| 22 | > | glaze1.cal glaze2.cal perezlum.cal perezlum_c.cal mie_ca.dat | 
| 23 |  |  | 
| 24 |  | all:    $(PROGS) | 
| 25 |  |  | 
| 26 | < | install:        $(PROGS) genpine.csh genwindow.csh $(CALFILES) | 
| 27 | < | cp $(PROGS) $(INSTDIR) | 
| 28 | < | cp genwindow.csh $(INSTDIR)/genwindow | 
| 29 | < | chmod 755 $(INSTDIR)/genwindow | 
| 30 | < | cd $(LIBDIR) ; rm -f $(CALFILES) | 
| 31 | < | cp $(CALFILES) $(LIBDIR) | 
| 26 | > | install:        $(PROGS) $(LIBFILES) glaze.csh | 
| 27 | > | $(INSTALL) $(PROGS) $(INSTDIR) | 
| 28 | > | cp glaze.csh $(INSTDIR)/glaze | 
| 29 | > | chmod 755 $(INSTDIR)/glaze | 
| 30 | > | cd $(LIBDIR) && rm -f $(LIBFILES) | 
| 31 | > | cp $(LIBFILES) $(LIBDIR) | 
| 32 |  |  | 
| 33 |  | clean: | 
| 34 | < | set nonomatch; rm -f $(PROGS) *.o core | 
| 34 | > | set nonomatch; rm -f $(PROGS) *.o | 
| 35 |  |  | 
| 36 |  | genbeads:       genbeads.o hermite3.o | 
| 37 | < | cc $(CFLAGS) -o genbeads genbeads.o hermite3.o -lm | 
| 37 | > | $(CC) $(CFLAGS) -o genbeads genbeads.o hermite3.o $(MLIB) | 
| 38 |  |  | 
| 39 |  | genbox: genbox.o | 
| 40 | < | cc $(CFLAGS) -o genbox genbox.o | 
| 40 | > | $(CC) $(CFLAGS) -o genbox genbox.o -lwfobj -lrtrad $(MLIB) | 
| 41 |  |  | 
| 42 |  | genmarble:      genmarble.o ../common/random.h | 
| 43 | < | cc $(CFLAGS) -o genmarble genmarble.o -lm | 
| 43 | > | $(CC) $(CFLAGS) -o genmarble genmarble.o $(MLIB) | 
| 44 |  |  | 
| 45 |  | gensky: gensky.o sun.o | 
| 46 | < | cc $(CFLAGS) -o gensky gensky.o sun.o -lm | 
| 46 | > | $(CC) $(CFLAGS) -o gensky gensky.o sun.o -lrtrad $(MLIB) | 
| 47 |  |  | 
| 48 | + | gendaylit:      gendaylit.o sun.o | 
| 49 | + | $(CC) $(CFLAGS) -o gendaylit gendaylit.o sun.o -lrtrad $(MLIB) | 
| 50 | + |  | 
| 51 | + | gendaymtx:      gendaymtx.o sun.o | 
| 52 | + | $(CC) $(CFLAGS) -o gendaymtx gendaymtx.o sun.o -lrtrad $(MLIB) | 
| 53 | + |  | 
| 54 |  | genblinds:      genblinds.o | 
| 55 | < | cc $(CFLAGS) -o genblinds genblinds.o -lm | 
| 55 | > | $(CC) $(CFLAGS) -o genblinds genblinds.o -lrtrad $(MLIB) | 
| 56 |  |  | 
| 57 |  | genprism:       genprism.o | 
| 58 | < | cc $(CFLAGS) -o genprism genprism.o | 
| 58 | > | $(CC) $(CFLAGS) -o genprism genprism.o -lrtrad $(MLIB) | 
| 59 |  |  | 
| 60 |  | xform:  xform.o | 
| 61 | < | cc $(CFLAGS) -o xform xform.o -lrt -lm | 
| 61 | > | $(CC) $(CFLAGS) -o xform xform.o -lrtrad $(MLIB) | 
| 62 |  |  | 
| 63 |  | replmarks:      replmarks.o | 
| 64 | < | cc $(CFLAGS) -o replmarks replmarks.o -lrt -lm | 
| 64 | > | $(CC) $(CFLAGS) -o replmarks replmarks.o -lrtrad $(MLIB) | 
| 65 |  |  | 
| 66 |  | mkillum:        mkillum.o mkillum2.o mkillum3.o | 
| 67 | < | cc $(CFLAGS) -o mkillum mkillum.o mkillum2.o mkillum3.o -lrt -lm | 
| 67 | > | $(CC) $(CFLAGS) -o mkillum mkillum.o mkillum2.o mkillum3.o \ | 
| 68 | > | -lraycalls -lradiance -lrtrad $(MLIB) | 
| 69 |  |  | 
| 70 | < | genrev: genrev.o | 
| 71 | < | cc $(CFLAGS) -o genrev genrev.o -lrt -lm | 
| 70 | > | mksource:       mksource.o | 
| 71 | > | $(CC) $(CFLAGS) -o mksource mksource.o \ | 
| 72 | > | -lraycalls -lradiance -lrtrad $(MLIB) | 
| 73 |  |  | 
| 74 | + | genrev: genrev.o | 
| 75 | + | $(CC) $(CFLAGS) -o genrev genrev.o -lrtrad $(MLIB) | 
| 76 | + |  | 
| 77 | + | gencatenary: gencat.o | 
| 78 | + | $(CC) $(CFLAGS) -o gencatenary gencat.o -lrtrad $(MLIB) | 
| 79 | + |  | 
| 80 |  | genworm:        genworm.o | 
| 81 | < | cc $(CFLAGS) -o genworm genworm.o -lrt -lm | 
| 81 | > | $(CC) $(CFLAGS) -o genworm genworm.o -lrtrad $(MLIB) | 
| 82 |  |  | 
| 83 |  | gensurf:        gensurf.o | 
| 84 | < | cc $(CFLAGS) -o gensurf gensurf.o -lrt -lm | 
| 84 | > | $(CC) $(CFLAGS) -o gensurf gensurf.o -lrtrad $(MLIB) | 
| 85 |  |  | 
| 86 | + | genclock:       genclock.o | 
| 87 | + | $(CC) $(CFLAGS) -o genclock genclock.o $(MLIB) | 
| 88 | + |  | 
| 89 |  | genbranch:      genbranch.o | 
| 90 | < | cc $(CFLAGS) -o genbranch genbranch.o -lm | 
| 90 | > | $(CC) $(CFLAGS) -o genbranch genbranch.o $(MLIB) | 
| 91 |  |  | 
| 71 | – | gensurf.o:      ../common/standard.h ../common/mat4.h ../common/fvect.h | 
| 92 |  |  | 
| 93 | + | # Assume rt is built before this | 
| 94 | + | genssky:        genssky.o sun.o ../rt/data.o atmos.o | 
| 95 | + | $(CC) $(CFLAGS) -o genssky genssky.o ../rt/data.o sun.o atmos.o -lrtrad $(MLIB) | 
| 96 | + |  | 
| 97 | + | mksource.o:     ../common/random.h ../rt/ray.h ../common/octree.h \ | 
| 98 | + | ../common/object.h ../common/color.h \ | 
| 99 | + | ../common/standard.h ../common/rtmisc.h ../common/rtio.h \ | 
| 100 | + | ../common/rtmath.h ../common/mat4.h ../common/fvect.h \ | 
| 101 | + | ../common/rterror.h | 
| 102 | + |  | 
| 103 |  | genworm.o replmarks.o:  ../common/fvect.h | 
| 104 |  |  | 
| 105 | < | xform.o:        ../common/standard.h ../common/mat4.h ../common/fvect.h \ | 
| 106 | < | ../common/otypes.h ../common/object.h | 
| 105 | > | gensurf.o xform.o:      ../common/standard.h \ | 
| 106 | > | ../common/rtmisc.h ../common/rtio.h \ | 
| 107 | > | ../common/rtmath.h ../common/rterror.h \ | 
| 108 | > | ../common/mat4.h ../common/fvect.h | 
| 109 |  |  | 
| 110 | < | mkillum.o mkillum2.o mkillum3.o:        mkillum.h ../common/standard.h \ | 
| 79 | < | ../common/mat4.h ../common/fvect.h ../common/otypes.h ../common/object.h | 
| 110 | > | genbox.o:       ../common/fvect.h ../common/objutil.h ../common/rtio.h | 
| 111 |  |  | 
| 112 | + | genworm.o genrev.o gensurf.o:   ../common/resolu.h ../common/rterror.h | 
| 113 | + |  | 
| 114 | + | xform.o:        ../common/otypes.h ../common/object.h | 
| 115 | + |  | 
| 116 | + | mkillum.o mkillum2.o mkillum3.o:        mkillum.h \ | 
| 117 | + | ../common/otypes.h ../rt/ray.h ../common/octree.h \ | 
| 118 | + | ../common/object.h ../common/color.h \ | 
| 119 | + | ../common/standard.h ../common/rtmisc.h ../common/rtio.h \ | 
| 120 | + | ../common/rtmath.h ../common/mat4.h ../common/fvect.h \ | 
| 121 | + | ../common/rterror.h ../common/random.h | 
| 122 | + |  | 
| 123 | + | mkillum2.o:     ../rt/source.h ../common/face.h ../common/cone.h | 
| 124 | + |  | 
| 125 | + | mkillum2.o mkillum3.o:  ../common/paths.h | 
| 126 | + |  | 
| 127 |  | gensky.o:       ../common/color.h | 
| 128 | + |  | 
| 129 | + | gensurf.o genworm.o genrev.o:   ../common/calcomp.h | 
| 130 | + |  | 
| 131 | + | gendaylit.o gensky.o sun.o:     sun.h | 
| 132 | + |  | 
| 133 | + | gendaymtx.o:    ../common/platform.h ../common/rtmath.h \ | 
| 134 | + | ../common/mat4.h ../common/fvect.h ../common/color.h | 
| 135 | + |  | 
| 136 | + | genssky.o: ../common/rtio.h ../common/rtmath.h ../common/paths.h ../common/color.h | 
| 137 | + |  | 
| 138 | + | atmos.o: ../common/rtio.h ../common/rtmath.h ../common/color.h ../rt/data.h sun.h |