| 1 | 
greg | 
2.46 | 
# RCSid: $Id: Rmakefile,v 2.45 2024/08/02 19:01:13 greg Exp $ | 
| 2 | 
greg | 
1.1 | 
# | 
| 3 | 
  | 
  | 
# Makefile for object generation programs | 
| 4 | 
  | 
  | 
# | 
| 5 | 
  | 
  | 
 | 
| 6 | 
greg | 
1.5 | 
OPT = -O | 
| 7 | 
greg | 
1.22 | 
MACH = -DBSD | 
| 8 | 
greg | 
2.16 | 
CFLAGS = -I../common -I../rt -L../lib $(OPT) $(MACH) | 
| 9 | 
greg | 
2.2 | 
CC = cc | 
| 10 | 
greg | 
2.4 | 
MLIB = -lm | 
| 11 | 
greg | 
1.1 | 
 | 
| 12 | 
greg | 
2.42 | 
INSTALL = cp | 
| 13 | 
  | 
  | 
 | 
| 14 | 
greg | 
1.20 | 
INSTDIR = /usr/local/bin | 
| 15 | 
greg | 
1.1 | 
 | 
| 16 | 
greg | 
1.20 | 
LIBDIR = /usr/local/lib/ray | 
| 17 | 
greg | 
1.18 | 
 | 
| 18 | 
greg | 
2.30 | 
PROGS = genbox gensky xform genblinds genrev genworm gendaylit gendaymtx \ | 
| 19 | 
greg | 
2.44 | 
                gensurf genprism replmarks mkillum mksource genclock genssky gensdaymtx | 
| 20 | 
greg | 
1.1 | 
 | 
| 21 | 
greg | 
2.7 | 
LIBFILES = illum.cal rev.cal skybright.cal surf.cal clockface.hex \ | 
| 22 | 
greg | 
2.46 | 
                glaze1.cal glaze2.cal perezlum.cal perezlum_c.cal mie_ca.dat | 
| 23 | 
greg | 
1.18 | 
 | 
| 24 | 
greg | 
1.1 | 
all:    $(PROGS) | 
| 25 | 
  | 
  | 
 | 
| 26 | 
greg | 
2.7 | 
install:        $(PROGS) $(LIBFILES) glaze.csh | 
| 27 | 
greg | 
2.42 | 
        $(INSTALL) $(PROGS) $(INSTDIR) | 
| 28 | 
greg | 
2.7 | 
        cp glaze.csh $(INSTDIR)/glaze | 
| 29 | 
  | 
  | 
        chmod 755 $(INSTDIR)/glaze | 
| 30 | 
greg | 
2.10 | 
        cd $(LIBDIR) && rm -f $(LIBFILES) | 
| 31 | 
greg | 
2.5 | 
        cp $(LIBFILES) $(LIBDIR) | 
| 32 | 
greg | 
1.11 | 
 | 
| 33 | 
  | 
  | 
clean: | 
| 34 | 
greg | 
2.33 | 
        set nonomatch; rm -f $(PROGS) *.o | 
| 35 | 
greg | 
1.1 | 
 | 
| 36 | 
  | 
  | 
genbeads:       genbeads.o hermite3.o | 
| 37 | 
greg | 
2.4 | 
        $(CC) $(CFLAGS) -o genbeads genbeads.o hermite3.o $(MLIB) | 
| 38 | 
greg | 
1.1 | 
 | 
| 39 | 
  | 
  | 
genbox: genbox.o | 
| 40 | 
greg | 
2.41 | 
        $(CC) $(CFLAGS) -o genbox genbox.o -lwfobj -lrtrad $(MLIB) | 
| 41 | 
greg | 
1.1 | 
 | 
| 42 | 
greg | 
1.16 | 
genmarble:      genmarble.o ../common/random.h | 
| 43 | 
greg | 
2.4 | 
        $(CC) $(CFLAGS) -o genmarble genmarble.o $(MLIB) | 
| 44 | 
greg | 
1.1 | 
 | 
| 45 | 
  | 
  | 
gensky: gensky.o sun.o | 
| 46 | 
greg | 
2.37 | 
        $(CC) $(CFLAGS) -o gensky gensky.o sun.o -lrtrad $(MLIB) | 
| 47 | 
greg | 
1.1 | 
 | 
| 48 | 
greg | 
2.23 | 
gendaylit:      gendaylit.o sun.o | 
| 49 | 
  | 
  | 
        $(CC) $(CFLAGS) -o gendaylit gendaylit.o sun.o -lrtrad $(MLIB) | 
| 50 | 
  | 
  | 
 | 
