Date:2012-03-23 19:30:09 (7 years 5 months ago)
Author:Werner Almesberger
Commit:fff8177f988b94a4df492e8d535efffba6ecf23d
Message:bacon/case/Makefile: generalized build process for all parts

... plus updated parameters for a new milling run
Files: bacon/case/Makefile (2 diffs)

Change Details

bacon/case/Makefile
88# #2: 5, 45
99# #3: 65, 5
1010# #3: 70, 45
11X0 = 70
12Y0 = 45
13Z1 = -44
11# Z1 = -44
12# PIECE_Z = 5.5
13
14# new run (10 45, 135 85, 7.8)
15# #1: 13 45
16# #2: 75 48
17
18X0 = 75
19Y0 = 48
20Z1 = -50
1421PIECE = -5 -5 30 55
15PIECE_Z = 5.5
22PIECE_Z = 7.9
1623Z_STEP = 2
17CLEARANCE = 5
24CLEARANCE = 2
1825SPEED_XY = 1
1926SPEED_Z = 1
2027OVERSHOOT = 0.2
...... 
2633PARAMS = X0=$(X0)mm Y0=$(Y0)mm Z1=$(Z1)mm PIECE_Z=$(PIECE_Z)mm \
2734     Z_OFFSET=$(Z_OFFSET)mm
2835
36PARTS = top mid bot
37PART = top
38
2939.PHONY: all plot mill pos cng clean
3040
31all: mill.rml finish.rml
41all: $(PART)-mill.rml $(PART)-finish.rml
3242
3343case.gp: case.fpd
3444        fped -g case.fpd || { rm -f $@; exit 1; }
3545
36top.gp: case.gp
37        $(CAMEO)/fped2d2z.pl -r 0=-$(OVERSHOOT) top $^ >$@ || \
46$(PART).gp: case.gp
47        $(CAMEO)/fped2d2z.pl -r 0=-$(OVERSHOOT) $(PART) $^ >$@ || \
3848            { rm -f $@; exit 1; }
3949
40top-piece.gp: top.gp
50$(PART)-piece.gp: $(PART).gp
4151        ./genpiece.pl -r $(PIECE) $< >$@ || { rm -f $@; exit 1; }
4252
43top-area.gp: top-piece.gp top.gp cam.sh Makefile
44        ./cam.sh PART=top CAMEO=$(CAMEO)/cameo $(PARAMS) OUT=$@ || \
53$(PART)-area.gp: $(PART)-piece.gp $(PART).gp cam.sh Makefile
54        ./cam.sh PART=$(PART) CAMEO=$(CAMEO)/cameo $(PARAMS) OUT=$@ || \
4555            { rm -f $@; exit 1; }
4656
47finish.gp: top-piece.gp top.gp cam.sh Makefile
48        ./cam.sh PART=top CAMEO=$(CAMEO)/cameo $(PARAMS) \
57$(PART)-finish.gp: $(PART)-piece.gp $(PART).gp cam.sh Makefile
58        ./cam.sh PART=$(PART) CAMEO=$(CAMEO)/cameo $(PARAMS) \
4959            Z_OFFSET=0mm REVERSE=reverse OUT=$@ || { rm -f $@; exit 1; }
5060
51mill.gp: top-area.gp Makefile
61$(PART)-mill.gp: $(PART)-area.gp Makefile
5262        $(CAMEO)/zstack.pl $(Z1) $(Z_STEP) $< >$@ || \
5363            { rm -f $@; exit 1; }
5464
55mill.rml: mill.gp Makefile
65$(PART)-mill.rml: $(PART)-mill.gp Makefile
5666        $(GP2RML) $(CLEARANCE) $(SPEED_XY) $(SPEED_Z) $< >$@ || \
5767            { rm -f $@; exit 1; }
5868
59finish.rml: finish.gp Makefile
69$(PART)-finish.rml: $(PART)-finish.gp Makefile
6070        $(GP2RML) $(CLEARANCE) $(FIN_SPEED_XY) $(FIN_SPEED_Z) \
6171            $< >$@ || { rm -f $@; exit 1; }
6272
63plot: mill.gp
64        echo 'splot "mill.gp" with lines' | gnuplot -persist
73plot: $(PART)-mill.gp
74        echo 'splot "$(PART)-mill.gp" with lines' | gnuplot -persist
6575
66mill: mill.rml finish.rml
76mill: $(PART)-mill.rml $(PART)-finish.rml
6777        PORT=/dev/ttyUSB0 $(SPOOL) $^
6878
6979pos:
7080        $(CNGT) 0
7181
72cng: mill.gp
82cng: $(PART)-mill.gp
7383        $(CNGT) $(Z1) 10 $<
7484
7585clean:
76        rm -f case.gp top-piece.gp top.gp top-area.gp
77        rm -f mill.gp mill.rml finish.gp finish.rml
86        rm -f case.gp
87        rm -f $(PARTS:%=%-piece.gp) $(PARTS:%=%.gp)
88        rm -f $(PARTS:%=%-area.gp)
89        rm -f $(PARTS:%=%-mill.gp) $(PARTS:%=%-mill.rml)
90        rm -f $(PARTS:%=%-finish.gp) $(PARTS:%=%-finish.rml)

Archive Download the corresponding diff file

Branches:
master



interactive