Root/atben/Makefile

Source at commit fffa6e9867ae529069b512ba371ab18ad843a155 created 13 years 15 days ago.
By Werner Almesberger, atben/atusb: added -pcb to PCB fab archives; added "upload" target
1PLOT_BRD = pcbnew --plot=ps_a4 --ps-pads-drill-opt=none --fill-all-zones
2
3NAME = atben
4VERSION = 110219
5DIR = $(NAME)
6
7.PHONY: all gen generate sch brd xpdf front back clean
8.PHONY: gerber gerbv
9
10all:
11        @echo "make what ? target: gen sch brd xpdf"
12        @exit 1
13
14gen generate:
15        eeschema --plot=ps `pwd`/$(NAME).sch
16        # need scripts
17
18sch:
19        eeschema `pwd`/$(NAME).sch
20
21brd:
22        pcbnew `pwd`/$(NAME).brd
23
24xpdf:
25        xpdf $(NAME).pdf
26
27front: $(NAME)-Front.ps
28        lpr $<
29
30back: $(NAME)-Back.ps
31        lpr $<
32
33# --- Industrial production ---------------------------------------------------
34
35PCB_FILES = README-PCB $(NAME)-PCB_Edges.dxf $(NAME).drl \
36            $(NAME)-SilkS_Front.gto $(NAME)-Mask_Front.gts \
37            $(NAME)-Front.gtl $(NAME)-Back.gbl $(NAME)-Mask_Back.gbs \
38            $(NAME)-PCB_Edges.gbr
39
40gerber:
41        pcbnew --plot=gerber \
42          -l `pcbnew --list-layers $(NAME).brd | tr '\012' ,` \
43          --fill-all-zones $(NAME).brd \
44          --exclude-pcb-edge
45
46fab: gerber
47        pcbnew --plot=dxf -l PCB_Edges $(NAME).brd
48        pcbnew --drill $(NAME).brd
49        tar Ccfz .. $(NAME)-pcb-$(VERSION).tar.gz \
50          $(PCB_FILES:%=$(DIR)/%)
51        cd ..; zip -l $(DIR)/$(NAME)-pcb-$(VERSION).zip \
52          $(PCB_FILES:%=$(DIR)/%)
53
54gerbv:
55        gerbv $(NAME)-Comments.gbr \
56          $(NAME)-SilkS_Front.gto \
57          $(NAME)-SoldP_Front.gtp \
58          $(NAME)-Front.gtl \
59          $(NAME)-Mask_Front.gts \
60          $(NAME)-Back.gbl
61
62upload:
63        qippl $(NAME)-pcb-$(VERSION).tar.gz \
64          $(NAME)-pcb-$(VERSION).zip wpan/fab
65
66# --- DIY production (toner transfer) -----------------------------------------
67
68#
69# Postscript for production of front/back layer, using the toner transfer
70# method. Note that other artwork transfer methods may require different
71# mirror settings.
72#
73# We use --ps-pads-drill-opt=none to avoid having any hole before drilling,
74# which yields the best results with a CNC drill. For manual drilling, "real"
75# would be preferrable. Do not use "small", for this created holes that are
76# larger (!) than designed.
77#
78
79%-Front.ps: %.brd
80        $(PLOT_BRD) -l Front --mirror $<
81
82%-Back.ps: %.brd
83        $(PLOT_BRD) -l Back $<
84
85# --- Cleanup -----------------------------------------------------------------
86
87clean:
88        rm -f $(NAME)-Front.ps $(NAME)-Back.ps
89        rm -f $(NAME).drl $(NAME)-PCB_Edges.gbr $(NAME)-PCB_Edges.dxf
90        rm -f $(NAME)-Front.gtl $(NAME)-Mask_Front.gts
91        rm -f $(NAME)-SilkS_Front.gto $(NAME)-SoldP_Front.gtp
92        rm -f $(NAME)-Back.gbl $(NAME)-Mask_Back.gbs
93        rm -f $(NAME)-SilkS_Back.gbo $(NAME)-SoldP_Back.gbp
94        rm -f $(NAME)-Comments.gbr
95

Archive Download this file



interactive