| 51 | 
greg | 
2.30 | 
gendaymtx:      gendaymtx.o sun.o | 
| 52 | 
  | 
  | 
        $(CC) $(CFLAGS) -o gendaymtx gendaymtx.o sun.o -lrtrad $(MLIB) | 
| 53 | 
greg | 
2.28 | 
 | 
| 54 | 
greg | 
1.1 | 
genblinds:      genblinds.o | 
| 55 | 
greg | 
2.38 | 
        $(CC) $(CFLAGS) -o genblinds genblinds.o -lrtrad $(MLIB) | 
| 56 | 
greg | 
1.1 | 
 | 
| 57 | 
  | 
  | 
genprism:       genprism.o | 
| 58 | 
greg | 
2.37 | 
        $(CC) $(CFLAGS) -o genprism genprism.o -lrtrad $(MLIB) | 
| 59 | 
greg | 
1.1 | 
 | 
| 60 | 
greg | 
1.16 | 
xform:  xform.o | 
| 61 | 
schorsch | 
2.15 | 
        $(CC) $(CFLAGS) -o xform xform.o -lrtrad $(MLIB) | 
| 62 | 
greg | 
1.1 | 
 | 
| 63 | 
greg | 
1.16 | 
replmarks:      replmarks.o | 
| 64 | 
schorsch | 
2.15 | 
        $(CC) $(CFLAGS) -o replmarks replmarks.o -lrtrad $(MLIB) | 
| 65 | 
greg | 
1.10 | 
 | 
| 66 | 
greg | 
2.26 | 
mkillum:        mkillum.o mkillum2.o mkillum3.o | 
| 67 | 
greg | 
2.16 | 
        $(CC) $(CFLAGS) -o mkillum mkillum.o mkillum2.o mkillum3.o \ | 
| 68 | 
greg | 
2.26 | 
-lraycalls -lradiance -lrtrad $(MLIB) | 
| 69 | 
greg | 
1.17 | 
 | 
| 70 | 
greg | 
2.14 | 
mksource:       mksource.o | 
| 71 | 
  | 
  | 
        $(CC) $(CFLAGS) -o mksource mksource.o \ | 
| 72 | 
schorsch | 
2.15 | 
-lraycalls -lradiance -lrtrad $(MLIB) | 
| 73 | 
greg | 
2.14 | 
 | 
| 74 | 
greg | 
2.43 | 
genrev: genrev.o | 
| 75 | 
schorsch | 
2.15 | 
        $(CC) $(CFLAGS) -o genrev genrev.o -lrtrad $(MLIB) | 
| 76 | 
greg | 
2.7 | 
 | 
| 77 | 
greg | 
2.11 | 
gencatenary: gencat.o | 
| 78 | 
schorsch | 
2.15 | 
        $(CC) $(CFLAGS) -o gencatenary gencat.o -lrtrad $(MLIB) | 
| 79 | 
greg | 
1.1 | 
 | 
| 80 | 
greg | 
1.16 | 
genworm:        genworm.o | 
| 81 | 
schorsch | 
2.15 | 
        $(CC) $(CFLAGS) -o genworm genworm.o -lrtrad $(MLIB) | 
| 82 | 
greg | 
1.1 | 
 | 
| 83 | 
greg | 
1.16 | 
gensurf:        gensurf.o | 
| 84 | 
schorsch | 
2.15 | 
        $(CC) $(CFLAGS) -o gensurf gensurf.o -lrtrad $(MLIB) | 
| 85 | 
greg | 
2.5 | 
 | 
| 86 | 
  | 
  | 
genclock:       genclock.o | 
| 87 | 
  | 
  | 
        $(CC) $(CFLAGS) -o genclock genclock.o $(MLIB) | 
| 88 | 
greg | 
1.1 | 
 | 
| 89 | 
  | 
  | 
genbranch:      genbranch.o | 
| 90 | 
greg | 
2.4 | 
        $(CC) $(CFLAGS) -o genbranch genbranch.o $(MLIB) | 
| 91 | 
greg | 
1.1 | 
 | 
| 92 | 
greg | 
2.43 | 
 | 
| 93 | 
  | 
  | 
# Assume rt is built before this | 
| 94 | 
greg | 
2.44 | 
genssky:        genssky.o sun.o atmos.o | 
| 95 | 
  | 
  | 
        $(CC) $(CFLAGS) -o genssky genssky.o sun.o atmos.o -lrtrad $(MLIB) | 
| 96 | 
  | 
  | 
 | 
| 97 | 
  | 
  | 
