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
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 %.gcode: %.stl $(CONFIG)
37 $(SLIC3R) --load $(CONFIG) \
38 --ignore-nonexistent-config --load $*.slic3r \
49 cpp -nostdinc -P <$< >$@.tmp && mv -f $@.tmp $@
56 %.gcode: manual-gcode-generator %.m-g
57 $(PLAY)/$^ >$@.tmp && mv -f $@.tmp $@
59 dovecliptest.stl: doveclip.scad $(AUTO_INCS)
61 KNIFEBLOCK_KNIVES= 0 1 2
62 KNIFEBLOCK_TEMPLATES= bl hl
63 KNIFEBLOCK_TEMPLATE_FILES=\
64 $(foreach k,$(KNIFEBLOCK_KNIVES), \
65 $(foreach t,$(KNIFEBLOCK_TEMPLATES), \
66 knifeblock-knives-t$k$t.dxf))
68 knifeblock-knives-templates knifeblock.stl: $(KNIFEBLOCK_TEMPLATE_FILES)
70 knifeblock-knives-t%.dxf: knifeblock-knives-filter knifeblock-knives-trace.fig
71 ./$< $(notdir $*) <$(filter %.fig, $^) >$@.tmp.fig
72 fig2dev -D -30 -L eps <$@.tmp.fig >$@.tmp.eps
73 pstoedit -dt -f "dxf: -polyaslines -mm" $@.tmp.eps $@
75 PANDEMICCOUNTER_LETTERS=30 31 32 33 34 35
76 PANDEMICCOUNTER_DXFS=$(foreach l,$(PANDEMICCOUNTER_LETTERS), \
77 pandemic-counter-l$l.dxf)
79 pandemic-counter-letters pandemic-counter.stl: $(PANDEMICCOUNTER_DXFS)
81 pandemic-counter-l%.eps: pandemic-counter-letters.fig
82 fig2dev -D +$(notdir $*) -L eps <$< >$@.tmp
86 pstoedit -dt -f "dxf: -polyaslines -mm" $< $@
89 ./$< >$@.tmp && mv -f $@.tmp $@
91 %.auto.scad: $(PLAY)/toplevel-make Makefile $(PLAY)/toplevel-find
96 .PRECIOUS: %.stl %.gcode
99 rm -f *~ *.stl *.auto.scad *.gcode .*.d $(AUTO_INCS)