diff options
author | xengineering <me@xengineering.eu> | 2023-12-22 21:15:59 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-01-02 14:24:06 +0100 |
commit | ac348c4044e6252da91de247d77484509677cca0 (patch) | |
tree | 8d5177890446d856af5b2ff86fb9e2adbf9a54cf | |
parent | 7224aa0c74ae51f49e87e9c18bc94c2761dadf24 (diff) | |
download | soundbox-ac348c4044e6252da91de247d77484509677cca0.tar soundbox-ac348c4044e6252da91de247d77484509677cca0.tar.zst soundbox-ac348c4044e6252da91de247d77484509677cca0.zip |
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.
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | mech/mech.mk (renamed from mech/Makefile) | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a94ae02 --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +BUILD_DIR := ./build + +all: mech + +include mech/mech.mk diff --git a/mech/Makefile b/mech/mech.mk index 1f80d35..6807c03 100644 --- a/mech/Makefile +++ b/mech/mech.mk @@ -1,10 +1,10 @@ +MECH_BUILD_DIR := $(BUILD_DIR)/mech PARTS := bottom top back front -BUILD_DIR := ./build -STL := $(PARTS:%=$(BUILD_DIR)/%.stl) -GCODE := $(PARTS:%=$(BUILD_DIR)/%.gcode) +STL := $(PARTS:%=$(MECH_BUILD_DIR)/%.stl) +GCODE := $(PARTS:%=$(MECH_BUILD_DIR)/%.gcode) -.PHONY: all -all: $(GCODE) +.PHONY: mech +mech: $(GCODE) $(BUILD_DIR)/%.gcode: $(BUILD_DIR)/%.stl mkdir -p $(dir $@) |