mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-04 23:14:06 +02:00
cdf3825d24
- Makefile (VERSION, DIR): added board version and parent directory name - Makefile: added generation of Gerbers and other fab files - Makefile (gen): this never worked, changed --plot to --plot=ps - Makefile: added section titles - README-PCB: PCB making instructions
90 lines
2.3 KiB
Makefile
90 lines
2.3 KiB
Makefile
PLOT_BRD = pcbnew --plot=ps_a4 --ps-pads-drill-opt=none --fill-all-zones
|
|
|
|
NAME = atusb
|
|
VERSION = 110214
|
|
DIR = $(NAME)
|
|
|
|
.PHONY: all gen generate sch brd xpdf front back clean
|
|
.PHONY: gerber gerbv fab
|
|
|
|
all:
|
|
@echo "make what ? target: gen sch brd xpdf front back clean"
|
|
@exit 1
|
|
|
|
gen generate:
|
|
eeschema --plot=ps `pwd`/$(NAME).sch
|
|
# need scripts
|
|
|
|
sch:
|
|
eeschema `pwd`/$(NAME).sch
|
|
|
|
brd:
|
|
pcbnew `pwd`/$(NAME).brd
|
|
|
|
xpdf:
|
|
xpdf $(NAME).pdf
|
|
|
|
front: $(NAME)-Front.ps
|
|
lpr $<
|
|
|
|
back: $(NAME)-Back.ps
|
|
lpr $<
|
|
|
|
# --- DIY production (toner transfer) -----------------------------------------
|
|
|
|
#
|
|
# Postscript for production of front/back layer, using the toner transfer
|
|
# method. Note that other artwork transfer methods may require different
|
|
# mirror settings.
|
|
#
|
|
# We use --ps-pads-drill-opt=none to avoid having any hole before drilling,
|
|
# which yields the best results with a CNC drill. For manual drilling, "real"
|
|
# would be preferrable. Do not use "small", for this created holes that are
|
|
# larger (!) than designed.
|
|
#
|
|
|
|
%-Front.ps: %.brd
|
|
$(PLOT_BRD) -l Front --mirror $<
|
|
|
|
%-Back.ps: %.brd
|
|
$(PLOT_BRD) -l Back $<
|
|
|
|
# --- Industrial production ---------------------------------------------------
|
|
|
|
PCB_FILES = README-PCB $(NAME)-PCB_Edges.dxf $(NAME).drl \
|
|
$(NAME)-SilkS_Front.gto $(NAME)-Mask_Front.gts \
|
|
$(NAME)-Front.gtl $(NAME)-Back.gbl $(NAME)-Mask_Back.gbs \
|
|
$(NAME)-PCB_Edges.gbr
|
|
|
|
gerber:
|
|
pcbnew --plot=gerber \
|
|
-l `pcbnew --list-layers $(NAME).brd | tr '\012' ,` \
|
|
--fill-all-zones $(NAME).brd \
|
|
--exclude-pcb-edge
|
|
|
|
fab: gerber
|
|
pcbnew --plot=dxf -l PCB_Edges $(NAME).brd
|
|
pcbnew --drill $(NAME).brd
|
|
tar Ccfz .. $(NAME)-$(VERSION).tar.gz $(PCB_FILES:%=$(DIR)/%)
|
|
cd ..; zip -l $(DIR)/$(NAME)-$(VERSION).zip \
|
|
$(PCB_FILES:%=$(DIR)/%)
|
|
|
|
gerbv:
|
|
gerbv $(NAME)-Comments.gbr \
|
|
$(NAME)-SilkS_Front.gto \
|
|
$(NAME)-SoldP_Front.gtp \
|
|
$(NAME)-Front.gtl \
|
|
$(NAME)-Mask_Front.gts \
|
|
$(NAME)-Back.gbl
|
|
|
|
# --- Cleanup -----------------------------------------------------------------
|
|
|
|
clean:
|
|
rm -f $(NAME)-Front.ps $(NAME)-Back.ps
|
|
rm -f $(NAME).drl $(NAME)-PCB_Edges.gbr $(NAME)-PCB_Edges.dxf
|
|
rm -f $(NAME)-Front.gtl $(NAME)-Mask_Front.gts
|
|
rm -f $(NAME)-SilkS_Front.gto $(NAME)-SoldP_Front.gtp
|
|
rm -f $(NAME)-Back.gbl $(NAME)-Mask_Back.gbs
|
|
rm -f $(NAME)-SilkS_Back.gbo $(NAME)-SoldP_Back.gbp
|
|
rm -f $(NAME)-Comments.gbr
|