-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
77 lines (64 loc) · 1.46 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.PHONY: jlcpcb% panel%.kicad_pcb all
PROJECT := at86rf215-breakout
PCB := $(PROJECT).kicad_pcb
SCHEMATIC := $(PROJECT).sch
KIKIT ?= kikit
all: pcbway_panel_2x2 pcbway_panel_2x3
IGNORES_JLCPCB :=
IGNORES_JLCPCB += J1
IGNORES_JLCPCB += R4
IGNORES_JLCPCB += R5
IGNORES_JLCPCB += RF24
IGNORES_JLCPCB += RF9
IGNORES_JLCPCB += U1
IGNORES_PCBWAY :=
null :=
space := $(null) #
comma := ,
ifneq (,$(strip $(IGNORES_JLCPCB)))
IGNORES_JLCPCB := --ignore $(subst $(space),$(comma),$(IGNORES_JLCPCB))
endif
ifneq (,$(strip $(IGNORES_PCBWAY)))
IGNORES_PCBWAY := --ignore $(subst $(space),$(comma),$(IGNORES_PCBWAY))
endif
panel_2x2.kicad_pcb: $(PCB)
./panelize.py $(PCB) $@ 2
panel_2x3.kicad_pcb: $(PCB)
./panelize.py $(PCB) $@ 3
jlcpcb_panel_2x2: panel_2x2.kicad_pcb
$(KIKIT) fab \
jlcpcb \
--schematic $(SCHEMATIC) \
--assembly \
$(IGNORES_JLCPCB) \
$< \
$@
jlcpcb_panel_2x3: panel_2x3.kicad_pcb
$(KIKIT) fab \
jlcpcb \
--schematic $(SCHEMATIC) \
--assembly \
$(IGNORES_JLCPCB) \
$< \
$@
pcbway_panel_2x2: panel_2x2.kicad_pcb
$(KIKIT) fab \
pcbway \
--schematic $(SCHEMATIC) \
--assembly \
$(IGNORES_PCBWAY) \
--nBoards 4 \
$< \
$@
pcbway_panel_2x3: panel_2x3.kicad_pcb
$(KIKIT) fab \
pcbway \
--schematic $(SCHEMATIC) \
--assembly \
$(IGNORES_PCBWAY) \
--nBoards 6 \
$< \
$@
clean:
rm -f panel_2x2.kicad_pcb panel_2x3.kicad_pcb
rm -rf jlcpcb_panel_2x2 jlcpcb_panel_2x3 pcbway_panel_2x2 pcbway_panel_2x3