-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
40 lines (32 loc) · 920 Bytes
/
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
PROJECT_NAME = Sensors
OUTPUT_EXTS = -B.Cu.gbl \
-B.Mask.gbs \
-B.Paste.gbp \
-F.Cu.gtl \
-F.Mask.gts \
-F.SilkS.gto \
-F.Paste.gtp \
-Edge.Cuts.gm1 \
.drl \
-all.pos
OUTPUTS = $(addprefix gerbers/$(PROJECT_NAME),$(OUTPUT_EXTS))
OUTPUTS += $(PROJECT_NAME)-ft230x.xml
OUTPUTS += $(PROJECT_NAME)-bom-test.xlsx
OUTPUTS += $(PROJECT_NAME).pdf
OUTPUTS += $(PROJECT_NAME)-layout.pdf
all: Sensors.zip Sensors-seeed.csv
Sensors.csv: Sensors.xml
Sensors-seeed.csv: Sensors.csv
%-Edge_Cuts.gko: %-Edge_Cuts.gm1
cp $< $@
Sensors.zip: Makefile
%.zip: $(OUTPUTS)
test ! -e $@ || rm $@
zip $@ $(OUTPUTS)
%.csv: %.xml
xsltproc -o $@ ./bom2csv.xsl $<
%-seeed.csv: %.csv
awk 'BEGIN { FS=","; OFS=","; } { print $$8,$$2,$$1; }' $< > $@
# This rule will only work with v1.2 of ftdi_eeprom or higher
flash:
ftdi_eeprom --flash-eeprom ftdi_eeprom/ftdi_eeprom.conf