-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
61 lines (44 loc) · 1.48 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
.PHONY: all clean web
BOARDS = cfxsx cfxsx-2280
GITREPO = https://github.com/neg2led/cfxsx
JLCFAB_IGNORE = J1,J2
BOARDSFILES = $(addprefix build/, $(BOARDS:=.kicad_pcb))
SCHFILES = $(addprefix build/, $(BOARDS:=.sch))
GERBERS = $(addprefix build/, $(BOARDS:=-gerber.zip))
JLCGERBERS = $(addprefix build/, $(BOARDS:=-jlcpcb.zip))
RADIUS=1
all: $(GERBERS) $(JLCGERBERS) build/web/index.html
build/cfxsx.kicad_pcb: cfxsx/cfxsx.kicad_pcb build
kikit panelize extractboard -s 135 50 30 62 $< $@
build/cfxsx-2280.kicad_pcb: cfxsx/cfxsx-2280.kicad_pcb build
kikit panelize extractboard -s 135 50 30 100 $< $@
build/cfxsx.sch: cfxsx/cfxsx.kicad_pcb build
cp cfxsx/cfxsx.sch $@
build/cfxsx-2280.sch: cfxsx/cfxsx-2280.kicad_pcb build
cp cfxsx/cfxsx.sch $@
%-gerber: %.kicad_pcb
kikit export gerber $< $@
%-gerber.zip: %-gerber
zip -j $@ `find $<`
%-jlcpcb: %.sch %.kicad_pcb
kikit fab jlcpcb --assembly --ignore $(JLCFAB_IGNORE) --schematic $^ $@
%-jlcpcb.zip: %-jlcpcb
zip -j $@ `find $<`
web: build/web/index.html
build:
mkdir -p build
build/web: build
mkdir -p build/web
build/web/index.html: build/web $(BOARDSFILES)
kikit present boardpage \
-d README.md \
--name "CFexpress to M.2 adapter" \
-b "CFexpress to M.2 2230/42" "Board" build/cfxsx.kicad_pcb \
-b "CFexpress to M.2 2230/42/60/80" "Board" build/cfxsx-2280.kicad_pcb \
-r "assets/cfxsx.png" \
-r "assets/cfxsx-bottom.png" \
-r "assets/cfxsx-top.png" \
--repository "$(GITREPO)"\
build/web
clean:
rm -r build