chiark / gitweb /
quacks-ingredients: -counts: Include spares in Base_White
[reprap-play.git] / Makefile
1 # reprap-objects Makefile
2 #
3 # Build scripts for various 3D designs
4 # Copyright 2012-2016 Ian Jackson
5 #
6 # This work is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This work is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this work.  If not, see <http://www.gnu.org/licenses/>.
18
19 FILAMENTSPOOL_AUTOS = filamentspool filamentspool-lt filamentspool-sm
20 FILAMENTSPOOL_AUTOS += filamentspool-storarm3
21
22 QUACKSES = $(addprefix quacks-ingredients-L, 1 2 3 4 5)
23 QUACKS_SCADS = $(addsuffix .scad, $(QUACKSES))
24
25 USING_AUTOS ?= $(FILAMENTSPOOL_AUTOS) xeno-drivebay-bracket dungeonquest-cone anke-gps-bracket cable-hole-trunking-cover anglepoise-neck crossbar-computer-led-mount wardrobe-hook knifeblock pandemic-counter pattress-boxes-3-cover bike-lipo-box earring-stand bike-stalk-led-mount sewing-table sewing-table-test sewing-table-jig maglite-holder poster-tube-lid poster-tube-lid-coarse fairphone-case fairphone-battery-case lock-inframe-bracket ksafe-base $(QUACKSES) quacks-ingredients-demos
26
27 AUTO_INCS += sealing-box.scad sewing-table.scad \
28              poster-tube-lid-parametric.scad $(QUACKS_SCADS)
29
30 include reprap-objects.make
31
32 dovecliptest.stl: doveclip.scad $(AUTO_INCS)
33
34 KNIFEBLOCK_KNIVES= 0 1 2
35 KNIFEBLOCK_TEMPLATES= bl hl
36 KNIFEBLOCK_TEMPLATE_FILES=\
37         $(foreach k,$(KNIFEBLOCK_KNIVES), \
38         $(foreach t,$(KNIFEBLOCK_TEMPLATES), \
39         knifeblock-knives-t$k$t.dxf))
40
41 knifeblock-knives-templates knifeblock.stl: $(KNIFEBLOCK_TEMPLATE_FILES)
42
43 .PRECIOUS: knifeblock-knives-t%.dxf
44 knifeblock-knives-t%.dxf: knifeblock-knives-filter knifeblock-knives-trace.fig
45                 ./$< $(notdir $*) <$(filter %.fig, $^) >$@.tmp.fig
46                 fig2dev -D -30 -L eps <$@.tmp.fig >$@.tmp.eps
47                 pstoedit -dt -f "dxf: -polyaslines -mm" $@.tmp.eps $@
48
49 PANDEMICCOUNTER_LETTERS=30 31 32 33 34 35
50 PANDEMICCOUNTER_DXFS=$(foreach l,$(PANDEMICCOUNTER_LETTERS), \
51         pandemic-counter-l$l.dxf)
52
53 pandemic-counter-letters: $(PANDEMICCOUNTER_DXFS)
54 pandemic-counter%.stl: $(PANDEMICCOUNTER_DXFS)
55
56 .PRECIOUS: pandemic-counter-l%.eps
57 pandemic-counter-l%.eps: pandemic-counter-letters.fig
58                 fig2dev -D +$(notdir $*) -L eps <$< >$@.tmp
59                 @mv -f $@.tmp $@
60
61 .PRECIOUS: maglite-holder-torch-curve.eps
62 maglite-holder-torch-curve.eps: maglite-holder-torch.fig
63                 fig2dev -D +1:70 -L eps <$< >$@.tmp
64                 @mv -f $@.tmp $@
65
66 maglite-holder-torch-curve.dxf: maglite-holder-torch-curve.eps
67                 pstoedit -dt -flat 0.05 -f "dxf: -polyaslines -mm" $< $@
68
69
70 PANDEMICQUARANTINES_NUMBERS=1 2
71 PANDEMICQUARANTINES_DXFS=$(foreach l,$(PANDEMICQUARANTINES_NUMBERS), \
72         pandemic-quarantine-l$l.dxf)
73
74 pandemic-quarantine-numbers: $(PANDEMICQUARANTINES_DXFS)
75 pandemic-quarantine%.stl: $(PANDEMICQUARANTINES_DXFS)
76
77 .PRECIOUS: pandemic-quarantine-l%.eps
78 pandemic-quarantine-l%.eps: pandemic-quarantine-numbers.fig
79                 fig2dev -D +$(notdir $*) -L eps <$< >$@.tmp
80                 @mv -f $@.tmp $@
81
82 FILAMENTSPOOL_NUMBERS=$(shell seq 300 100 1500)
83 filamentspool-number-n%.eps:    filamentspool-number.eps.pl
84         ./$< $* >$@.tmp && mv -f $@.tmp $@
85
86 FILAMENTSPOOL_DXFS=$(foreach n,$(FILAMENTSPOOL_NUMBERS), \
87         filamentspool-number-n$n.dxf)
88
89 $(addsuffix .auto.stl, $(foreach f,$(FILAMENTSPOOL_AUTOS),$(shell \
90         $(PLAY)/toplevel-find $(PLAY)/$f))): $(FILAMENTSPOOL_DXFS)
91
92 filamentspool-numbers filamentspool.stl: $(FILAMENTSPOOL_DXFS)
93
94 SCREWRECESSTEST_SIZES= 2 3 4 5 6
95 SCREWRECESSTEST_DXFS=$(foreach s,$(SCREWRECESSTEST_SIZES), \
96         screw-recess-test-number-s$s.dxf)
97
98 screw-recess-test-number-s%.fig: screw-recess-test-number.fig.pl
99         ./$< $* >$@.tmp && mv -f $@.tmp $@
100
101 screw-recess-test-number-s%.eps: screw-recess-test-number-s%.fig
102                 fig2dev -L eps <$< >$@.tmp
103                 @mv -f $@.tmp $@
104
105 screw-recess-test-numbers screw-recess-test.stl: $(SCREWRECESSTEST_DXFS)
106
107 question-question.eps: question-question.fig
108                 fig2dev -L eps <$< >$@.tmp
109                 @mv -f $@.tmp $@
110
111 sewing-table%.stl: sewing-table-rear-profile.dxf
112 sewing-table%.stl: sewing-table-front-profile.dxf
113 sewing-table%.stl: sewing-table-end-profile.dxf
114
115 sewing-table-%-profile.eps: sewing-table-%-profile.fig
116                 fig2dev -L eps -D +40 <$< >$@.tmp
117                 @mv -f $@.tmp $@
118
119 question-token.stl: question-question.dxf
120
121 lemon-stand.stl: lemon-stand.scad
122
123 electron-token.stl: electron-token.scad
124
125 quacks-scads: $(addsuffix .auto.scads, $(QUACKSES))
126 quacks-scads: quacks-ingredients-demos.auto.scads
127
128 quacks-stls: $(addsuffix .auto.stls, $(QUACKSES))
129
130 .PRECIOUS: $(SCREWRECESSTEST_DXFS) $(SCREWRECESSTEST_DXFS) \
131         $(foreach s,$(SCREWRECESSTEST_SIZES), \
132                 screw-recess-test-number-s$s.fig \
133                 screw-recess-test-number-s$s.eps)
134
135 poster-tube-lid,CatchPostDistort-fa%.stl: \
136         distort-stl poster-tube-lid,CatchPreDistort.auto.stl
137                 ./distort-stl <poster-tube-lid,CatchPreDistort.auto.stl \
138                         set-fa $(notdir $*) project-cylinder 100 >$@.tmp
139                 mv -f $@.tmp $@
140