chiark / gitweb /
air-hockey-puck: wip
[reprap-play.git] / Makefile
1 # reprap-objects Makefile
2 #
3 # Build scripts for various 3D designs
4 # Copyright 2012-2023 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 fairphone4-case fairphone4-case-coarse lock-inframe-bracket ksafe-base $(QUACKSES) quacks-ingredients-demos mic-table-clamp nook-case nook-case-test scaffold-clamp-common scaffold-clamp-tensioner scaffold-clamp-linear-bracket scaffold-clamp-straphook powerbank-bike-clamp topeak-mtx-tortec-expeditionrack-adapter lipo-flat-mount laptop-sound-cable-hooks digispark-with-cable chimney-cable-retainer $(foreach x,500 1000,adafruit-powerboost-$x)
26
27 AUTO_INCS += sealing-box.scad sewing-table.scad nutbox.scad \
28              powerbank-anker-10000.dxf \
29              poster-tube-lid-parametric.scad \
30              $(QUACKS_SCADS)
31
32 AUTO_STLS_INCS += poster-tube-lid,CatchPostDistort-fa3.stl
33 AUTO_STLS_INCS += poster-tube-lid,CatchPostDistort-fa20.stl
34
35 include diziet-utils/reprap-objects.make
36
37 dovecliptest.stl: doveclip.scad $(AUTO_INCS)
38
39 KNIFEBLOCK_KNIVES= 0 1 2
40 KNIFEBLOCK_TEMPLATES= bl hl
41 KNIFEBLOCK_TEMPLATE_FILES=\
42         $(foreach k,$(KNIFEBLOCK_KNIVES), \
43         $(foreach t,$(KNIFEBLOCK_TEMPLATES), \
44         knifeblock-knives-t$k$t.dxf))
45
46 knifeblock-knives-templates knifeblock.stl: $(KNIFEBLOCK_TEMPLATE_FILES)
47
48 .PRECIOUS: knifeblock-knives-t%.dxf
49 knifeblock-knives-t%.dxf: knifeblock-knives-filter knifeblock-knives-trace.fig
50                 ./$< $(notdir $*) <$(filter %.fig, $^) >$@.tmp.fig
51                 fig2dev -D -30 -L eps <$@.tmp.fig >$@.tmp.eps
52                 pstoedit -dt -f "dxf: -polyaslines -mm" $@.tmp.eps $@
53
54 PANDEMICCOUNTER_LETTERS=30 31 32 33 34 35
55 PANDEMICCOUNTER_DXFS=$(foreach l,$(PANDEMICCOUNTER_LETTERS), \
56         pandemic-counter-l$l.dxf)
57
58 pandemic-counter-letters: $(PANDEMICCOUNTER_DXFS)
59 pandemic-counter%.stl: $(PANDEMICCOUNTER_DXFS)
60
61 .PRECIOUS: pandemic-counter-l%.eps
62 pandemic-counter-l%.eps: pandemic-counter-letters.fig
63                 fig2dev -D +$(notdir $*) -L eps <$< >$@.tmp
64                 @$i
65
66 .PRECIOUS: maglite-holder-torch-curve.eps
67 maglite-holder-torch-curve.eps: maglite-holder-torch.fig
68                 fig2dev -D +1:70 -L eps <$< >$@.tmp
69                 @$i
70
71 maglite-holder-torch-curve.dxf: maglite-holder-torch-curve.eps
72                 pstoedit -dt -flat 0.05 -f "dxf: -polyaslines -mm" $< $@
73
74 powerbank-anker-10000.dxf: powerbank-anker-10000.eps
75                 pstoedit -dt -f "dxf: -polyaslines -mm" $< $@
76
77 PANDEMICQUARANTINES_NUMBERS=1 2
78 PANDEMICQUARANTINES_DXFS=$(foreach l,$(PANDEMICQUARANTINES_NUMBERS), \
79         pandemic-quarantine-l$l.dxf)
80
81 pandemic-quarantine-numbers: $(PANDEMICQUARANTINES_DXFS)
82 pandemic-quarantine%.stl: $(PANDEMICQUARANTINES_DXFS)
83
84 .PRECIOUS: pandemic-quarantine-l%.eps
85 pandemic-quarantine-l%.eps: pandemic-quarantine-numbers.fig
86                 fig2dev -D +$(notdir $*) -L eps <$< >$@.tmp
87                 @$i
88
89 FILAMENTSPOOL_NUMBERS=$(shell seq 300 100 1500)
90 filamentspool-number-n%.eps:    filamentspool-number.eps.pl
91         ./$< $* $o
92
93 FILAMENTSPOOL_DXFS=$(foreach n,$(FILAMENTSPOOL_NUMBERS), \
94         filamentspool-number-n$n.dxf)
95
96 $(addsuffix .auto.stl, $(foreach f,$(FILAMENTSPOOL_AUTOS),$(shell \
97         $(DUTILS)/toplevel-find $(CWD)/$f))): $(FILAMENTSPOOL_DXFS)
98
99 filamentspool-numbers filamentspool.stl: $(FILAMENTSPOOL_DXFS)
100
101 SCREWRECESSTEST_SIZES= 2 3 4 5 6
102 SCREWRECESSTEST_DXFS=$(foreach s,$(SCREWRECESSTEST_SIZES), \
103         screw-recess-test-number-s$s.dxf)
104
105 screw-recess-test-number-s%.fig: screw-recess-test-number.fig.pl
106         ./$< $* $o
107
108 screw-recess-test-number-s%.eps: screw-recess-test-number-s%.fig
109                 fig2dev -L eps <$< >$@.tmp
110                 @$i
111
112 screw-recess-test-numbers screw-recess-test.stl: $(SCREWRECESSTEST_DXFS)
113
114 question-question.eps: question-question.fig
115                 fig2dev -L eps <$< >$@.tmp
116                 @$i
117
118 sewing-table%.stl: sewing-table-rear-profile.dxf
119 sewing-table%.stl: sewing-table-front-profile.dxf
120 sewing-table%.stl: sewing-table-end-profile.dxf
121
122 sewing-table-%-profile.eps: sewing-table-%-profile.fig
123                 fig2dev -L eps -D +40 <$< >$@.tmp
124                 @$i
125
126 question-token.stl: question-question.dxf
127
128 lemon-stand.stl: lemon-stand.scad
129
130 electron-token.stl: electron-token.scad
131
132 quacks-scads: $(addsuffix .auto.scads, $(QUACKSES))
133 quacks-scads: quacks-ingredients-demos.auto.scads
134
135 quacks-stls: $(addsuffix .auto.stls, $(QUACKSES))
136
137 .PRECIOUS: $(SCREWRECESSTEST_DXFS) $(SCREWRECESSTEST_DXFS) \
138         $(foreach s,$(SCREWRECESSTEST_SIZES), \
139                 screw-recess-test-number-s$s.fig \
140                 screw-recess-test-number-s$s.eps)
141
142 poster-tube-lid,CatchAssembly.auto.stl: poster-tube-lid,CatchPostDistort-fa3.stl
143 poster-tube-lid-coarse,CatchAssembly.auto.stl: poster-tube-lid,CatchPostDistort-fa20.stl
144
145 poster-tube-lid,CatchPostDistort-fa%.stl: \
146                 distort-stl poster-tube-lid,CatchPreDistort.auto.stl
147         ./distort-stl <poster-tube-lid,CatchPreDistort.auto.stl \
148                 set-fa $(notdir $*) project-cylinder 100 >$@.tmp
149         $i
150