chiark / gitweb /
warptest2 before print
[reprap-play.git] / Makefile
1
2 HRR=/home/reprap
3 SLIC3R=$(HRR)/Slic3r/bin/slic3r
4 SKEINFORGE=python $(HRR)/reprappro-software.git/skeinforge/skeinforge_application/skeinforge_utilities/skeinforge_craft.py
5
6 CWD := $(shell pwd)
7 PLAY ?= $(CWD)
8
9 CONFIG=slic3r-config.ini
10
11 USING_AUTOS ?= filamentspool
12 AUTO_TOPLEVELS := $(foreach m,$(USING_AUTOS),$(shell $(PLAY)/toplevel-find $m))
13
14 scads:          $(addsuffix .auto.scad, $(AUTO_TOPLEVELS))
15 stls:           $(addsuffix .auto.stl, $(AUTO_TOPLEVELS))
16
17 default:
18
19 -include .*.d
20
21 %.stl:          %.scad
22                 openscad -d .$@.d.tmp -o $*.tmp.stl $<
23                 @rm -f $@
24                 @sed -e 's/\.tmp\.stl:/.stl:/' <.$@.d.tmp >.$@.d
25                 @rm .$@.d.tmp
26                 mv -f $*.tmp.stl $@
27
28 %.gcode:        $(CONFIG) %.stl
29                 $(SLIC3R) --load $^ --ignore-nonexistent-config --load $*.slic3r --output $@.tmp
30                 @mv -f $@.tmp $@
31
32 #%.gcode:       %.stl
33 #               $(SKEINFORGE) $<
34
35 %.gcode:        manual-gcode-generator %.m-g
36                 $(PLAY)/$^ >$@.tmp && mv -f $@.tmp $@
37
38 dovecliptest.stl: doveclip.scad
39
40 %.auto.scad: $(PLAY)/toplevel-make Makefile $(PLAY)/toplevel-find
41                 @echo ' write $@'
42                 $< $@ >$@.tmp
43                 @mv -f $@.tmp $@
44
45 .PRECIOUS:      %.stl %.gcode
46
47 clean:
48                 rm -f *~ *.stl *.auto.scad *.gcode .*.d