summaryrefslogtreecommitdiff
path: root/prototype/mech_pcbs/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'prototype/mech_pcbs/Makefile')
-rw-r--r--prototype/mech_pcbs/Makefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/prototype/mech_pcbs/Makefile b/prototype/mech_pcbs/Makefile
new file mode 100644
index 0000000..10dc53f
--- /dev/null
+++ b/prototype/mech_pcbs/Makefile
@@ -0,0 +1,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