1 # reprap-objects Makefile
3 # Build scripts for various 3D designs
4 # Copyright 2012-2016 Ian Jackson
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.
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.
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/>.
19 FILAMENTSPOOL_AUTOS = filamentspool filamentspool-lt filamentspool-sm
20 FILAMENTSPOOL_AUTOS += filamentspool-storarm3
22 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 lock-inframe-bracket ksafe-base
24 AUTO_INCS += sealing-box.scad sewing-table.scad \
25 poster-tube-lid-parametric.scad
27 include reprap-objects.make
29 dovecliptest.stl: doveclip.scad $(AUTO_INCS)
31 KNIFEBLOCK_KNIVES= 0 1 2
32 KNIFEBLOCK_TEMPLATES= bl hl
33 KNIFEBLOCK_TEMPLATE_FILES=\
34 $(foreach k,$(KNIFEBLOCK_KNIVES), \
35 $(foreach t,$(KNIFEBLOCK_TEMPLATES), \
36 knifeblock-knives-t$k$t.dxf))
38 knifeblock-knives-templates knifeblock.stl: $(KNIFEBLOCK_TEMPLATE_FILES)
40 .PRECIOUS: knifeblock-knives-t%.dxf
41 knifeblock-knives-t%.dxf: knifeblock-knives-filter knifeblock-knives-trace.fig
42 ./$< $(notdir $*) <$(filter %.fig, $^) >$@.tmp.fig
43 fig2dev -D -30 -L eps <$@.tmp.fig >$@.tmp.eps
44 pstoedit -dt -f "dxf: -polyaslines -mm" $@.tmp.eps $@
46 PANDEMICCOUNTER_LETTERS=30 31 32 33 34 35
47 PANDEMICCOUNTER_DXFS=$(foreach l,$(PANDEMICCOUNTER_LETTERS), \
48 pandemic-counter-l$l.dxf)
50 pandemic-counter-letters: $(PANDEMICCOUNTER_DXFS)
51 pandemic-counter%.stl: $(PANDEMICCOUNTER_DXFS)
53 .PRECIOUS: pandemic-counter-l%.eps
54 pandemic-counter-l%.eps: pandemic-counter-letters.fig
55 fig2dev -D +$(notdir $*) -L eps <$< >$@.tmp
58 .PRECIOUS: maglite-holder-torch-curve.eps
59 maglite-holder-torch-curve.eps: maglite-holder-torch.fig
60 fig2dev -D +1:70 -L eps <$< >$@.tmp
63 maglite-holder-torch-curve.dxf: maglite-holder-torch-curve.eps
64 pstoedit -dt -flat 0.05 -f "dxf: -polyaslines -mm" $< $@
67 PANDEMICQUARANTINES_NUMBERS=1 2
68 PANDEMICQUARANTINES_DXFS=$(foreach l,$(PANDEMICQUARANTINES_NUMBERS), \
69 pandemic-quarantine-l$l.dxf)
71 pandemic-quarantine-numbers: $(PANDEMICQUARANTINES_DXFS)
72 pandemic-quarantine%.stl: $(PANDEMICQUARANTINES_DXFS)
74 .PRECIOUS: pandemic-quarantine-l%.eps
75 pandemic-quarantine-l%.eps: pandemic-quarantine-numbers.fig
76 fig2dev -D +$(notdir $*) -L eps <$< >$@.tmp
79 FILAMENTSPOOL_NUMBERS=$(shell seq 300 100 1500)
80 filamentspool-number-n%.eps: filamentspool-number.eps.pl
81 ./$< $* >$@.tmp && mv -f $@.tmp $@
83 FILAMENTSPOOL_DXFS=$(foreach n,$(FILAMENTSPOOL_NUMBERS), \
84 filamentspool-number-n$n.dxf)
86 $(addsuffix .auto.stl, $(foreach f,$(FILAMENTSPOOL_AUTOS),$(shell \
87 $(PLAY)/toplevel-find $(PLAY)/$f))): $(FILAMENTSPOOL_DXFS)
89 filamentspool-numbers filamentspool.stl: $(FILAMENTSPOOL_DXFS)
91 SCREWRECESSTEST_SIZES= 2 3 4 5 6
92 SCREWRECESSTEST_DXFS=$(foreach s,$(SCREWRECESSTEST_SIZES), \
93 screw-recess-test-number-s$s.dxf)
95 screw-recess-test-number-s%.fig: screw-recess-test-number.fig.pl
96 ./$< $* >$@.tmp && mv -f $@.tmp $@
98 screw-recess-test-number-s%.eps: screw-recess-test-number-s%.fig
99 fig2dev -L eps <$< >$@.tmp
102 screw-recess-test-numbers screw-recess-test.stl: $(SCREWRECESSTEST_DXFS)
104 question-question.eps: question-question.fig
105 fig2dev -L eps <$< >$@.tmp
108 sewing-table%.stl: sewing-table-rear-profile.dxf
109 sewing-table%.stl: sewing-table-front-profile.dxf
110 sewing-table%.stl: sewing-table-end-profile.dxf
112 sewing-table-%-profile.eps: sewing-table-%-profile.fig
113 fig2dev -L eps -D +40 <$< >$@.tmp
116 question-token.stl: question-question.dxf
118 lemon-stand.stl: lemon-stand.scad
120 electron-token.stl: electron-token.scad
122 .PRECIOUS: $(SCREWRECESSTEST_DXFS) $(SCREWRECESSTEST_DXFS) \
123 $(foreach s,$(SCREWRECESSTEST_SIZES), \
124 screw-recess-test-number-s$s.fig \
125 screw-recess-test-number-s$s.eps)
127 poster-tube-lid,CatchPostDistort-fa%.stl: \
128 distort-stl poster-tube-lid,CatchPreDistort.auto.stl
129 ./distort-stl <poster-tube-lid,CatchPreDistort.auto.stl \
130 set-fa $(notdir $*) project-cylinder 100 >$@.tmp