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.24 by greg, Thu Mar 29 13:32:31 1990 UTC vs.
Revision 2.26 by gregl, Fri Nov 14 12:35:45 1997 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines