-
Notifications
You must be signed in to change notification settings - Fork 17
/
hob3lop-test.mk
97 lines (83 loc) · 2.07 KB
/
hob3lop-test.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# -*- Mode: Makefile -*-
# Copyright (C) 2018-2024 by Henrik Theiling, License: GPLv3, see LICENSE file
HOB3LOP_TEST_GON := \
corner17 \
err_test28a \
err_test20 \
trifail1 \
paper1 \
bend1 \
order1 \
order2 \
order3 \
collapse1 \
collapse2 \
close1 \
cross1 \
vert1 \
all1 \
over1 \
over1a \
over2 \
over3 \
over4 \
over5 \
over6 \
over7 \
over8 \
over9 \
over10 \
over11 \
touch1 \
touch2 \
round1 \
round2 \
round3 \
star2 \
star2b \
star1 \
star3 \
star4 \
collapse3 \
collapse3b \
collapse4 \
vert2
DEP.hob3lop-test.o := \
src/hob3lop/hob3lop-test.c \
out/src/hob3lop/hob3lop-test-1.inc \
out/src/hob3lop/hob3lop-test-2.inc \
out/src/hob3lop/useless_box.inc \
out/src/hob3lop/test1.inc \
out/src/hob3lop/test2.inc \
out/src/hob3lop/corner1.inc \
out/src/hob3lop/corner1b.inc \
out/src/hob3lop/corner2.inc \
$(addsuffix .inc, $(addprefix out/src/hob3lop/, $(HOB3LOP_TEST_GON)))
out/bin/hob3lop/hob3lop-test.o: \
$(DEP.hob3lop-test.o)
######################################################################
STL2C := $(srcdir)/script/stl2c
out/src/hob3lop/hob3lop-test-1.inc: hob3lop-test.mk
for i in $(HOB3LOP_TEST_GON); do echo '#include "'"$$i"'.inc"'; done > [email protected]
mv [email protected] $@
out/src/hob3lop/hob3lop-test-2.inc: hob3lop-test.mk
for i in $(HOB3LOP_TEST_GON); do echo "TEST_TRIANGLIFY_GON($$i);"; done > [email protected]
mv [email protected] $@
out/src/hob3lop/corner2.inc: test/hob3lop/corner2.stl
out/test/hob3lop/corner2.stl: test/hob3lop/corner2.scad
openscad $< -o $@
out/src/%.inc: test/%.stl $(STL2C)
$(STL2C) $< > [email protected]
mv [email protected] $@
out/src/%.inc: test/%.fig $(STL2C)
$(STL2C) $< > [email protected]
mv [email protected] $@
out/test/%.csg: test/%.scad
openscad $< -o $@
out/src/%.inc: test/%.csg3 $(STL2C)
$(STL2C) $< > [email protected]
mv [email protected] $@
# This is a recursive dependency: we cannot have hob3l before we test its internals.
#out/test/%.csg3: test/hob3lop/%.csg
# hob3l --dump-csg3 $< > [email protected]
# mv [email protected] $@