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
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 $@
54 %.gcode: manual-gcode-generator %.m-g
55 $(PLAY)/$^ >$@.tmp && mv -f $@.tmp $@
57 dovecliptest.stl: doveclip.scad $(AUTO_INCS)
59 KNIFEBLOCK_KNIVES= 0 1 2
60 KNIFEBLOCK_TEMPLATES= bl hl
61 KNIFEBLOCK_TEMPLATE_FILES=\
62 $(foreach k,$(KNIFEBLOCK_KNIVES), \
63 $(foreach t,$(KNIFEBLOCK_TEMPLATES), \
64 knifeblock-knives-t$k$t.dxf))
66 knifeblock-knives-templates: $(KNIFEBLOCK_TEMPLATE_FILES)
68 knifeblock-knives-t%.dxf: knifeblock-knives-filter knifeblock-knives-trace.fig
69 ./$< $* <$(filter %.fig, $^) >$@.tmp.fig
70 fig2dev -D -30 -L eps <$@.tmp.fig >$@.tmp.eps
71 pstoedit -dt -f "dxf: -polyaslines -mm" $@.tmp.eps $@
74 ./$< >$@.tmp && mv -f $@.tmp $@
76 %.auto.scad: $(PLAY)/toplevel-make Makefile $(PLAY)/toplevel-find
81 .PRECIOUS: %.stl %.gcode
84 rm -f *~ *.stl *.auto.scad *.gcode .*.d $(AUTO_INCS)