From ac348c4044e6252da91de247d77484509677cca0 Mon Sep 17 00:00:00 2001 From: xengineering Date: Fri, 22 Dec 2023 21:15:59 +0100 Subject: Switch to repository-global Makefile The build system of this repository should be used from the repository root. Subdirectories should only contain additional *.mk files which will be included by the central Makefile. This should allow to have dependencies between subdirectories if required and easily allows to build everything. --- mech/Makefile | 19 ------------------- mech/mech.mk | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 19 deletions(-) delete mode 100644 mech/Makefile create mode 100644 mech/mech.mk (limited to 'mech') diff --git a/mech/Makefile b/mech/Makefile deleted file mode 100644 index 1f80d35..0000000 --- a/mech/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -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) diff --git a/mech/mech.mk b/mech/mech.mk new file mode 100644 index 0000000..6807c03 --- /dev/null +++ b/mech/mech.mk @@ -0,0 +1,19 @@ +MECH_BUILD_DIR := $(BUILD_DIR)/mech +PARTS := bottom top back front +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 --export-format binstl -o $@ $< + +.PHONY: clean +clean: + rm -rf $(BUILD_DIR) -- cgit v1.2.3-70-g09d2