summaryrefslogtreecommitdiff
path: root/prototype/mech_pcbs/Makefile
blob: 10dc53fb30f9c187086c67d396efe525a83d41ef (plain)
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
PROJECT := rotohsm

BUILDDIR ?= build

ZIP ?= zip

BOARDS := \
	bearing_mount_middle \
	bearing_mount_top \
	rotor_base_outer_pcb \
	rotor_base_pcb \
	rotor_top_pcb \
	rotor_vstrut_pcb \
	stator_base_pcb \
	stator_raspi_vstrut_pcb \
	stator_top_pcb

VERSION := $(shell git describe --tags --long --dirty)
COMBINED_ZIP := gerber_${PROJECT}_all_${VERSION}.zip

all: $(BUILDDIR)/$(COMBINED_ZIP)

$(BUILDDIR)/gerber_%_${VERSION}.zip: %/gerber
	$(ZIP) -r $@ $^

$(BUILDDIR)/$(COMBINED_ZIP): $(addprefix $(BUILDDIR)/,${BOARDS:%=gerber_%_${VERSION}.zip})
	$(ZIP) -r $@ $^

clean:
	rm -f build/*.zip