Root/atben/Makefile

Source at commit 208f97287a8e164a8368075301298258ba6e8d26 created 9 years 5 months ago.
By Werner Almesberger, atben/Makefile: added targets for generating and reviewing Gerbers
1PLOT_BRD = pcbnew --plot=ps_a4 --ps-pads-drill-opt=none --fill-all-zones
2
3NAME = atben
4
5.PHONY: all gen generate sch brd xpdf front back clean
6.PHONY: gerber gerbv
7
8all:
9        @echo "make what ? target: gen sch brd xpdf"
10        @exit 1
11
12gen generate:
13        eeschema --plot `pwd`/$(NAME).sch
14        # need scripts
15
16sch:
17        eeschema `pwd`/$(NAME).sch
18
19brd:
20        pcbnew `pwd`/$(NAME).brd
21
22xpdf:
23        xpdf $(NAME).pdf
24
25front: $(NAME)-Front.ps
26        lpr $<
27
28back: $(NAME)-Back.ps
29        lpr $<
30
31# this needs more work
32
33gerber:
34        pcbnew --plot=gerber \
35          -l `pcbnew --list-layers atben.brd | tr '\012' ,` \
36          --fill-all-zones $(NAME).brd
37
38gerbv:
39        gerbv $(NAME)-Comments.gbr \
40          $(NAME)-SilkS_Front.gto \
41          $(NAME)-SoldP_Front.gtp \
42          $(NAME)-Front.gtl \
43          $(NAME)-Mask_Front.gts \
44          $(NAME)-Back.gbl \
45          $(NAME)-Mask_Back.gbs
46
47#
48# Postscript for production of front/back layer, using the toner transfer
49# method. Note that other artwork transfer methods may require different
50# mirror settings.
51#
52# We use --ps-pads-drill-opt=none to avoid having any hole before drilling,
53# which yields the best results with a CNC drill. For manual drilling, "real"
54# would be preferrable. Do not use "small", for this created holes that are
55# larger (!) than designed.
56#
57
58%-Front.ps: %.brd
59        $(PLOT_BRD) -l Front --mirror $<
60
61%-Back.ps: %.brd
62        $(PLOT_BRD) -l Back $<
63
64clean:
65        rm -f $(NAME)-Front.ps $(NAME)-Back.ps
66        rm -f $(NAME).drl $(NAME)-PCB_Edges.gbr
67        rm -f $(NAME)-Front.gtl $(NAME)-Mask_Front.gts
68        rm -f $(NAME)-SilkS_Front.gto $(NAME)-SoldP_Front.gtp
69        rm -f $(NAME)-Back.gbl $(NAME)-Mask_Back.gbs
70        rm -f $(NAME)-SilkS_Back.gbo $(NAME)-SoldP_Back.gbp
71        rm -f $(NAME)-Comments.gbr
72

Archive Download this file



interactive