gensdaymtx:     gensdaymtx.o sun.o atmos.o | 
| 98 | 
  | 
  | 
        $(CC) $(CFLAGS) -o gensdaymtx gensdaymtx.o sun.o atmos.o -lrtrad $(MLIB) | 
| 99 | 
  | 
  | 
 | 
| 100 | 
greg | 
2.43 | 
 | 
| 101 | 
greg | 
2.16 | 
mksource.o:     ../common/random.h ../rt/ray.h ../common/octree.h \ | 
| 102 | 
greg | 
2.14 | 
../common/object.h ../common/color.h \ | 
| 103 | 
  | 
  | 
../common/standard.h ../common/rtmisc.h ../common/rtio.h \ | 
| 104 | 
  | 
  | 
../common/rtmath.h ../common/mat4.h ../common/fvect.h \ | 
| 105 | 
greg | 
2.22 | 
../common/rterror.h | 
| 106 | 
greg | 
2.14 | 
 | 
| 107 | 
greg | 
2.8 | 
genworm.o replmarks.o:  ../common/fvect.h | 
| 108 | 
greg | 
1.1 | 
 | 
| 109 | 
greg | 
2.8 | 
gensurf.o xform.o:      ../common/standard.h \ | 
| 110 | 
  | 
  | 
../common/rtmisc.h ../common/rtio.h \ | 
| 111 | 
  | 
  | 
../common/rtmath.h ../common/rterror.h \ | 
| 112 | 
greg | 
2.22 | 
../common/mat4.h ../common/fvect.h | 
| 113 | 
greg | 
2.12 | 
 | 
| 114 | 
greg | 
2.39 | 
genbox.o:       ../common/fvect.h ../common/objutil.h ../common/rtio.h | 
| 115 | 
  | 
  | 
 | 
| 116 | 
greg | 
2.12 | 
genworm.o genrev.o gensurf.o:   ../common/resolu.h ../common/rterror.h | 
| 117 | 
greg | 
1.1 | 
 | 
| 118 | 
greg | 
2.8 | 
xform.o:        ../common/otypes.h ../common/object.h | 
| 119 | 
greg | 
1.17 | 
 | 
| 120 | 
greg | 
2.29 | 
mkillum.o mkillum2.o mkillum3.o:        mkillum.h \ | 
| 121 | 
greg | 
2.18 | 
../common/otypes.h ../rt/ray.h ../common/octree.h \ | 
| 122 | 
greg | 
2.16 | 
../common/object.h ../common/color.h \ | 
| 123 | 
  | 
  | 
../common/standard.h ../common/rtmisc.h ../common/rtio.h \ | 
| 124 | 
  | 
  | 
../common/rtmath.h ../common/mat4.h ../common/fvect.h \ | 
| 125 | 
greg | 
2.22 | 
../common/rterror.h ../common/random.h | 
| 126 | 
greg | 
2.20 | 
 | 
| 127 | 
  | 
  | 
mkillum2.o:     ../rt/source.h ../common/face.h ../common/cone.h | 
| 128 | 
  | 
  | 
 | 
| 129 | 
greg | 
2.27 | 
mkillum2.o mkillum3.o:  ../common/paths.h | 
| 130 | 
greg | 
2.18 | 
 | 
| 131 | 
greg | 
1.21 | 
gensky.o:       ../common/color.h | 
| 132 | 
greg | 
2.9 | 
 | 
| 133 | 
greg | 
2.12 | 
gensurf.o genworm.o genrev.o:   ../common/calcomp.h | 
| 134 | 
greg | 
2.32 | 
 | 
| 135 | 
greg | 
2.35 | 
gendaylit.o gensky.o sun.o:     sun.h | 
| 136 | 
greg | 
2.34 | 
 | 
| 137 | 
  | 
  | 
gendaymtx.o:    ../common/platform.h ../common/rtmath.h \ | 
| 138 | 
  | 
  | 
../common/mat4.h ../common/fvect.h ../common/color.h | 
| 139 | 
greg | 
2.43 | 
 | 
| 140 | 
greg | 
2.44 | 
genssky.o: ../common/rtio.h ../common/rtmath.h \ | 
| 141 | 
  | 
  | 
../common/paths.h ../common/color.h | 
| 142 | 
greg | 
2.43 | 
 | 
| 143 | 
greg | 
2.45 | 
genssky.o gensdaymtx.o: atmos.h | 
| 144 | 
  | 
  | 
 | 
| 145 | 
greg | 
2.44 | 
atmos.o: ../common/rtio.h ../common/rtmath.h ../common/color.h \ | 
| 146 | 
  | 
  | 
../common/data.h sun.h |