summaryrefslogtreecommitdiff
path: root/mech/mech.mk
blob: 13b73d71f307e92de5f832f6e414bc0fb4d80fe8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
MECH_BUILD_DIR := $(BUILD_DIR)/mech
PARTS := bottom top back front pcb_case/nut_tolerance_test
STL := $(PARTS:%=$(MECH_BUILD_DIR)/%.stl)
GCODE := $(PARTS:%=$(MECH_BUILD_DIR)/%.gcode)

.PHONY: mech
mech: $(GCODE)

$(BUILD_DIR)/%.gcode: $(BUILD_DIR)/%.stl
	mkdir -p $(dir $@)
	prusa-slicer --output $@ --export-gcode $<

$(BUILD_DIR)/%.stl: %.scad
	mkdir -p $(dir $@)
	openscad --hardwarnings --export-format binstl -o $@ $<

.PHONY: clean
clean:
	rm -rf $(BUILD_DIR)