3 SLIC3R=$(HRR)/Slic3r/bin/slic3r
4 SKEINFORGE=python $(HRR)/reprappro-software.git/skeinforge/skeinforge_application/skeinforge_utilities/skeinforge_craft.py
9 CONFIG=$(PLAY)/slic3r-config.ini
11 USING_AUTOS ?= filamentspool 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
12 AUTO_TOPLEVELS := $(foreach m,$(USING_AUTOS),$(shell $(PLAY)/toplevel-find $m))
14 AUTO_INCS = funcs.scad
16 default: autoincs scads
18 autoincs: $(AUTO_INCS)
19 scads: $(addsuffix .auto.scad, $(AUTO_TOPLEVELS))
20 stls: $(addsuffix .auto.stl, $(AUTO_TOPLEVELS))
23 $(MAKE) $(addsuffix .auto.scad, $(shell $(PLAY)/toplevel-find $*))
25 $(MAKE) $(addsuffix .auto.stl, $(shell $(PLAY)/toplevel-find $*))
29 %.stl: %.scad $(AUTO_INCS)
30 openscad -d .$@.d.tmp -o $*.tmp.stl $<
32 @sed -e 's/\.tmp\.stl:/.stl:/' <.$@.d.tmp >.$@.d
36 AUTOBASE=$(shell echo $(1) | perl -pe 's/,\w+\.auto$$//')
38 %.gcode: %.stl $(CONFIG)
39 $(SLIC3R) --load $(CONFIG) \
40 --ignore-nonexistent-config \
41 --load $(call AUTOBASE,$*).slic3r \
53 cpp -nostdinc -P <$< >$@.tmp && mv -f $@.tmp $@
60 %.gcode: manual-gcode-generator %.m-g
61 $(PLAY)/$^ >$@.tmp && mv -f $@.tmp $@
63 dovecliptest.stl: doveclip.scad $(AUTO_INCS)
65 KNIFEBLOCK_KNIVES= 0 1 2
66 KNIFEBLOCK_TEMPLATES= bl hl
67 KNIFEBLOCK_TEMPLATE_FILES=\
68 $(foreach k,$(KNIFEBLOCK_KNIVES), \
69 $(foreach t,$(KNIFEBLOCK_TEMPLATES), \
70 knifeblock-knives-t$k$t.dxf))
72 knifeblock-knives-templates knifeblock.stl: $(KNIFEBLOCK_TEMPLATE_FILES)
74 .PRECIOUS: knifeblock-knives-t%.dxf
75 knifeblock-knives-t%.dxf: knifeblock-knives-filter knifeblock-knives-trace.fig
76 ./$< $(notdir $*) <$(filter %.fig, $^) >$@.tmp.fig
77 fig2dev -D -30 -L eps <$@.tmp.fig >$@.tmp.eps
78 pstoedit -dt -f "dxf: -polyaslines -mm" $@.tmp.eps $@
80 PANDEMICCOUNTER_LETTERS=30 31 32 33 34 35
81 PANDEMICCOUNTER_DXFS=$(foreach l,$(PANDEMICCOUNTER_LETTERS), \
82 pandemic-counter-l$l.dxf)
84 pandemic-counter-letters: $(PANDEMICCOUNTER_DXFS)
85 pandemic-counter%.stl: $(PANDEMICCOUNTER_DXFS)
87 .PRECIOUS: pandemic-counter-l%.eps
88 pandemic-counter-l%.eps: pandemic-counter-letters.fig
89 fig2dev -D +$(notdir $*) -L eps <$< >$@.tmp
92 PANDEMICQUARANTINES_NUMBERS=1 2
93 PANDEMICQUARANTINES_DXFS=$(foreach l,$(PANDEMICQUARANTINES_NUMBERS), \
94 pandemic-quarantine-l$l.dxf)
96 pandemic-quarantine-numbers: $(PANDEMICQUARANTINES_DXFS)
97 pandemic-quarantine%.stl: $(PANDEMICQUARANTINES_DXFS)
99 .PRECIOUS: pandemic-quarantine-l%.eps
100 pandemic-quarantine-l%.eps: pandemic-quarantine-numbers.fig
101 fig2dev -D +$(notdir $*) -L eps <$< >$@.tmp
104 SCREWRECESSTEST_SIZES= 2 3 4 5 6
105 SCREWRECESSTEST_DXFS=$(foreach s,$(SCREWRECESSTEST_SIZES), \
106 screw-recess-test-number-s$s.dxf)
108 screw-recess-test-number-s%.fig: screw-recess-test-number.fig.pl
109 ./$< $* >$@.tmp && mv -f $@.tmp $@
111 screw-recess-test-number-s%.eps: screw-recess-test-number-s%.fig
112 fig2dev -L eps <$< >$@.tmp
115 screw-recess-test-numbers screw-recess-test.stl: $(SCREWRECESSTEST_DXFS)
117 question-question.eps: question-question.fig
118 fig2dev -L eps <$< >$@.tmp
121 question-token.stl: question-question.dxf
123 .PRECIOUS: $(SCREWRECESSTEST_DXFS) $(SCREWRECESSTEST_DXFS) \
124 $(foreach s,$(SCREWRECESSTEST_SIZES), \
125 screw-recess-test-number-s$s.fig \
126 screw-recess-test-number-s$s.eps)
129 pstoedit -dt -f "dxf: -polyaslines -mm" $< $@
132 ./$< >$@.tmp && mv -f $@.tmp $@
134 .PRECIOUS: %.auto.scad
135 %.auto.scad: $(PLAY)/toplevel-make Makefile $(PLAY)/toplevel-find
140 .PRECIOUS: %.stl %.gcode %.eps %.dxf
143 rm -f *~ *.stl *.auto.scad *.gcode .*.d $(AUTO_INCS)