chiark / gitweb /
pawn good slic3r settings for use with glass bed
[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 %.auto.scads:
18         $(MAKE) $(addsuffix .auto.scad, $(shell $(PLAY)/toplevel-find $*))
19 %.auto.stls:
20         $(MAKE) $(addsuffix .auto.stl, $(shell $(PLAY)/toplevel-find $*))
21
22 default:
23
24 -include .*.d
25
26 %.stl:          %.scad
27                 openscad -d .$@.d.tmp -o $*.tmp.stl $<
28                 @rm -f $@
29                 @sed -e 's/\.tmp\.stl:/.stl:/' <.$@.d.tmp >.$@.d
30                 @rm .$@.d.tmp
31                 mv -f $*.tmp.stl $@
32
33 %.slic3r:
34
35 %.gcode:        %.stl %.slic3r $(CONFIG)
36                 $(SLIC3R) --load $(CONFIG) \
37                         --ignore-nonexistent-config --load $*.slic3r \
38                         --output $@.tmp $<
39                 @mv -f $@.tmp $@
40
41 #%.gcode:       %.stl
42 #               $(SKEINFORGE) $<
43
44 %.gcode:        manual-gcode-generator %.m-g
45                 $(PLAY)/$^ >$@.tmp && mv -f $@.tmp $@
46
47 dovecliptest.stl: doveclip.scad
48
49 %.auto.scad: $(PLAY)/toplevel-make Makefile $(PLAY)/toplevel-find
50                 @echo ' write $@'
51                 $< $@ >$@.tmp
52                 @mv -f $@.tmp $@
53
54 .PRECIOUS:      %.stl %.gcode
55
56 clean:
57                 rm -f *~ *.stl *.auto.scad *.gcode .*.d