1 |
+ |
# RCSid: $Id$ |
2 |
|
# |
3 |
< |
# SCCSid "$SunId$ LBL" |
3 |
< |
# Compiles for ray tracing programs. |
3 |
> |
# Compiles for ray tracing programs. |
4 |
|
# |
5 |
|
|
6 |
|
OPT = -O |
7 |
|
MACH = -DBSD |
8 |
< |
CFLAGS = $(MACH) $(OPT) -I../common -L../lib |
8 |
> |
CFLAGS = -I../common -L../lib $(OPT) $(MACH) |
9 |
|
SPECIAL = aed |
10 |
|
CC = cc |
11 |
+ |
MLIB = -lm |
12 |
|
LINT = lint |
13 |
< |
LINTFLAGS = -DBSD -DVARIABLE -DFUNCTION \ |
13 |
< |
-DINCHAN -DRCONST -DREDEFW |
13 |
> |
LINTFLAGS = -DBSD |
14 |
|
|
15 |
|
# |
16 |
|
# The following are user-definable: |
28 |
|
# |
29 |
|
# Library routines: |
30 |
|
# |
31 |
< |
LIBS = -lrt -lm |
31 |
> |
RLIB = ../lib/libradiance.a |
32 |
> |
RCLIB = libraycalls.a |
33 |
> |
LIBS = -lrt $(MLIB) |
34 |
|
|
35 |
|
# |
36 |
|
# Device drivers for rview (see also devtable.c): |
45 |
|
# Standard object files: |
46 |
|
# |
47 |
|
|
48 |
< |
RTOBJS = rtmain.o rtrace.o $(ROBJS) Version.o |
49 |
< |
RTSRC = rmain.c rtrace.c $(RSRC) Version.c |
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 $(ROBJS) Version.o |
52 |
< |
RPSRC = rmain.c rpict.c $(RSRC) Version.c |
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 $(DOBJS) $(ROBJS) Version.o |
55 |
< |
RVSRC = rmain.c rview.c rv2.c rv3.c $(DSRC) $(RSRC) Version.c |
54 |
> |
RVOBJS = rvmain.o rview.o rv2.o rv3.o $(DOBJS) |
55 |
> |
RVSRC = rvmain.c rview.c rv2.c rv3.c $(DSRC) |
56 |
|
|
57 |
+ |
RLOBJS = raycalls.o raypcalls.o |
58 |
+ |
RLSRC = raycalls.c raypcalls.c |
59 |
+ |
|
60 |
|
ROBJS = $(RAYOBJS) $(SURFOBJS) $(MATOBJS) \ |
61 |
|
$(MODOBJS) $(SUPPOBJS) |
62 |
|
RSRC = $(RAYSRC) $(SURFSRC) $(MATSRC) \ |
63 |
|
$(MODSRC) $(SUPPSRC) |
64 |
|
|
65 |
< |
RAYOBJS = initotypes.o raytrace.o ambient.o ambcomp.o |
66 |
< |
RAYSRC = initotypes.c raytrace.c ambient.c ambcomp.c |
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 = source.o sphere.o srcsupp.o srcsamp.o virtuals.o o_face.o \ |
71 |
< |
o_cone.o o_instance.o |
71 |
> |
o_cone.o o_instance.o o_mesh.o |
72 |
|
SURFSRC = sphere.c source.c srcsupp.c virtuals.c o_face.c \ |
73 |
< |
srcsamp.c o_cone.c o_instance.c |
73 |
> |
srcsamp.c o_cone.c o_instance.c o_mesh.c |
74 |
|
|
75 |
< |
MATOBJS = normal.o dielectric.o m_clip.o glass.o m_brdf.o m_mirror.o \ |
76 |
< |
m_direct.o |
77 |
< |
MATSRC = normal.c dielectric.c m_clip.c glass.c m_brdf.c m_mirror.c \ |
78 |
< |
m_direct.c |
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 func.o noise3.o data.o readfargs.o \ |
84 |
< |
malloc.o |
78 |
< |
SUPPSRC = zeroes.c calexpr.c caldefn.c func.c noise3.c data.c readfargs.c \ |
79 |
< |
malloc.c |
83 |
> |
SUPPOBJS = func.o noise3.o data.o |
84 |
> |
SUPPSRC = func.c noise3.c data.c |
85 |
|
|
86 |
|
HEADERS = ambient.h ray.h data.h otspecial.h source.h |
87 |
|
|
91 |
|
|
92 |
|
PROGS = $(DESTDIR)/rtrace $(DESTDIR)/rpict $(DESTDIR)/rview $(DESTDIR)/lookamb |
93 |
|
|
94 |
< |
all: $(PROGS) $(SPECIAL) |
94 |
> |
all: $(PROGS) $(RCLIB) $(SPECIAL) |
95 |
|
|
96 |
< |
install: $(PROGS) $(SPECIAL) rayinit.cal |
96 |
> |
install: all rayinit.cal |
97 |
|
$(INSTALL) $(PROGS) $(INSTDIR) |
98 |
+ |
mv $(RCLIB) ../lib |
99 |
|
rm -f $(LIBDIR)/rayinit.cal |
100 |
|
cp rayinit.cal $(LIBDIR) |
101 |
|
|
96 |
– |
sun: $(DEVDIR)/sun $(DEVDIR)/sun.com |
97 |
– |
|
98 |
– |
x10: $(DEVDIR)/x10 |
99 |
– |
|
102 |
|
aed: $(DEVDIR)/aed |
103 |
|
|
104 |
< |
sgi: $(DEVDIR)/news |
104 |
> |
ogl: |
105 |
|
|
104 |
– |
tiff: |
105 |
– |
|
106 |
|
clean: |
107 |
|
set nonomatch; rm -f $(PROGS) *.o core |
108 |
|
|
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)/rview: $(RVOBJS) $(RLIB) |
123 |
> |
$(CC) $(CFLAGS) -o $(DESTDIR)/rview $(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)/sun: sundev.o devmain.o colortab.o editline.o |
129 |
– |
$(CC) $(CFLAGS) -s -o $(DEVDIR)/sun devmain.o sundev.o colortab.o \ |
130 |
– |
editline.o -lsuntool -lsunwindow -lpixrect $(LIBS) |
131 |
– |
|
132 |
– |
$(DEVDIR)/sun.com: suncom.o editline.o |
133 |
– |
$(CC) $(CFLAGS) -s -o $(DEVDIR)/sun.com suncom.o editline.o |
134 |
– |
|
135 |
– |
$(DEVDIR)/x10: x10.o xtwind.o colortab.o devmain.o editline.o |
136 |
– |
$(CC) $(CFLAGS) -s -o $(DEVDIR)/x10 x10.o xtwind.o devmain.o \ |
137 |
– |
colortab.o editline.o -lX $(LIBS) |
138 |
– |
|
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)/news: nwsdev.o devmain.o editline.o |
133 |
< |
$(CC) $(CFLAGS) -s -o $(DEVDIR)/news nwsdev.o devmain.o editline.o \ |
134 |
< |
-lcps $(LIBS) |
132 |
> |
$(RLIB): $(ROBJS) Version.o |
133 |
> |
ar rc $(RLIB) $(ROBJS) Version.o |
134 |
> |
-ranlib $(RLIB) |
135 |
|
|
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 |
153 |
< |
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 |
157 |
< |
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 |
161 |
< |
mv rmain.o rvmain.o |
150 |
> |
rvmain.o: rvmain.c |
151 |
> |
$(CC) $(CFLAGS) -c rvmain.c |
152 |
|
|
163 |
– |
readfargs.o: readfargs.c ../common/object.h |
164 |
– |
$(CC) $(CFLAGS) -DMEMHOG -c readfargs.c |
165 |
– |
|
166 |
– |
malloc.o: malloc.c |
167 |
– |
$(CC) $(CFLAGS) -DMCOMP -c malloc.c |
168 |
– |
|
153 |
|
# |
154 |
|
# Uncomment the following to model dispersion: |
155 |
|
# |
161 |
|
devcomm.o: devcomm.c |
162 |
|
$(CC) $(CFLAGS) -DDEVPATH=\"$(DEVDIR)\" -c devcomm.c |
163 |
|
|
180 |
– |
sundev.o: sundev.c |
181 |
– |
$(CC) $(CFLAGS) -DTTYPROG=\"$(DEVDIR)/sun.com\" -Dsun_init=dinit -c sundev.c |
182 |
– |
|
183 |
– |
x10.o: x10.c |
184 |
– |
$(CC) $(CFLAGS) -Dx_init=dinit -c x10.c |
185 |
– |
|
164 |
|
aed.o: aed.c |
165 |
|
$(CC) $(CFLAGS) -Daed_init=dinit -c aed.c |
166 |
|
|
189 |
– |
ambient.o: ambient.c |
190 |
– |
$(CC) $(CFLAGS) -DAMBFLUSH=16 -c ambient.c |
191 |
– |
|
192 |
– |
calexpr.o: calexpr.c ../common/calcomp.h |
193 |
– |
$(CC) $(CFLAGS) -DVARIABLE -DFUNCTION -DINCHAN -DRCONST -c calexpr.c |
194 |
– |
|
195 |
– |
caldefn.o: caldefn.c ../common/calcomp.h |
196 |
– |
$(CC) $(CFLAGS) -DFUNCTION -DREDEFW -c caldefn.c |
197 |
– |
|
198 |
– |
nwsdev.o: nwsdev.c nwsdev.h newsconstants.h |
199 |
– |
$(CC) $(CFLAGS) -Dnws_init=dinit -c nwsdev.c |
200 |
– |
|
201 |
– |
nwsdev.h: nwsdev.cps newsconstants.h |
202 |
– |
cps nwsdev.cps |
203 |
– |
|
167 |
|
# |
168 |
|
# Version module: |
169 |
|
# |
176 |
|
# Include dependencies: |
177 |
|
# |
178 |
|
|
179 |
< |
aed.o colortab.o data.o devcomm.o \ |
180 |
< |
devmain.o lookamb.o rview.o sundev.o x10.o x11.o: ../common/color.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 |
< |
o_cone.o srcsupp.o: ../common/cone.h |
182 |
> |
freeobjmem.o o_cone.o srcsupp.o: ../common/cone.h |
183 |
|
|
184 |
< |
data.o m_brdf.o mx_data.o p_data.o t_data.o: data.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 |
|
aed.o devcomm.o devmain.o devtable.o \ |
188 |
< |
editline.o nwsdev.o sundev.o tty.o x10.o x11.o: driver.h |
188 |
> |
editline.o tty.o x11.o: driver.h |
189 |
|
|
190 |
< |
o_face.o srcsupp.o: ../common/face.h |
190 |
> |
freeobjmem.o o_face.o srcsupp.o: ../common/face.h |
191 |
|
|
192 |
|
ambient.o raytrace.o rpmain.o rtmain.o \ |
193 |
|
rtrace.o rvmain.o rv2.o rv3.o source.o: ../common/octree.h |
194 |
|
|
195 |
< |
o_instance.o: ../common/instance.h ../common/octree.h |
195 |
> |
o_instance.o: ../common/instance.h |
196 |
|
|
197 |
< |
ambient.o dielectric.o func.o initotypes.o m_brdf.o \ |
198 |
< |
normal.o o_cone.o text.o raytrace.o rtrace.o \ |
199 |
< |
rv2.o source.o srcsupp.o virtuals.o sphere.o: ../common/otypes.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 |
> |
virtuals.o: ../common/otypes.h |
201 |
|
|
202 |
< |
ambient.o ambcomp.o rpict.o rv3.o srcsamp.o: ../common/random.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 |
< |
ambient.o ambcomp.o dielectric.o func.o glass.o m_clip.o m_mirror.o \ |
207 |
< |
m_brdf.o mx_data.o mx_func.o normal.o o_cone.o o_face.o o_instance.o \ |
208 |
< |
p_data.o p_func.o text.o raytrace.o rpmain.o rtmain.o rvmain.o rpict.o \ |
209 |
< |
rtrace.o rview.o rv2.o rv3.o source.o srcsamp.o srcsupp.o virtuals.o \ |
210 |
< |
sphere.o t_data.o t_func.o: ray.h ../common/standard.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 srcsamp.o srcsupp.o t_data.o t_func.o text.o \ |
211 |
> |
rpmain.o rtmain.o rvmain.o virtuals.o m_alias.o: ray.h \ |
212 |
> |
../common/standard.h ../common/octree.h \ |
213 |
|
../common/mat4.h ../common/fvect.h ../common/object.h ../common/color.h |
214 |
|
|
215 |
< |
rv2.o rv3.o rview.o: rpaint.h driver.h ../common/view.h |
215 |
> |
rv2.o rv3.o rview.o: rpaint.h driver.h ../common/view.h ../common/resolu.h |
216 |
|
|
217 |
< |
mirror.o source.o srcsamp.o srcsupp.o virtuals.o: source.h |
217 |
> |
m_direct.o m_mirror.o m_mist.o dielectric.o raycalls.o \ |
218 |
> |
source.o srcdraw.o srcsamp.o srcsupp.o virtuals.o: source.h |
219 |
|
|
220 |
< |
cone.o data.o devcomm.o initotypes.o \ |
221 |
< |
octree.o: ../common/standard.h ../common/mat4.h ../common/fvect.h |
220 |
> |
cone.o data.o devcomm.o initotypes.o fprism.o preload.o \ |
221 |
> |
duphead.o octree.o: ../common/standard.h ../common/mat4.h ../common/fvect.h |
222 |
|
|
223 |
+ |
ambio.o: ../common/fvect.h |
224 |
+ |
|
225 |
|
initotypes.o raytrace.o: otspecial.h |
226 |
|
|
227 |
< |
sundev.o: suntools.icon |
227 |
> |
rpmain.o rtmain.o rvmain.o rpict.o \ |
228 |
> |
srcdraw.o: ../common/view.h ../common/resolu.h |
229 |
|
|
257 |
– |
rpmain.o rtmain.o rvmain.o rpict.o: ../common/view.h |
258 |
– |
|
259 |
– |
x10.o xtwind.o: xtwind.h |
260 |
– |
|
230 |
|
x11.o x11twind.o: x11twind.h |
231 |
|
|
232 |
|
x11.o: x11icon.h |
233 |
|
|
234 |
< |
ambient.o ambcomp.o lookamb.o: ambient.h |
234 |
> |
ambient.o ambcomp.o ambio.o lookamb.o raycalls.o: ambient.h |
235 |
> |
|
236 |
> |
data.o rpmain.o rtmain.o rvmain.o rpict.o rtrace.o \ |
237 |
> |
rv2.o: ../common/resolu.h |
238 |
> |
|
239 |
> |
aniso.o func.o m_brdf.o m_direct.o mx_data.o mx_func.o p_data.o \ |
240 |
> |
p_func.o t_data.o t_func.o: func.h |
241 |
> |
|
242 |
> |
preload.o: ../common/object.h ../common/face.h ../common/cone.h \ |
243 |
> |
../common/instance.h ../common/mesh.h ../common/color.h data.h |
244 |
> |
|
245 |
> |
devcomm.o: ../common/vfork.h |
246 |
> |
|
247 |
> |
rtmain.o rpmain.o rvmain.o persist.o duphead.o rpict.o: ../common/paths.h |
248 |
> |
|
249 |
> |
freeobjmem.o raycalls.o text.o: ../common/font.h |
250 |
> |
|
251 |
> |
raypcalls.o: ../common/selcall.h |
252 |
> |
|
253 |
> |
o_mesh.o: ../common/mesh.h |