blob: c885182bd226fc6382d684525d6b83550ba0a2de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
BUILD_DIR := ./build
ARTIFACTS_DIR := $(BUILD_DIR)/artifacts
VERSION := $(shell git describe --dirty --long --always)
TARGET_NAME := soundbox-$(VERSION)
TARGET_DIR := $(ARTIFACTS_DIR)/$(TARGET_NAME)
ARCHIVE := $(ARTIFACTS_DIR)/$(TARGET_NAME).tar.zst
all: $(ARCHIVE)
$(ARCHIVE): $(TARGET_DIR)
tar --zstd -cf $@ -C $(ARTIFACTS_DIR) $(TARGET_NAME)
$(TARGET_DIR): debug
rm -rf $@
mkdir -p $@
install -Dm 644 $(BUILD_DIR)/doc/documentation.pdf $@
install -Dm 644 $(BUILD_DIR)/mech/assembly.gcode $@
install -Dm 644 $(BUILD_DIR)/mech/assembly.stl $@
install -Dm 644 $(BUILD_DIR)/mech/production.gcode $@
install -Dm 644 $(BUILD_DIR)/mech/production.stl $@
install -Dm 644 $(BUILD_DIR)/mech/pcb_case/tolerance_tests.gcode $@
install -Dm 644 $(BUILD_DIR)/mech/pcb_case/tolerance_tests.stl $@
debug: doc mech
.PHONY: clean
clean:
rm -rf $(BUILD_DIR)
include doc/doc.mk
include mech/mech.mk
|