Root/atben/Makefile

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

Archive Download this file



interactive