1 |
– |
# SCCSid "$SunId$ LBL" |
2 |
– |
|
1 |
|
# |
2 |
+ |
# SCCSid "$SunId$ LBL" |
3 |
|
# Compiles for ray tracing programs. |
4 |
|
# |
5 |
|
|
6 |
|
OPT = -O -pipe |
7 |
|
MACH = -DSTRUCTASSIGN -DBSD -DIEEE -f68881 /usr/lib/libm.il |
8 |
< |
CFLAGS = $(MACH) $(OPT) |
8 |
> |
CFLAGS = $(MACH) $(OPT) -I../common |
9 |
|
CC = cc |
10 |
|
LINT = lint |
11 |
|
LINTFLAGS = -DSTRUCTASSIGN -DBSD -DIEEE -DVARIABLE -DFUNCTION \ |
12 |
< |
-DINCHAN -DRCONST -DREDEFW -DBIGLIB -DINVXF |
12 |
> |
-DINCHAN -DRCONST -DREDEFW -DBIGLIB |
13 |
|
|
14 |
|
# |
15 |
|
# The following are user-definable: |
27 |
|
# |
28 |
|
# Library routines: |
29 |
|
# |
30 |
< |
LIBS = -lm |
32 |
< |
COMPAT = malloc.o |
30 |
> |
LIBS = ../common/librt.a -lm |
31 |
|
|
32 |
|
# |
33 |
|
# Device drivers for rview (see also devtable.c): |
34 |
|
# |
35 |
|
DOBJS = devtable.o devcomm.o editline.o x11.o x11twind.o \ |
36 |
|
colortab.o |
37 |
< |
DSRC = devtable.c devcomm.c editline.c x10.c xtwind.c \ |
37 |
> |
DSRC = devtable.c devcomm.c editline.c x11.c x11twind.c \ |
38 |
|
colortab.c |
39 |
|
DLIBS = -lX11 |
40 |
|
|
45 |
|
RTOBJS = rtmain.o rtrace.o $(ROBJS) |
46 |
|
RTSRC = rmain.c rtrace.c $(RSRC) |
47 |
|
|
48 |
< |
RPOBJS = rpmain.o rpict.o image.o $(ROBJS) |
49 |
< |
RPSRC = rmain.c rpict.c image.c $(RSRC) |
48 |
> |
RPOBJS = rpmain.o rpict.o $(ROBJS) |
49 |
> |
RPSRC = rmain.c rpict.c $(RSRC) |
50 |
|
|
51 |
< |
RVOBJS = rvmain.o rview.o rv2.o rv3.o image.o $(DOBJS) $(ROBJS) |
52 |
< |
RVSRC = rmain.c rview.c rv2.c rv3.c image.c $(DSRC) $(RSRC) |
51 |
> |
RVOBJS = rvmain.o rview.o rv2.o rv3.o $(DOBJS) $(ROBJS) |
52 |
> |
RVSRC = rmain.c rview.c rv2.c rv3.c $(DSRC) $(RSRC) |
53 |
|
|
54 |
< |
ROBJS = $(OCTOBJS) $(RAYOBJS) $(SURFOBJS) $(MATOBJS) \ |
55 |
< |
$(MODOBJS) $(SUPPOBJS) $(MISCOBJS) $(COMPAT) |
56 |
< |
RSRC = $(OCTSRC) $(RAYSRC) $(SURFSRC) $(MATSRC) \ |
57 |
< |
$(MODSRC) $(SUPPSRC) $(MISCSRC) |
54 |
> |
ROBJS = $(RAYOBJS) $(SURFOBJS) $(MATOBJS) \ |
55 |
> |
$(MODOBJS) $(SUPPOBJS) |
56 |
> |
RSRC = $(RAYSRC) $(SURFSRC) $(MATSRC) \ |
57 |
> |
$(MODSRC) $(SUPPSRC) |
58 |
|
|
59 |
< |
OCTOBJS = octree.o readobj.o readoct.o objset.o otypes.o initotypes.o |
60 |
< |
OCTSRC = octree.c readobj.c readoct.c objset.c otypes.c initotypes.c |
59 |
> |
RAYOBJS = initotypes.o raytrace.o ambient.o ambcomp.o |
60 |
> |
RAYSRC = initotypes.c raytrace.c ambient.c ambcomp.c |
61 |
|
|
62 |
< |
RAYOBJS = raytrace.o ambient.o |
63 |
< |
RAYSRC = raytrace.c ambient.c |
62 |
> |
SURFOBJS = source.o sphere.o srcsupp.o virtuals.o o_face.o o_cone.o \ |
63 |
> |
o_instance.o |
64 |
> |
SURFSRC = sphere.c source.c srcsupp.c virtuals.c o_face.c \ |
65 |
> |
o_cone.c o_instance.c |
66 |
|
|
67 |
< |
SURFOBJS = face.o sphere.o source.o o_face.o cone.o \ |
68 |
< |
o_cone.o o_instance.o instance.o |
69 |
< |
SURFSRC = face.c sphere.c source.c o_face.c cone.c \ |
70 |
< |
o_cone.c o_instance.c instance.c |
67 |
> |
MATOBJS = normal.o dielectric.o m_clip.o glass.o m_brdf.o m_mirror.o \ |
68 |
> |
m_direct.o |
69 |
> |
MATSRC = normal.c dielectric.c m_clip.c glass.c m_brdf.c m_mirror.c \ |
70 |
> |
m_direct.c |
71 |
|
|
72 |
– |
MATOBJS = normal.o dielectric.o m_clip.o glass.o m_brdf.o |
73 |
– |
MATSRC = normal.c dielectric.c m_clip.c glass.c m_brdf.c |
74 |
– |
|
72 |
|
MODOBJS = p_func.o t_func.o p_data.o t_data.o text.o mx_func.o mx_data.o |
73 |
|
MODSRC = p_func.c t_func.c p_data.c t_data.c text.c mx_func.c mx_data.c |
74 |
|
|
75 |
< |
SUPPOBJS = zeroes.o calexpr.o caldefn.o calfunc.o func.o noise3.o data.o |
76 |
< |
SUPPSRC = zeroes.c calexpr.c caldefn.c calfunc.c func.c noise3.c data.c |
75 |
> |
SUPPOBJS = zeroes.o calexpr.o caldefn.o func.o noise3.o data.o readfargs.o |
76 |
> |
SUPPSRC = zeroes.c calexpr.c caldefn.c func.c noise3.c data.c readfargs.c |
77 |
|
|
81 |
– |
MISCOBJS = misc.o header.o mat4.o xf.o fvect.o savestr.o fgetline.o ealloc.o \ |
82 |
– |
color.o resolu.o |
83 |
– |
MISCSRC = misc.c header.c mat4.c xf.c fvect.c savestr.c fgetline.c ealloc.c \ |
84 |
– |
color.c resolu.c |
85 |
– |
|
78 |
|
# |
79 |
|
# What this makefile produces: |
80 |
|
# |
102 |
|
# Links: |
103 |
|
# |
104 |
|
|
105 |
< |
$(DESTDIR)/rtrace: $(RTOBJS) |
105 |
> |
$(DESTDIR)/rtrace: $(RTOBJS) ../common/librt.a |
106 |
|
$(CC) $(CFLAGS) -o $(DESTDIR)/rtrace $(RTOBJS) $(LIBS) |
107 |
|
|
108 |
< |
$(DESTDIR)/rpict: $(RPOBJS) |
108 |
> |
$(DESTDIR)/rpict: $(RPOBJS) ../common/librt.a |
109 |
|
$(CC) $(CFLAGS) -o $(DESTDIR)/rpict $(RPOBJS) $(LIBS) |
110 |
|
|
111 |
< |
$(DESTDIR)/rview: $(RVOBJS) |
111 |
> |
$(DESTDIR)/rview: $(RVOBJS) ../common/librt.a |
112 |
|
$(CC) $(CFLAGS) -o $(DESTDIR)/rview $(RVOBJS) $(DLIBS) $(LIBS) |
113 |
|
|
114 |
|
$(DESTDIR)/lookamb: lookamb.o |
145 |
|
$(CC) $(CFLAGS) -DRVIEW -DDEFPATH=\":$(LIBDIR)\" -c rmain.c |
146 |
|
mv rmain.o rvmain.o |
147 |
|
|
148 |
+ |
readfargs.o: readfargs.c ../common/object.h |
149 |
+ |
$(CC) $(CFLAGS) -DMEMHOG -c readfargs.c |
150 |
+ |
|
151 |
|
# |
152 |
< |
# Uncomment the following and add spec_rgb.o to MISCOBJS to model dispersion: |
152 |
> |
# Uncomment the following to model dispersion: |
153 |
|
# |
154 |
< |
#dielectric.o: dielectric.c source.h |
155 |
< |
# $(CC) $(CFLAGS) -DDISPERSE -c dielectric.c |
156 |
< |
# |
154 |
> |
dielectric.o: dielectric.c source.h |
155 |
> |
$(CC) $(CFLAGS) -DDISPERSE -c dielectric.c |
156 |
> |
|
157 |
|
# end of dispersion compiles. |
158 |
|
|
159 |
|
devcomm.o: devcomm.c |
171 |
|
ambient.o: ambient.c |
172 |
|
$(CC) $(CFLAGS) -DAMBFLUSH=16 -c ambient.c |
173 |
|
|
174 |
< |
calexpr.o: calexpr.c calcomp.h |
174 |
> |
calexpr.o: calexpr.c ../common/calcomp.h |
175 |
|
$(CC) $(CFLAGS) -DVARIABLE -DFUNCTION -DINCHAN -DRCONST -c calexpr.c |
176 |
|
|
177 |
< |
caldefn.o: caldefn.c calcomp.h |
177 |
> |
caldefn.o: caldefn.c ../common/calcomp.h |
178 |
|
$(CC) $(CFLAGS) -DFUNCTION -DREDEFW -c caldefn.c |
179 |
|
|
185 |
– |
calfunc.o: calfunc.c calcomp.h |
186 |
– |
$(CC) $(CFLAGS) -DVARIABLE -DBIGLIB -c calfunc.c |
187 |
– |
|
188 |
– |
xf.o: xf.c |
189 |
– |
$(CC) $(CFLAGS) -DINVXF -c xf.c |
190 |
– |
|
180 |
|
nwsdev.o: nwsdev.c nwsdev.h newsconstants.h |
181 |
|
$(CC) $(CFLAGS) -c nwsdev.c |
182 |
|
|
187 |
|
# Include dependencies: |
188 |
|
# |
189 |
|
|
190 |
< |
caldefn.o calexpr.o calfunc.o: calcomp.h |
190 |
> |
aed.o colortab.o data.o devcomm.o \ |
191 |
> |
devmain.o lookamb.o rview.o sundev.o x10.o x11.o: ../common/color.h |
192 |
|
|
193 |
< |
aed.o color.o colortab.o data.o devcomm.o spec_rgb.o \ |
204 |
< |
devmain.o lookamb.o resolu.o rview.o sundev.o x10.o x11.o: color.h |
193 |
> |
o_cone.o srcsupp.o: ../common/cone.h |
194 |
|
|
206 |
– |
cone.o o_cone.o source.o: cone.h |
207 |
– |
|
195 |
|
data.o m_brdf.o mx_data.o p_data.o t_data.o: data.h |
196 |
|
|
197 |
|
aed.o devcomm.o devmain.o devtable.o \ |
198 |
|
editline.o nwsdev.o sundev.o tty.o x10.o x11.o: driver.h |
199 |
|
|
200 |
< |
face.o o_face.o source.o: face.h |
200 |
> |
o_face.o srcsupp.o: ../common/face.h |
201 |
|
|
202 |
< |
fvect.o: fvect.h |
202 |
> |
ambient.o raytrace.o rpmain.o rtmain.o \ |
203 |
> |
rtrace.o rvmain.o rv2.o rv3.o source.o: ../common/octree.h |
204 |
|
|
205 |
< |
cone.o face.o objset.o otypes.o readobj.o readoct.o: object.h |
205 |
> |
o_instance.o: ../common/instance.h ../common/octree.h |
206 |
|
|
207 |
< |
ambient.o objset.o octree.o raytrace.o readoct.o \ |
208 |
< |
rpmain.o rtmain.o rtrace.o rvmain.o rv2.o rv3.o source.o: octree.h |
207 |
> |
ambient.o dielectric.o func.o initotypes.o m_brdf.o \ |
208 |
> |
normal.o o_cone.o text.o raytrace.o rtrace.o \ |
209 |
> |
rv2.o source.o srcsupp.o virtuals.o sphere.o: ../common/otypes.h |
210 |
|
|
211 |
< |
o_instance.o instance.o: instance.h octree.h |
211 |
> |
ambient.o ambcomp.o rpict.o rv3.o source.o: ../common/random.h |
212 |
|
|
213 |
< |
ambient.o cone.o dielectric.o func.o initotypes.o m_brdf.o normal.o o_cone.o \ |
225 |
< |
objset.o otypes.o text.o raytrace.o readobj.o readoct.o rtrace.o \ |
226 |
< |
rv2.o source.o sphere.o: otypes.h |
227 |
< |
|
228 |
< |
ambient.o rpict.o rv3.o source.o: random.h |
229 |
< |
|
230 |
< |
ambient.o dielectric.o func.o glass.o m_clip.o \ |
213 |
> |
ambient.o ambcomp.o dielectric.o func.o glass.o m_clip.o m_mirror.o \ |
214 |
|
m_brdf.o mx_data.o mx_func.o normal.o o_cone.o o_face.o o_instance.o \ |
215 |
|
p_data.o p_func.o text.o raytrace.o rpmain.o rtmain.o rvmain.o rpict.o \ |
216 |
< |
rtrace.o rv2.o rv3.o source.o sphere.o \ |
217 |
< |
t_data.o t_func.o: ray.h standard.h mat4.h fvect.h object.h color.h |
216 |
> |
rtrace.o rview.o rv2.o rv3.o source.o srcsupp.o virtuals.o sphere.o \ |
217 |
> |
t_data.o t_func.o: ray.h ../common/standard.h ../common/mat4.h \ |
218 |
> |
../common/fvect.h ../common/object.h ../common/color.h |
219 |
|
|
220 |
< |
rv2.o rv3.o rview.o: rpaint.h driver.h view.h |
220 |
> |
rv2.o rv3.o rview.o: rpaint.h driver.h ../common/view.h |
221 |
|
|
222 |
< |
source.o: source.h |
222 |
> |
mirror.o source.o srcsupp.o virtuals.o: source.h |
223 |
|
|
224 |
< |
cone.o data.o devcomm.o face.o image.o initotypes.o xf.o misc.o objset.o \ |
225 |
< |
octree.o otypes.o readobj.o readoct.o rview.o: standard.h mat4.h fvect.h |
224 |
> |
cone.o data.o devcomm.o initotypes.o \ |
225 |
> |
octree.o: ../common/standard.h ../common/mat4.h ../common/fvect.h |
226 |
|
|
227 |
< |
mat4.o: mat4.h fvect.h |
227 |
> |
initotypes.o raytrace.o: otspecial.h |
228 |
|
|
229 |
|
sundev.o: suntools.icon |
230 |
|
|
231 |
< |
image.o rpmain.o rtmain.o rvmain.o rpict.o: view.h |
231 |
> |
rpmain.o rtmain.o rvmain.o rpict.o: ../common/view.h |
232 |
|
|
233 |
|
x10.o xtwind.o: xtwind.h |
234 |
|
|
235 |
|
x11.o x11twind.o: x11twind.h |
236 |
+ |
|
237 |
+ |
x11.o: x11icon.h |
238 |
+ |
|
239 |
+ |
ambient.o ambcomp.o lookamb.o: ambient.h |