summaryrefslogtreecommitdiff
path: root/mech/Makefile
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-12-22 20:45:48 +0100
committerxengineering <me@xengineering.eu>2024-01-02 14:24:06 +0100
commit7224aa0c74ae51f49e87e9c18bc94c2761dadf24 (patch)
treec24030d497b17994abccfa81c807c3610e42e703 /mech/Makefile
parentdea6ba3ed5d3878580cc0c1a9e102528ff7bf998 (diff)
downloadsoundbox-7224aa0c74ae51f49e87e9c18bc94c2761dadf24.tar
soundbox-7224aa0c74ae51f49e87e9c18bc94c2761dadf24.tar.zst
soundbox-7224aa0c74ae51f49e87e9c18bc94c2761dadf24.zip
mech: Add initial state
This code used to be developed outside a Git repository. It is moved here to support the development workflow by frequent commits.
Diffstat (limited to 'mech/Makefile')
-rw-r--r--mech/Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/mech/Makefile b/mech/Makefile
new file mode 100644
index 0000000..1f80d35
--- /dev/null
+++ b/mech/Makefile
@@ -0,0 +1,19 @@
+PARTS := bottom top back front
+BUILD_DIR := ./build
+STL := $(PARTS:%=$(BUILD_DIR)/%.stl)
+GCODE := $(PARTS:%=$(BUILD_DIR)/%.gcode)
+
+.PHONY: all
+all: $(GCODE)
+
+$(BUILD_DIR)/%.gcode: $(BUILD_DIR)/%.stl
+ mkdir -p $(dir $@)
+ prusa-slicer --output $@ --export-gcode $<
+
+$(BUILD_DIR)/%.stl: %.scad
+ mkdir -p $(dir $@)
+ openscad --export-format binstl -o $@ $<
+
+.PHONY: clean
+clean:
+ rm -rf $(BUILD_DIR)