chiark
/
gitweb
/
~ianmdlvl
/
reprap-play.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
filamenttrestle wip with spool core circular bar
[reprap-play.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index b21432af57457d8f10a82ca030455a78619db099..98ebc48987c80c3cdecc27b3eacceae423b3605b 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-3,9
+3,13
@@
HRR=/home/reprap
SLIC3R=$(HRR)/Slic3r/bin/slic3r
SKEINFORGE=python $(HRR)/reprappro-software.git/skeinforge/skeinforge_application/skeinforge_utilities/skeinforge_craft.py
SLIC3R=$(HRR)/Slic3r/bin/slic3r
SKEINFORGE=python $(HRR)/reprappro-software.git/skeinforge/skeinforge_application/skeinforge_utilities/skeinforge_craft.py
+CWD := $(shell pwd)
+PLAY ?= $(CWD)
+
CONFIG=slic3r-config.ini
CONFIG=slic3r-config.ini
-AUTO_TOPLEVELS := $(foreach m, filamentspool, $(shell ./toplevel-find $m))
+USING_AUTOS ?= filamentspool
+AUTO_TOPLEVELS := $(foreach m,$(USING_AUTOS),$(shell $(PLAY)/toplevel-find $m))
scads: $(addsuffix .auto.scad, $(AUTO_TOPLEVELS))
stls: $(addsuffix .auto.stl, $(AUTO_TOPLEVELS))
scads: $(addsuffix .auto.scad, $(AUTO_TOPLEVELS))
stls: $(addsuffix .auto.stl, $(AUTO_TOPLEVELS))
@@
-15,23
+19,30
@@
default:
-include .*.d
%.stl: %.scad
-include .*.d
%.stl: %.scad
- openscad -d .$@.d -o $@ $<
+ openscad -d .$@.d.tmp -o $*.tmp.stl $<
+ @rm -f $@
+ @sed -e 's/\.tmp\.stl:/.stl:/' <.$@.d.tmp >.$@.d
+ @rm .$@.d.tmp
+ mv -f $*.tmp.stl $@
%.gcode: $(CONFIG) %.stl
%.gcode: $(CONFIG) %.stl
- $(SLIC3R) --load $^ --output $@
+ $(SLIC3R) --load $^ --ignore-nonexistent-config --load $*.slic3r --output $@.tmp
+ @mv -f $@.tmp $@
#%.gcode: %.stl
# $(SKEINFORGE) $<
%.gcode: manual-gcode-generator %.m-g
#%.gcode: %.stl
# $(SKEINFORGE) $<
%.gcode: manual-gcode-generator %.m-g
-
.
/$^ >$@.tmp && mv -f $@.tmp $@
+
$(PLAY)
/$^ >$@.tmp && mv -f $@.tmp $@
dovecliptest.stl: doveclip.scad
dovecliptest.stl: doveclip.scad
-%.auto.scad:
toplevel-make Makefile
toplevel-find
+%.auto.scad:
$(PLAY)/toplevel-make Makefile $(PLAY)/
toplevel-find
@echo ' write $@'
@echo ' write $@'
-
./
$< $@ >$@.tmp
+ $< $@ >$@.tmp
@mv -f $@.tmp $@
@mv -f $@.tmp $@
+.PRECIOUS: %.stl %.gcode
+
clean:
rm -f *~ *.stl *.auto.scad *.gcode .*.d
clean:
rm -f *~ *.stl *.auto.scad *.gcode .*.d