forked from tomuta/debian-mini-odroid-c1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (37 loc) · 1.11 KB
/
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
#
# You need the following packages installed:
# sudo apt-get install build-essential wget git lzop u-boot-tools binfmt-support qemu qemu-user-static debootstrap parted
#
# If you are running 64 bit Ubuntu, you might need to run the following
# commands to be able to launch the 32 bit toolchain:
#
# sudo dpkg --add-architecture i386
# sudo apt-get update
# sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1
#
include common.mk
.PHONY: all
all: build
# Build steps
BUILD_STEPS := uboot linux rootfs
# Prerequesites for each build step
rootfs-pr: build-uboot build-linux
uboot-pr:
linux-pr:
# Build step rule template
define BUILDSTEP_TEMPLATE
.PHONY: build-$(1) clean-$(1) distclean-$(1) $$($(1)-pr)
build-$(1): $(1)-pr
$$(MAKE) -f $(1).mak build
clean-$(1):
$$(MAKE) -f $(1).mak clean
distclean-$(1):
$$(MAKE) -f $(1).mak distclean
endef
$(foreach step,$(BUILD_STEPS),$(eval $(call BUILDSTEP_TEMPLATE,$(step))))
.PHONY: build
build: $(addprefix build-,$(BUILD_STEPS))
.PHONY: clean
clean: $(addprefix clean-,$(BUILD_STEPS))
.PHONY: distclean
distclean: $(addprefix distclean-,$(BUILD_STEPS))