CONFIG=slic3r-config.ini
+AUTO_TOPLEVELS := $(foreach m, filamentspool, $(shell ./toplevel-find $m))
+
+scads: $(addsuffix .auto.scad, $(AUTO_TOPLEVELS))
+stls: $(addsuffix .auto.stl, $(AUTO_TOPLEVELS))
+
default:
+-include .*.d
+
%.stl: %.scad
- openscad -o $@ $<
+ openscad -d .$@.d -o $@ $<
%.gcode: $(CONFIG) %.stl
$(SLIC3R) --load $^ --output $@
# $(SKEINFORGE) $<
%.gcode: manual-gcode-generator %.m-g
- ./$^ >$@.new && mv -f $@.new $@
+ ./$^ >$@.tmp && mv -f $@.tmp $@
dovecliptest.stl: doveclip.scad
+
+%.auto.scad: toplevel-make Makefile toplevel-find
+ @echo ' write $@'
+ ./$< $@ >$@.tmp
+ @mv -f $@.tmp $@
+
+clean:
+ rm -f *~ *.stl *.auto.scad *.gcode .*.d