forked from xblax/flashforge_ad5m_klipper_mod
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
58 lines (39 loc) · 1016 Bytes
/
Makefile
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Top Level Makefile for Flashfore AD5M Klipper Mod
SHELL := /bin/bash
BUILD := build_scripts/build.sh
VARIANTS = lite klipperscreen guppyscreen
all: packages checksums
packages: sdk lite klipperscreen guppyscreen uninstall
# SDK targets
sdk: sdk_package
sdk_prepare:
$(BUILD) prepare_sdk
sdk_build: sdk_prepare
$(BUILD) build_sdk
sdk_rebuild: sdk_prepare
$(BUILD) rebuild_sdk
sdk_package: sdk_build
$(BUILD) package_sdk
sdk_clean:
$(BUILD) clean_sdk
# Variant targets
define VARIANT_RULES
$(1): $(1)_package
$(1)_prepare:
$(BUILD) prepare_variant $(1)
$(1)_build: sdk_build $(1)_prepare
$(BUILD) build_variant $(1)
$(1)_rebuild: sdk_build $(1)_prepare
$(BUILD) rebuild_variant $(1)
$(1)_package: $(1)_build
$(BUILD) package_variant $(1)
$(1)_clean:
$(BUILD) clean_variant $(1)
endef
$(foreach variant,$(VARIANTS),$(eval $(call VARIANT_RULES,$(variant))))
# Misc targets
uninstall: uninstall_package
uninstall_package:
$(BUILD) package_uninstall
checksums: packages
$(BUILD) checksums