Root/atusb/Makefile

Source at commit fffa6e9867ae529069b512ba371ab18ad843a155 created 8 years 6 months 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 = atusb
4VERSION = 110214
5DIR = $(NAME)
6
7.PHONY: all gen generate sch brd xpdf front back clean
8.PHONY: gerber gerbv fab
9
10all:
11        @echo "make what ? target: gen sch brd xpdf front back clean"
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# --- DIY production (toner transfer) -----------------------------------------
34
35#
36# Postscript for production of front/back layer, using the toner transfer
37# method. Note that other artwork transfer methods may require different
38# mirror settings.
39#
40# We use --ps-pads-drill-opt=none to avoid having any hole before drilling,
41# which yields the best results with a CNC drill. For manual drilling, "real"
42# would be preferrable. Do not use "small", for this created holes that are
43# larger (!) than designed.
44#
45
46%-Front.ps: %.brd
47        $(PLOT_BRD) -l Front --mirror $<
48
49%-Back.ps: %.brd
50        $(PLOT_BRD) -l Back $<
51
52# --- Industrial production ---------------------------------------------------
53
54PCB_FILES = README-PCB $(NAME)-PCB_Edges.dxf $(NAME).drl \
55        $(NAME)-SilkS_Front.gto $(NAME)-Mask_Front.gts \
56        $(NAME)-Front.gtl $(NAME)-Back.gbl $(NAME)-Mask_Back.gbs \
57        $(NAME)-PCB_Edges.gbr
58
59gerber:
60        pcbnew --plot=gerber \
61          -l `pcbnew --list-layers $(NAME).brd | tr '\012' ,` \
62          --fill-all-zones $(NAME).brd \
63          --exclude-pcb-edge
64
65fab: gerber
66        pcbnew --plot=dxf -l PCB_Edges $(NAME).brd
67        pcbnew --drill $(NAME).brd
68        tar Ccfz .. $(NAME)-pcb-$(VERSION).tar.gz \
69          $(PCB_FILES:%=$(DIR)/%)
70        cd ..; zip -l $(DIR)/$(NAME)-pcb-$(VERSION).zip \
71          $(PCB_FILES:%=$(DIR)/%)
72
73gerbv:
74        gerbv $(NAME)-Comments.gbr \
75          $(NAME)-SilkS_Front.gto \
76          $(NAME)-SoldP_Front.gtp \
77          $(NAME)-Front.gtl \
78          $(NAME)-Mask_Front.gts \
79          $(NAME)-Back.gbl
80
81upload:
82        qippl $(NAME)-pcb-$(VERSION).tar.gz \
83          $(NAME)-pcb-$(VERSION).zip wpan/fab
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