-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
100 lines (89 loc) · 3.45 KB
/
Makefile
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
98
99
100
DELAY=1000
MORPHDELAY=8
MORPHFRAMES=19
OPTS=--enable all --view axes,scales --imgsize 600,360
OUTDIR=output
bosl_pngs := $(patsubst %.scad,%.png,$(wildcard BOSL/*.scad))
bosl2_pngs := $(patsubst %.scad,%.png,$(wildcard BOSL2/*.scad))
bolts_pngs := $(patsubst %.scad,%.png,$(wildcard BOLTS/*.scad))
dotscad_pngs := $(patsubst %.scad,%.png,$(wildcard dotSCAD/*.scad))
marksencl_pngs := $(patsubst %.scad,%.png,$(wildcard MarksEnclosureHelper/*.scad))
roundanything_pngs := $(patsubst %.scad,%.png,$(wildcard RoundAnything/*.scad))
rcolyer_smooth_prim_pngs := $(patsubst %.scad,%.png,$(wildcard rcolyer-smooth-prim/*.scad))
rcolyer_closepoints_pngs := $(patsubst %.scad,%.png,$(wildcard rcolyer-closepoints/*.scad))
rcolyer_plot_function_pngs := $(patsubst %.scad,%.png,$(wildcard rcolyer-plot-function/*.scad))
rcolyer_threads_pngs := $(patsubst %.scad,%.png,$(wildcard rcolyer-threads/*.scad))
ub_pngs := $(patsubst %.scad,%.png,$(wildcard UB/*.scad))
funcutils_pngs := $(patsubst %.scad,%.png,$(wildcard funcutils/*.scad))
sofian_tray_pngs := $(patsubst %.scad,%.png,$(wildcard sofian_tray/*.scad))
yapp_pngs := $(patsubst %.scad,%.png,$(wildcard YAPP/*.scad))
stemfie_pngs := $(patsubst %.scad,%.png,$(wildcard Stemfie/*.scad))
functional_openscad_pngs := $(patsubst %.scad,%.png,$(wildcard FunctionalOpenSCAD/*.scad))
catchnhole_pngs := $(patsubst %.scad,%.png,$(wildcard catchnhole/*.scad))
angelo_nicoli_assets_pngs := $(patsubst %.scad,%.png,$(wildcard angelo-nicoli-assets/*.scad))
all_pngs := \
$(bosl_pngs) \
$(bosl2_pngs) \
$(bolts_pngs) \
$(dotscad_pngs) \
$(marksencl_pngs) \
$(roundanything_pngs) \
$(rcolyer_smooth_prim_pngs) \
$(rcolyer_closepoints_pngs) \
$(rcolyer_plot_function_pngs) \
$(rcolyer_threads_pngs) \
$(ub_pngs) \
$(funcutils_pngs) \
$(sofian_tray_pngs) \
$(yapp_pngs) \
$(stemfie_pngs) \
$(functional_openscad_pngs) \
$(catchnhole_pngs) \
$(angelo_nicoli_assets_pngs) \
all : \
bosl.gif \
bosl2.gif \
bolts.gif \
dotscad.gif \
marks-enclosure-helper.gif \
round-anything.gif \
rcolyer_smooth_prim.gif \
rcolyer_closepoints.gif \
rcolyer_plot_function.gif \
rcolyer_threads.gif \
ub.gif \
funcutils.gif \
sofian_tray.gif \
yapp.gif \
stemfie.gif \
functional_openscad.gif \
catchnhole.gif \
angelo-nicoli-assets.gif \
bosl.gif : $(bosl_pngs)
bosl2.gif : $(bosl2_pngs)
bolts.gif : $(bolts_pngs)
dotscad.gif : $(dotscad_pngs)
marks-enclosure-helper.gif : $(marksencl_pngs)
round-anything.gif : $(roundanything_pngs)
rcolyer_smooth_prim.gif : $(rcolyer_smooth_prim_pngs)
rcolyer_closepoints.gif : $(rcolyer_closepoints_pngs)
rcolyer_plot_function.gif : $(rcolyer_plot_function_pngs)
rcolyer_threads.gif : $(rcolyer_threads_pngs)
ub.gif : $(ub_pngs)
funcutils.gif : $(funcutils_pngs)
sofian_tray.gif : $(sofian_tray_pngs)
yapp.gif : $(yapp_pngs)
stemfie.gif : $(stemfie_pngs)
functional_openscad.gif : $(functional_openscad_pngs)
catchnhole.gif : $(catchnhole_pngs)
angelo-nicoli-assets.gif : $(angelo_nicoli_assets_pngs)
.INTERMEDIATE: $(all_pngs)
%.gif :
mkdir -p $(OUTDIR)
convert \( $^ \) \( -clone 0 \) -loop 0 -morph $(MORPHFRAMES) -delete -1 -set delay '%[fx:(t%($(MORPHFRAMES)+1)==0)?$(DELAY):$(MORPHDELAY)]' -layers Optimize $(OUTDIR)/$@
_%.png : %.scad Makefile
openscad-nightly $(OPTS) -o $@ $<
%.png : _%.png
convert $< -background gray80 -font Open-Sans -gravity South -pointsize 28 -splice 0x40 -annotate +0+2 "$$(echo $(subst /,: ,$(patsubst %.png,%,$@)) | sed -e 's/[0-9][0-9]_//')" -gravity Center -append $@
clean:
rm -rf output */*.png