ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/Rmakefile
(Generate patch)

Comparing ray/src/rt/Rmakefile (file contents):
Revision 1.16 by greg, Fri Jan 12 11:27:22 1990 UTC vs.
Revision 2.46 by greg, Thu Oct 21 21:44:59 2004 UTC

# Line 1 | Line 1
1 < # SCCSid "$SunId$ LBL"
2 <
1 > # RCSid: $Id$
2   #
3 < #  Compiles for ray tracing programs.
3 > # Compiles for ray tracing programs.
4   #
5  
6   OPT = -O
7 < MACH = -DBSD -DIEEE -f68881 /usr/lib/f68881.il
8 < CFLAGS = $(MACH) $(OPT)
7 > MACH = -DBSD
8 > CFLAGS = -I../common -L../lib $(OPT) $(MACH)
9 > SPECIAL = aed
10 > CC = cc
11 > MLIB = -lm
12 > LINT = lint
13 > LINTFLAGS = -DBSD
14  
15   #
16   # The following are user-definable:
17   #
18   DESTDIR = .
19 < INSTDIR = /usr/local/ray
19 > INSTDIR = /usr/local/bin
20   INSTALL = cp
21  
22   #
23   # The following paths must exist and be relative to root:
24   #
25 < DEVDIR = $(INSTDIR)
25 > DEVDIR = $(INSTDIR)/dev
26   LIBDIR = /usr/local/lib/ray
27  
28   #
29   # Library routines:
30   #
31 < LIBS = -lm
32 < COMPAT = malloc.o
31 > RLIB = ../lib/libradiance.a
32 > RCLIB = ../lib/libraycalls.a
33 > LIBS = -lrt $(MLIB)
34  
35   #
36 < # Device drivers for rview (see also devtable.c):
36 > # Device drivers for rvu (see also devtable.c):
37   #
38 < DOBJS = devtable.o devcomm.o aed.o tty.o editline.o x10.o xtwind.o \
38 > DOBJS = devtable.o devcomm.o editline.o x11.o x11twind.o \
39          colortab.o
40 < DLIBS = -lX
41 < DRIVERS = $(DEVDIR)/sundev $(DEVDIR)/sun.com # $(DEVDIR)/X11dev
40 > DSRC = devtable.c devcomm.c editline.c x11.c x11twind.c \
41 >        colortab.c
42 > DLIBS = -lX11
43  
44   #
45   # Standard object files:
46   #
47  
48 < RTOBJS = rtmain.o rtrace.o $(ROBJS)
48 > RTOBJS = rtmain.o rtrace.o duphead.o persist.o
49 > RTSRC = rtmain.c rtrace.c duphead.c persist.c
50  
51 < RPOBJS = rpmain.o rpict.o image.o $(ROBJS)
51 > RPOBJS = rpmain.o rpict.o srcdraw.o duphead.o persist.o
52 > RPSRC = rpmain.c rpict.c srcdraw.c duphead.c persist.c
53  
54 < RVOBJS = rvmain.o rview.o rv2.o rv3.o image.o $(DOBJS) $(ROBJS)
54 > RVOBJS = rvmain.o rview.o rv2.o rv3.o $(DOBJS)
55 > RVSRC = rvmain.c rview.c rv2.c rv3.c $(DSRC)
56  
57 < ROBJS = $(OCTOBJS) $(RAYOBJS) $(SURFOBJS) $(MATOBJS) \
58 <        $(MODOBJS) $(SUPPOBJS) $(MISCOBJS) $(COMPAT)
57 > RLOBJS = raycalls.o raypcalls.o
58 > RLSRC = raycalls.c raypcalls.c
59  
60 < OCTOBJS = octree.o readobj.o readoct.o objset.o otypes.o
60 > ROBJS = $(RAYOBJS) $(SURFOBJS) $(MATOBJS) \
61 >        $(MODOBJS) $(SUPPOBJS)
62 > RSRC = $(RAYSRC) $(SURFSRC) $(MATSRC) \
63 >        $(MODSRC) $(SUPPSRC)
64  
65 < RAYOBJS = raytrace.o ambient.o
65 > RAYOBJS = ambcomp.o ambient.o ambio.o freeobjmem.o initotypes.o \
66 >        preload.o raytrace.o renderopts.o
67 > RAYSRC = ambcomp.c ambient.c ambio.c freeobjmem.c initotypes.c \
68 >        preload.c raytrace.c renderopts.c
69  
70 < SURFOBJS = face.o sphere.o source.o o_face.o cone.o \
71 <                o_cone.o o_instance.o instance.o
70 > SURFOBJS = source.o sphere.o srcobstr.o srcsupp.o srcsamp.o virtuals.o \
71 >        o_face.o o_cone.o o_instance.o o_mesh.o
72 > SURFSRC = sphere.c source.c srcobstr.c srcsupp.c srcsamp.c virtuals.c \
73 >        o_face.c srcsamp.c o_cone.c o_instance.c o_mesh.c
74  
75 < MATOBJS = normal.o dielectric.o m_clip.o glass.o
75 > MATOBJS = aniso.o normal.o dielectric.o m_clip.o glass.o m_brdf.o \
76 >        m_mirror.o m_direct.o m_mist.o fprism.o m_alias.o
77 > MATSRC = aniso.c normal.c dielectric.c m_clip.c glass.c m_brdf.c \
78 >        m_mirror.c m_direct.c m_mist.c fprism.c m_alias.c
79  
80   MODOBJS = p_func.o t_func.o p_data.o t_data.o text.o mx_func.o mx_data.o
81 + MODSRC = p_func.c t_func.c p_data.c t_data.c text.c mx_func.c mx_data.c
82  
83 < SUPPOBJS = zeroes.o calexpr.o caldefn.o calfunc.o func.o noise3.o data.o
83 > SUPPOBJS = func.o noise3.o data.o
84 > SUPPSRC = func.c noise3.c data.c
85  
86 < MISCOBJS = misc.o color.o header.o mat4.o xf.o fvect.o savestr.o \
65 <                fgetline.o ealloc.o
86 > HEADERS = ambient.h ray.h data.h otspecial.h source.h
87  
88   #
89   # What this makefile produces:
90   #
91  
92 < PROGS = $(DESTDIR)/rtrace $(DESTDIR)/rpict $(DESTDIR)/rview $(DESTDIR)/lookamb
92 > PROGS = $(DESTDIR)/rtrace $(DESTDIR)/rpict $(DESTDIR)/rvu $(DESTDIR)/lookamb
93  
94 < all:    $(PROGS) $(DRIVERS)
94 > all:    $(PROGS) $(RCLIB) $(SPECIAL)
95  
96 < install:        all
96 > install:        all rayinit.cal
97          $(INSTALL) $(PROGS) $(INSTDIR)
98 +        cd $(INSTDIR) ; rm -f rview ; ln -s rvu rview
99 +        rm -f $(LIBDIR)/rayinit.cal
100 +        cp rayinit.cal $(LIBDIR)
101  
102 + aed:    $(DEVDIR)/aed
103 +
104 + ogl:    
105 +
106   clean:
107 <        rm -f *.o core
107 >        set nonomatch; rm -f $(PROGS) *.o core
108  
109 + lint:   $(RVSRC)
110 +        $(LINT) $(LINTFLAGS) -DRVIEW $(RVSRC) $(LIBS)
111 +
112   #
113   # Links:
114   #
115  
116 < $(DESTDIR)/rtrace:      $(RTOBJS)
117 <        cc $(CFLAGS) -o $(DESTDIR)/rtrace $(RTOBJS) $(LIBS)
116 > $(DESTDIR)/rtrace:      $(RTOBJS) $(RLIB)
117 >        $(CC) $(CFLAGS) -o $(DESTDIR)/rtrace $(RTOBJS) $(RLIB) $(LIBS)
118  
119 < $(DESTDIR)/rpict:       $(RPOBJS)
120 <        cc $(CFLAGS) -o $(DESTDIR)/rpict $(RPOBJS) $(LIBS)
119 > $(DESTDIR)/rpict:       $(RPOBJS) $(RLIB)
120 >        $(CC) $(CFLAGS) -o $(DESTDIR)/rpict $(RPOBJS) $(RLIB) $(LIBS)
121  
122 < $(DESTDIR)/rview:       $(RVOBJS)
123 <        cc $(CFLAGS) -o $(DESTDIR)/rview $(RVOBJS) $(DLIBS) $(LIBS)
122 > $(DESTDIR)/rvu: $(RVOBJS) $(RLIB)
123 >        $(CC) $(CFLAGS) -o $(DESTDIR)/rvu $(RVOBJS) $(RLIB) $(LIBS) $(DLIBS)
124  
125 < $(DESTDIR)/lookamb:     lookamb.o
126 <        cc $(CFLAGS) -o $(DESTDIR)/lookamb lookamb.o
125 > $(DESTDIR)/lookamb:     lookamb.o ambio.o
126 >        $(CC) $(CFLAGS) -o $(DESTDIR)/lookamb lookamb.o ambio.o $(LIBS)
127  
128 < $(DEVDIR)/sundev:       sundev.o devmain.o colortab.o
129 <        cc $(CFLAGS) -o $(DEVDIR)/sundev devmain.o sundev.o colortab.o \
130 < -lsuntool -lsunwindow -lpixrect $(LIBS)
128 > $(DEVDIR)/aed:  aed.o colortab.o tty.o devmain.o editline.o
129 >        $(CC) $(CFLAGS) -s -o $(DEVDIR)/aed aed.o colortab.o \
130 > devmain.o tty.o editline.o $(LIBS)
131  
132 < $(DEVDIR)/sun.com:      suncom.o editline.o
133 <        cc $(CFLAGS) -o $(DEVDIR)/sun.com suncom.o editline.o
132 > $(RLIB):        $(ROBJS) Version.o
133 >        ar rc $(RLIB) $(ROBJS) Version.o
134 >        -ranlib $(RLIB)
135  
136 < $(DEVDIR)/X11dev:       x11.o x11twind.o colortab.o
137 <        cc $(CFLAGS) -o $(DEVDIR)/x11dev devmain.o sundev.o colortab.o \
138 < -lX11 $(LIBS)
136 > $(RCLIB):       $(RLOBJS)
137 >        ar rc $(RCLIB) $(RLOBJS)
138 >        -ranlib $(RCLIB)
139  
140   #
141   # Special compiles:
142   #
143  
144 < rtmain.o:       rmain.c
145 <        cc $(CFLAGS) -DRTRACE -DNICE=4 -DDEFPATH=\":$(LIBDIR)\" -c rmain.c
114 <        mv rmain.o rtmain.o
144 > rtmain.o:       rtmain.c
145 >        $(CC) $(CFLAGS) -DNICE=4 -c rtmain.c
146  
147 < rpmain.o:       rmain.c
148 <        cc $(CFLAGS) -DRPICT -DNICE=6 -DDEFPATH=\":$(LIBDIR)\" -c rmain.c
118 <        mv rmain.o rpmain.o
147 > rpmain.o:       rpmain.c
148 >        $(CC) $(CFLAGS) -DNICE=6 -c rpmain.c
149  
150 < rvmain.o:       rmain.c
151 <        cc $(CFLAGS) -DRVIEW -DDEFPATH=\":$(LIBDIR)\" -c rmain.c
122 <        mv rmain.o rvmain.o
150 > rvmain.o:       rvmain.c
151 >        $(CC) $(CFLAGS) -c rvmain.c
152  
153   #
154   # Uncomment the following to model dispersion:
155   #
156 < #dielectric.o:  dielectric.c source.h
157 < #       cc $(CFLAGS) -DDISPERSE -c dielectric.c
158 < #
130 < #color.o:       color.c color.h
131 < #       cc $(CFLAGS) -DSPEC_RGB -c color.c
132 < #
156 > dielectric.o:   dielectric.c source.h
157 >        $(CC) $(CFLAGS) -DDISPERSE -c dielectric.c
158 >
159   # end of dispersion compiles.
160  
135 sundev.o:       sundev.c
136        cc $(CFLAGS) -c sundev.c
137
161   devcomm.o:      devcomm.c
162 <        cc $(CFLAGS) -c devcomm.c
162 >        $(CC) $(CFLAGS) -DDEVPATH=\"$(DEVDIR)\" -c devcomm.c
163  
164 < ambient.o:      ambient.c
165 <        cc $(CFLAGS) -DAMBFLUSH=16 -c ambient.c
164 > aed.o:  aed.c
165 >        $(CC) $(CFLAGS) -Daed_init=dinit -c aed.c
166  
167 < calexpr.o:      calexpr.c calcomp.h
168 <        cc $(CFLAGS) -DVARIABLE -DFUNCTION -DINCHAN -DRCONST -c calexpr.c
167 > #
168 > # Version module:
169 > #
170  
171 < caldefn.o:      caldefn.c calcomp.h
172 <        cc $(CFLAGS) -DFUNCTION -c caldefn.c
171 > Version.c:      VERSION $(RSRC) $(HEADERS)
172 >        ( cat VERSION ; date ; whoami ; hostname ) > Version.c
173 >        ed - Version.c < verscript.ed
174  
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
175   #
176   # Include dependencies:
177   #
178  
179 < caldefn.o calexpr.o calfunc.o:  calcomp.h
179 > aed.o ambio.o colortab.o data.o devcomm.o \
180 > devmain.o lookamb.o rview.o x11.o:      ../common/color.h
181  
182 < aed.o color.o colortab.o data.o devcomm.o \
163 < lookamb.o rview.o sundev.o x10.o:       color.h
182 > freeobjmem.o o_cone.o srcsupp.o:        ../common/cone.h
183  
184 < cone.o o_cone.o source.o:       cone.h
184 > data.o freeobjmem.o m_brdf.o mx_data.o \
185 > p_data.o raycalls.o t_data.o:   data.h
186  
187 < data.o mx_data.o p_data.o t_data.o:     data.h
187 > aed.o devcomm.o devmain.o devtable.o \
188 > editline.o tty.o x11.o: driver.h
189  
190 < aed.o devcomm.o devtable.o sundev.o tty.o x10.o:        driver.h
190 > freeobjmem.o o_face.o srcsupp.o:        ../common/face.h
191  
192 < face.o o_face.o source.o:       face.h
192 > ambient.o raytrace.o rpmain.o rtmain.o \
193 > rtrace.o rvmain.o rv2.o rv3.o:  ../common/octree.h
194  
195 < fvect.o:        fvect.h
195 > o_instance.o:   ../common/instance.h
196  
197 < cone.o face.o objset.o otypes.o readobj.o readoct.o:    object.h
197 > ambient.o aniso.o dielectric.o freeobjmem.o func.o glass.o initotypes.o \
198 > m_brdf.o m_direct.o m_mirror.o normal.o o_cone.o preload.o \
199 > raycalls.o raytrace.o rtrace.o rv2.o source.o sphere.o srcsupp.o text.o \
200 > srcobstr.o virtuals.o:  ../common/otypes.h
201  
202 < ambient.o objset.o octree.o raytrace.o \
203 < readoct.o rmain.o rv2.o rv3.o source.o: octree.h
202 > ambient.o ambcomp.o aniso.o normal.o raycalls.o rpict.o rvmain.o \
203 > rtmain.o rpmain.o persist.o source.o rv3.o \
204 > srcsamp.o virtuals.o:   ../common/random.h
205  
206 < o_instance.o instance.o:        instance.h octree.h
206 > ambcomp.o ambient.o aniso.o dielectric.o freeobjmem.o func.o glass.o \
207 > m_brdf.o m_clip.o m_direct.o m_mirror.o m_mist.o mx_data.o o_mesh.o \
208 > mx_func.o normal.o o_cone.o o_face.o o_instance.o p_data.o p_func.o \
209 > raycalls.o raypcalls.o raytrace.o rpict.o rtrace.o rv2.o rv3.o rview.o \
210 > source.o sphere.o srcdraw.o srcobstr.o srcsamp.o srcsupp.o t_data.o t_func.o \
211 > text.o rpmain.o rtmain.o rvmain.o virtuals.o m_alias.o: ray.h \
212 > ../common/standard.h ../common/rtmisc.h ../common/rtio.h ../common/rtmath.h \
213 > ../common/rterror.h ../common/octree.h \
214 > ../common/mat4.h ../common/fvect.h ../common/object.h ../common/color.h
215  
216 < ambient.o cone.o dielectric.o func.o normal.o o_cone.o otypes.o \
183 < text.o raytrace.o readobj.o readoct.o rtrace.o \
184 < rv2.o source.o sphere.o:        otypes.h
216 > rv2.o rv3.o rview.o:    rpaint.h driver.h ../common/view.h ../common/resolu.h
217  
218 < ambient.o rpict.o rv3.o source.o:       random.h
218 > m_direct.o m_mirror.o m_mist.o dielectric.o raycalls.o \
219 > rpict.o rpmain.o rtmain.o rvmain.o source.o srcdraw.o \
220 > srcobstr.o srcsamp.o srcsupp.o virtuals.o:      source.h
221  
222 < ambient.o dielectric.o func.o glass.o m_clip.o \
223 < mx_data.o mx_func.o normal.o o_cone.o o_face.o o_instance.o \
224 < p_data.o p_func.o text.o raytrace.o rmain.o rpict.o \
225 < rtrace.o rv2.o rv3.o source.o \
192 < sphere.o t_data.o t_func.o:     ray.h standard.h fvect.h object.h color.h
222 > cone.o data.o devcomm.o initotypes.o fprism.o preload.o \
223 > duphead.o octree.o:     ../common/standard.h ../common/rtmisc.h \
224 > ../common/rtio.h ../common/rtmath.h \
225 > ../common/rterror.h ../common/mat4.h ../common/fvect.h
226  
227 < rv2.o rv3.o rview.o:    rpaint.h driver.h view.h
227 > ambio.o:        ../common/fvect.h
228  
229 < source.o:       source.h
229 > initotypes.o srcobstr.o raytrace.o:     otspecial.h
230  
231 < cone.o data.o face.o image.o misc.o objset.o octree.o otypes.o \
232 < readobj.o readoct.o rview.o:    standard.h fvect.h
231 > rpmain.o rtmain.o rvmain.o rpict.o \
232 > srcdraw.o:      ../common/view.h ../common/resolu.h
233  
234 < sundev.o:       suntools.icon
234 > x11.o x11twind.o: x11twind.h
235  
236 < image.o rmain.o rpict.o:        view.h
236 > x11.o:  x11icon.h
237  
238 < x10.o xtwind.o: xtwind.h
238 > ambient.o ambcomp.o ambio.o lookamb.o raycalls.o:       ambient.h
239  
240 < x11.o x11twind.o: x11twind.h
240 > data.o rpmain.o rtmain.o rvmain.o rpict.o rtrace.o \
241 > rv2.o:  ../common/resolu.h
242 >
243 > aniso.o func.o m_brdf.o m_direct.o mx_data.o mx_func.o p_data.o \
244 > p_func.o t_data.o t_func.o:     func.h ../common/calcomp.h
245 >
246 > preload.o:      ../common/object.h ../common/face.h ../common/cone.h \
247 > ../common/instance.h ../common/mesh.h ../common/color.h data.h
248 >
249 > rtmain.o rpmain.o rvmain.o persist.o duphead.o \
250 > renderopts.o rpict.o:   ../common/paths.h
251 >
252 > freeobjmem.o raycalls.o text.o: ../common/font.h
253 >
254 > raypcalls.o:    ../common/selcall.h
255 >
256 > o_mesh.o:       ../common/mesh.h
257 >
258 > noise3.o:       ../common/calcomp.h

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines