1 |
# RCSid $Id: Makefile,v 1.11 2018/12/02 18:57:05 greg Exp $ |
2 |
# |
3 |
# Render and primitive type testing |
4 |
# |
5 |
|
6 |
# Image reduction for comparisons |
7 |
RDU_PFILT = pfilt -1 -r 1 -x 128 -y 128 -pa 1 |
8 |
|
9 |
# Image comparison command |
10 |
IMG_CMP = radcompare -rms 0.07 -max 1.5 |
11 |
|
12 |
# Default target is to test everything |
13 |
all: test-xform \ |
14 |
test-mixtex-def test-mixtex-fish test-mixtex-plan tex-mixtex-rplan \ |
15 |
test-trans2-def test-trans2-fish test-dielectric-def \ |
16 |
test-dielectric-fish test-glass-def test-glass-fish test-glass-up \ |
17 |
test-tfunc-def test-tfunc-fish test-inst-def test-inst-fish \ |
18 |
test-mesh-def test-mesh-cyl test-mirror-fish test-mist-def \ |
19 |
test-trans-def test-trans-fish test-patterns-def test-patterns-plan |
20 |
|
21 |
clean: |
22 |
rm -f *.oct *.amb *_ill.dat blinds_ill?.dat *_*.hdr *.unf \ |
23 |
*.[cg]pm combined.rad |
24 |
|
25 |
# Special test of xform |
26 |
|
27 |
test-xform: combined_scene.rad |
28 |
xform -f combined_scene.rad | grep -v '^[ ]*#' > combined.rad |
29 |
radcompare -max 0.04 ref/combined.rad combined.rad |
30 |
|
31 |
### Octree for dielectric ### |
32 |
|
33 |
dielectric.oct: dielectric.rif |
34 |
rad -v 0 dielectric.rif |
35 |
|
36 |
### Reference and test for dielectric view def ### |
37 |
|
38 |
test-dielectric-def: ref/dielectric_def.hdr dielectric_def.hdr |
39 |
$(RDU_PFILT) dielectric_def.hdr | $(IMG_CMP) ref/dielectric_def.hdr - |
40 |
|
41 |
ref/dielectric_def.hdr: |
42 |
make dielectric_def.hdr |
43 |
$(RDU_PFILT) dielectric_def.hdr > ref/dielectric_def.hdr |
44 |
|
45 |
dielectric_def.hdr: dielectric.oct |
46 |
rad -v def dielectric.rif |
47 |
|
48 |
### End dielectric-def tests |
49 |
|
50 |
### Reference and test for dielectric view fish ### |
51 |
|
52 |
test-dielectric-fish: ref/dielectric_fish.hdr dielectric_fish.hdr |
53 |
$(RDU_PFILT) dielectric_fish.hdr | $(IMG_CMP) ref/dielectric_fish.hdr - |
54 |
|
55 |
ref/dielectric_fish.hdr: |
56 |
make dielectric_fish.hdr |
57 |
$(RDU_PFILT) dielectric_fish.hdr > ref/dielectric_fish.hdr |
58 |
|
59 |
dielectric_fish.hdr: dielectric.oct |
60 |
rad -v fish dielectric.rif |
61 |
|
62 |
### End dielectric-fish tests |
63 |
|
64 |
### Octree for glass ### |
65 |
|
66 |
glass.oct: glass.rif |
67 |
rad -v 0 glass.rif |
68 |
|
69 |
### Reference and test for glass view def ### |
70 |
|
71 |
test-glass-def: ref/glass_def.hdr glass_def.hdr |
72 |
$(RDU_PFILT) glass_def.hdr | $(IMG_CMP) ref/glass_def.hdr - |
73 |
|
74 |
ref/glass_def.hdr: |
75 |
make glass_def.hdr |
76 |
$(RDU_PFILT) glass_def.hdr > ref/glass_def.hdr |
77 |
|
78 |
glass_def.hdr: glass.oct |
79 |
rad -v def glass.rif |
80 |
|
81 |
### End glass-def tests |
82 |
|
83 |
### Reference and test for glass view fish ### |
84 |
|
85 |
test-glass-fish: ref/glass_fish.hdr glass_fish.hdr |
86 |
$(RDU_PFILT) glass_fish.hdr | $(IMG_CMP) ref/glass_fish.hdr - |
87 |
|
88 |
ref/glass_fish.hdr: |
89 |
make glass_fish.hdr |
90 |
$(RDU_PFILT) glass_fish.hdr > ref/glass_fish.hdr |
91 |
|
92 |
glass_fish.hdr: glass.oct |
93 |
rad -v fish glass.rif |
94 |
|
95 |
### End glass-fish tests |
96 |
|
97 |
### Reference and test for glass view up ### |
98 |
|
99 |
test-glass-up: ref/glass_up.hdr glass_up.hdr |
100 |
$(RDU_PFILT) glass_up.hdr | $(IMG_CMP) ref/glass_up.hdr - |
101 |
|
102 |
ref/glass_up.hdr: |
103 |
make glass_up.hdr |
104 |
$(RDU_PFILT) glass_up.hdr > ref/glass_up.hdr |
105 |
|
106 |
glass_up.hdr: glass.oct |
107 |
rad -v up glass.rif |
108 |
|
109 |
### End glass-up tests |
110 |
|
111 |
### Octree for inst ### |
112 |
|
113 |
inst.oct: inst.rif |
114 |
rad -v 0 inst.rif |
115 |
|
116 |
### Reference and test for inst view def ### |
117 |
|
118 |
test-inst-def: ref/inst_def.hdr inst_def.hdr |
119 |
$(RDU_PFILT) inst_def.hdr | $(IMG_CMP) ref/inst_def.hdr - |
120 |
|
121 |
ref/inst_def.hdr: |
122 |
make inst_def.hdr |
123 |
$(RDU_PFILT) inst_def.hdr > ref/inst_def.hdr |
124 |
|
125 |
inst_def.hdr: inst.oct |
126 |
rad -v def inst.rif |
127 |
|
128 |
### End inst-def tests |
129 |
|
130 |
### Reference and test for inst view fish ### |
131 |
|
132 |
test-inst-fish: ref/inst_fish.hdr inst_fish.hdr |
133 |
$(RDU_PFILT) inst_fish.hdr | $(IMG_CMP) ref/inst_fish.hdr - |
134 |
|
135 |
ref/inst_fish.hdr: |
136 |
make inst_fish.hdr |
137 |
$(RDU_PFILT) inst_fish.hdr > ref/inst_fish.hdr |
138 |
|
139 |
inst_fish.hdr: inst.oct |
140 |
rad -v fish inst.rif |
141 |
|
142 |
### End inst-fish tests |
143 |
|
144 |
### Octree for mesh ### |
145 |
|
146 |
mesh.oct: mesh.rif |
147 |
rad -v 0 mesh.rif |
148 |
|
149 |
### Reference and test for mesh view def ### |
150 |
|
151 |
test-mesh-def: ref/mesh_def.hdr mesh_def.hdr |
152 |
$(RDU_PFILT) mesh_def.hdr | $(IMG_CMP) ref/mesh_def.hdr - |
153 |
|
154 |
ref/mesh_def.hdr: |
155 |
make mesh_def.hdr |
156 |
$(RDU_PFILT) mesh_def.hdr > ref/mesh_def.hdr |
157 |
|
158 |
mesh_def.hdr: mesh.oct |
159 |
rad -v def mesh.rif |
160 |
|
161 |
### End mesh-def tests |
162 |
|
163 |
### Reference and test for mesh view cyl ### |
164 |
|
165 |
test-mesh-cyl: ref/mesh_cyl.hdr mesh_cyl.hdr |
166 |
$(RDU_PFILT) mesh_cyl.hdr | $(IMG_CMP) ref/mesh_cyl.hdr - |
167 |
|
168 |
ref/mesh_cyl.hdr: |
169 |
make mesh_cyl.hdr |
170 |
$(RDU_PFILT) mesh_cyl.hdr > ref/mesh_cyl.hdr |
171 |
|
172 |
mesh_cyl.hdr: mesh.oct |
173 |
rad -v cyl mesh.rif |
174 |
|
175 |
### End mesh-cyl tests |
176 |
|
177 |
### Reference and test for mesh view cyl2 ### |
178 |
|
179 |
test-mesh-cyl2: ref/mesh_cyl2.hdr mesh_cyl2.hdr |
180 |
$(RDU_PFILT) mesh_cyl2.hdr | $(IMG_CMP) ref/mesh_cyl2.hdr - |
181 |
|
182 |
ref/mesh_cyl2.hdr: |
183 |
make mesh_cyl2.hdr |
184 |
$(RDU_PFILT) mesh_cyl2.hdr > ref/mesh_cyl2.hdr |
185 |
|
186 |
mesh_cyl2.hdr: mesh.oct |
187 |
rad -v cyl2 mesh.rif |
188 |
|
189 |
### End mesh-cyl2 tests |
190 |
|
191 |
### Octree for mirror ### |
192 |
|
193 |
mirror.oct: mirror.rif |
194 |
rad -v 0 mirror.rif |
195 |
|
196 |
### Reference and test for mirror view fish ### |
197 |
|
198 |
test-mirror-fish: ref/mirror_fish.hdr mirror_fish.hdr |
199 |
$(RDU_PFILT) mirror_fish.hdr | $(IMG_CMP) ref/mirror_fish.hdr - |
200 |
|
201 |
ref/mirror_fish.hdr: |
202 |
make mirror_fish.hdr |
203 |
$(RDU_PFILT) mirror_fish.hdr > ref/mirror_fish.hdr |
204 |
|
205 |
mirror_fish.hdr: mirror.oct |
206 |
rad -v fish mirror.rif |
207 |
|
208 |
### End mirror-fish tests |
209 |
|
210 |
### Octree for mist ### |
211 |
|
212 |
mist.oct: mist.rif |
213 |
rad -v 0 mist.rif |
214 |
|
215 |
### Reference and test for mist view def ### |
216 |
|
217 |
test-mist-def: ref/mist_def.hdr mist_def.hdr |
218 |
$(RDU_PFILT) mist_def.hdr | $(IMG_CMP) ref/mist_def.hdr - |
219 |
|
220 |
ref/mist_def.hdr: |
221 |
make mist_def.hdr |
222 |
$(RDU_PFILT) mist_def.hdr > ref/mist_def.hdr |
223 |
|
224 |
mist_def.hdr: mist.oct |
225 |
rad -v def mist.rif |
226 |
|
227 |
### End mist-def tests |
228 |
|
229 |
### Octree for prism1 ### |
230 |
|
231 |
prism1.oct: prism1.rif |
232 |
rad -v 0 prism1.rif |
233 |
|
234 |
### Reference and test for prism1 view fish ### |
235 |
|
236 |
test-prism1-fish: ref/prism1_fish.hdr prism1_fish.hdr |
237 |
$(RDU_PFILT) prism1_fish.hdr | $(IMG_CMP) ref/prism1_fish.hdr - |
238 |
|
239 |
ref/prism1_fish.hdr: |
240 |
make prism1_fish.hdr |
241 |
$(RDU_PFILT) prism1_fish.hdr > ref/prism1_fish.hdr |
242 |
|
243 |
prism1_fish.hdr: prism1.oct |
244 |
rad -v fish prism1.rif |
245 |
|
246 |
### End prism1-fish tests |
247 |
|
248 |
### Octree for prism2 ### |
249 |
|
250 |
prism2.oct: prism2.rif |
251 |
rad -v 0 prism2.rif |
252 |
|
253 |
### Reference and test for prism2 view fish ### |
254 |
|
255 |
test-prism2-fish: ref/prism2_fish.hdr prism2_fish.hdr |
256 |
$(RDU_PFILT) prism2_fish.hdr | $(IMG_CMP) ref/prism2_fish.hdr - |
257 |
|
258 |
ref/prism2_fish.hdr: |
259 |
make prism2_fish.hdr |
260 |
$(RDU_PFILT) prism2_fish.hdr > ref/prism2_fish.hdr |
261 |
|
262 |
prism2_fish.hdr: prism2.oct |
263 |
rad -v fish prism2.rif |
264 |
|
265 |
### End prism2-fish tests |
266 |
|
267 |
### Octree for tfunc ### |
268 |
|
269 |
tfunc.oct: tfunc.rif |
270 |
rad -v 0 tfunc.rif |
271 |
|
272 |
### Reference and test for tfunc view def ### |
273 |
|
274 |
test-tfunc-def: ref/tfunc_def.hdr tfunc_def.hdr |
275 |
$(RDU_PFILT) tfunc_def.hdr | $(IMG_CMP) ref/tfunc_def.hdr - |
276 |
|
277 |
ref/tfunc_def.hdr: |
278 |
make tfunc_def.hdr |
279 |
$(RDU_PFILT) tfunc_def.hdr > ref/tfunc_def.hdr |
280 |
|
281 |
tfunc_def.hdr: tfunc.oct |
282 |
rad -v def tfunc.rif |
283 |
|
284 |
### End tfunc-def tests |
285 |
|
286 |
### Reference and test for tfunc view fish ### |
287 |
|
288 |
test-tfunc-fish: ref/tfunc_fish.hdr tfunc_fish.hdr |
289 |
$(RDU_PFILT) tfunc_fish.hdr | $(IMG_CMP) ref/tfunc_fish.hdr - |
290 |
|
291 |
ref/tfunc_fish.hdr: |
292 |
make tfunc_fish.hdr |
293 |
$(RDU_PFILT) tfunc_fish.hdr > ref/tfunc_fish.hdr |
294 |
|
295 |
tfunc_fish.hdr: tfunc.oct |
296 |
rad -v fish tfunc.rif |
297 |
|
298 |
### End tfunc-fish tests |
299 |
|
300 |
### Octree for trans ### |
301 |
|
302 |
trans.oct: trans.rif |
303 |
rad -v 0 trans.rif |
304 |
|
305 |
### Reference and test for trans view def ### |
306 |
|
307 |
test-trans-def: ref/trans_def.hdr trans_def.hdr |
308 |
$(RDU_PFILT) trans_def.hdr | $(IMG_CMP) ref/trans_def.hdr - |
309 |
|
310 |
ref/trans_def.hdr: |
311 |
make trans_def.hdr |
312 |
$(RDU_PFILT) trans_def.hdr > ref/trans_def.hdr |
313 |
|
314 |
trans_def.hdr: trans.oct |
315 |
rad -v def trans.rif |
316 |
|
317 |
### End trans-def tests |
318 |
|
319 |
### Reference and test for trans view fish ### |
320 |
|
321 |
test-trans-fish: ref/trans_fish.hdr trans_fish.hdr |
322 |
$(RDU_PFILT) trans_fish.hdr | $(IMG_CMP) ref/trans_fish.hdr - |
323 |
|
324 |
ref/trans_fish.hdr: |
325 |
make trans_fish.hdr |
326 |
$(RDU_PFILT) trans_fish.hdr > ref/trans_fish.hdr |
327 |
|
328 |
trans_fish.hdr: trans.oct |
329 |
rad -v fish trans.rif |
330 |
|
331 |
### End trans-fish tests |
332 |
|
333 |
### Octree for trans2 ### |
334 |
|
335 |
trans2.oct: trans2.rif |
336 |
rad -v 0 trans2.rif |
337 |
|
338 |
### Reference and test for trans2 view def ### |
339 |
|
340 |
test-trans2-def: ref/trans2_def.hdr trans2_def.hdr |
341 |
$(RDU_PFILT) trans2_def.hdr | $(IMG_CMP) ref/trans2_def.hdr - |
342 |
|
343 |
ref/trans2_def.hdr: |
344 |
make trans2_def.hdr |
345 |
$(RDU_PFILT) trans2_def.hdr > ref/trans2_def.hdr |
346 |
|
347 |
trans2_def.hdr: trans2.oct |
348 |
rad -v def trans2.rif |
349 |
|
350 |
### End trans2-def tests |
351 |
|
352 |
### Reference and test for trans2 view fish ### |
353 |
|
354 |
test-trans2-fish: ref/trans2_fish.hdr trans2_fish.hdr |
355 |
$(RDU_PFILT) trans2_fish.hdr | $(IMG_CMP) ref/trans2_fish.hdr - |
356 |
|
357 |
ref/trans2_fish.hdr: |
358 |
make trans2_fish.hdr |
359 |
$(RDU_PFILT) trans2_fish.hdr > ref/trans2_fish.hdr |
360 |
|
361 |
trans2_fish.hdr: trans2.oct |
362 |
rad -v fish trans2.rif |
363 |
|
364 |
### End trans2-fish tests |
365 |
|
366 |
### Reference and test for trans2 view win ### |
367 |
|
368 |
test-trans2-win: ref/trans2_win.hdr trans2_win.hdr |
369 |
$(RDU_PFILT) trans2_win.hdr | $(IMG_CMP) ref/trans2_win.hdr - |
370 |
|
371 |
ref/trans2_win.hdr: |
372 |
make trans2_win.hdr |
373 |
$(RDU_PFILT) trans2_win.hdr > ref/trans2_win.hdr |
374 |
|
375 |
trans2_win.hdr: trans2.oct |
376 |
rad -v win trans2.rif |
377 |
|
378 |
### End trans2-win tests |
379 |
|
380 |
### Octree for patterns ### |
381 |
|
382 |
patterns.oct: patterns.rif |
383 |
rad -v 0 patterns.rif |
384 |
|
385 |
### Reference and test for patterns view def ### |
386 |
|
387 |
test-patterns-def: ref/patterns_def.hdr patterns_def.hdr |
388 |
$(RDU_PFILT) patterns_def.hdr | $(IMG_CMP) ref/patterns_def.hdr - |
389 |
|
390 |
ref/patterns_def.hdr: |
391 |
make patterns_def.hdr |
392 |
$(RDU_PFILT) patterns_def.hdr > ref/patterns_def.hdr |
393 |
|
394 |
patterns_def.hdr: patterns.oct |
395 |
rad -v def patterns.rif |
396 |
|
397 |
### End patterns-def tests |
398 |
|
399 |
### Reference and test for patterns view plan ### |
400 |
|
401 |
test-patterns-plan: ref/patterns_plan.hdr patterns_plan.hdr |
402 |
$(RDU_PFILT) patterns_plan.hdr | $(IMG_CMP) ref/patterns_plan.hdr - |
403 |
|
404 |
ref/patterns_plan.hdr: |
405 |
make patterns_plan.hdr |
406 |
$(RDU_PFILT) patterns_plan.hdr > ref/patterns_plan.hdr |
407 |
|
408 |
patterns_plan.hdr: patterns.oct |
409 |
rad -v plan patterns.rif |
410 |
|
411 |
### End patterns-plan tests |
412 |
|
413 |
### Octree for mixtex ### |
414 |
|
415 |
mixtex.oct: mixtex.rif |
416 |
rad -v 0 mixtex.rif |
417 |
|
418 |
### Reference and test for mixtex view def ### |
419 |
|
420 |
test-mixtex-def: ref/mixtex_def.hdr mixtex_def.hdr |
421 |
$(RDU_PFILT) mixtex_def.hdr | $(IMG_CMP) ref/mixtex_def.hdr - |
422 |
|
423 |
ref/mixtex_def.hdr: |
424 |
make mixtex_def.hdr |
425 |
$(RDU_PFILT) mixtex_def.hdr > ref/mixtex_def.hdr |
426 |
|
427 |
mixtex_def.hdr: mixtex.oct |
428 |
rad -v def mixtex.rif |
429 |
|
430 |
### End mixtex-def tests |
431 |
|
432 |
### Reference and test for mixtex view fish ### |
433 |
|
434 |
test-mixtex-fish: ref/mixtex_fish.hdr mixtex_fish.hdr |
435 |
$(RDU_PFILT) mixtex_fish.hdr | $(IMG_CMP) ref/mixtex_fish.hdr - |
436 |
|
437 |
ref/mixtex_fish.hdr: |
438 |
make mixtex_fish.hdr |
439 |
$(RDU_PFILT) mixtex_fish.hdr > ref/mixtex_fish.hdr |
440 |
|
441 |
mixtex_fish.hdr: mixtex.oct |
442 |
rad -v fish mixtex.rif |
443 |
|
444 |
### End mixtex-fish tests |
445 |
|
446 |
### Reference and test for mixtex view plan ### |
447 |
|
448 |
test-mixtex-plan: ref/mixtex_plan.hdr mixtex_plan.hdr |
449 |
$(RDU_PFILT) mixtex_plan.hdr | $(IMG_CMP) ref/mixtex_plan.hdr - |
450 |
|
451 |
ref/mixtex_plan.hdr: |
452 |
make mixtex_plan.hdr |
453 |
$(RDU_PFILT) mixtex_plan.hdr > ref/mixtex_plan.hdr |
454 |
|
455 |
mixtex_plan.hdr: mixtex.oct |
456 |
rad -v plan mixtex.rif |
457 |
|
458 |
### End mixtex-plan tests |
459 |
|
460 |
### Reference and test for mixtex view rplan ### |
461 |
|
462 |
test-mixtex-rplan: ref/mixtex_rplan.hdr mixtex_rplan.hdr |
463 |
$(RDU_PFILT) mixtex_rplan.hdr | $(IMG_CMP) ref/mixtex_rplan.hdr - |
464 |
|
465 |
ref/mixtex_rplan.hdr: |
466 |
make mixtex_rplan.hdr |
467 |
$(RDU_PFILT) mixtex_rplan.hdr > ref/mixtex_rplan.hdr |
468 |
|
469 |
mixtex_rplan.hdr: mixtex.oct |
470 |
rad -v rplan mixtex.rif |
471 |
|
472 |
### End mixtex-rplan tests |