summaryrefslogtreecommitdiff
path: root/prototype/mech_pcbs/Makefile
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2020-10-29 12:21:13 +0100
committerjaseg <git@jaseg.net>2020-10-29 12:21:31 +0100
commitf7fbcb00162db8b57ce84e9ee0acc78acf6be032 (patch)
tree1d8c001a63d0d547d7d18c44ccbcc2559671895f /prototype/mech_pcbs/Makefile
parentf977fc4f662c365f5b9c8dd4342e02d962f1798d (diff)
downloadihsm-f7fbcb00162db8b57ce84e9ee0acc78acf6be032.tar.gz
ihsm-f7fbcb00162db8b57ce84e9ee0acc78acf6be032.tar.bz2
ihsm-f7fbcb00162db8b57ce84e9ee0acc78acf6be032.zip
Add makefile, update mech foo
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