chiark / gitweb /
filamentspool, Makefile: automatic toplevels
[reprap-play.git] / Makefile
index 47cfc9f..af3f76d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,15 @@
 
 HRR=/home/reprap
 SLIC3R=$(HRR)/Slic3r/bin/slic3r
+SKEINFORGE=python $(HRR)/reprappro-software.git/skeinforge/skeinforge_application/skeinforge_utilities/skeinforge_craft.py
 
 CONFIG=slic3r-config.ini
 
+AUTO_TOPLEVELS := $(foreach m, filamentspool, $(shell ./toplevel-find $m))
+
+scads:         $(addsuffix .scad, $(AUTO_TOPLEVELS))
+stls:          $(addsuffix .stl, $(AUTO_TOPLEVELS))
+
 default:
 
 %.stl:         %.scad
@@ -12,3 +18,15 @@ default:
 %.gcode:       $(CONFIG) %.stl
                $(SLIC3R) --load $^ --output $@
 
+#%.gcode:      %.stl
+#              $(SKEINFORGE) $<
+
+%.gcode:       manual-gcode-generator %.m-g
+               ./$^ >$@.new && mv -f $@.new $@
+
+dovecliptest.stl: doveclip.scad
+
+%.scad: toplevel-make Makefile toplevel-find
+               @echo ' write $@'
+               ./$< $@ >$@.new
+               @mv -f $@.new $@