-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathMakefile
42 lines (28 loc) · 967 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
######################################################################
# 2020 Technexion Ltd. Ubuntu Makefile - DO NOT EDIT #
# Written by: Wig Cheng <wig.cheng@technexion.com> #
######################################################################
BUILD_STEPS := u-boot kernel rootfs image
all: build
pre-u-boot:
pre-kernel:
pre-rootfs:
pre-image:
define BUILD_STEPS_TEMPLATE
build-$(1): pre-$(1)
$$(MAKE) -f $(1).mk build
clean-$(1):
$$(MAKE) -f $(1).mk clean
distclean-$(1):
$$(MAKE) -f $(1).mk distclean
.PHONY: pre-$(1) build-$(1) clean-$(1) distclean-$(1)
endef
$(foreach step,$(BUILD_STEPS),$(eval $(call BUILD_STEPS_TEMPLATE,$(step))))
build: $(addprefix build-,$(BUILD_STEPS))
clean: $(addprefix clean-,$(BUILD_STEPS))
distclean: $(addprefix distclean-,$(BUILD_STEPS))
u-boot: build-u-boot
kernel: build-kernel
rootfs: build-rootfs
image: build-image
.PHONY: all build clean distclean u-boot kernel rootfs