forked from tomuta/debian-mini-odroid-c1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uboot.mak
39 lines (28 loc) · 770 Bytes
/
uboot.mak
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
include common.mk
export ARCH := $(UBOOT_ARCH)
export CROSS_COMPILE := $(UBOOT_TC_PREFIX)
export PATH := $(shell pwd)/$(UBOOT_TC_PATH):$(PATH)
UBOOT_BIN := $(UBOOT_SRC)/sd_fuse/uboot.bin
.PHONY: all
all: build
.PHONY: clean
clean:
if test -d "$(UBOOT_SRC)"; then $(MAKE) -C $(UBOOT_SRC) clean ; fi
.PHONY: distclean
distclean:
rm -rf $(wildcard $(UBOOT_TC_DIR) $(UBOOT_SRC))
$(UBOOT_TC_DIR): $(UBOOT_TOOLCHAIN)
mkdir -p $@
tar xJf $(UBOOT_TOOLCHAIN) -C $@
touch $@
$(UBOOT_TOOLCHAIN):
wget -O $@ $(UBOOT_TOOLCHAIN_URL)
touch $@
.PHONY: build
build: $(UBOOT_BIN)
$(UBOOT_BIN): $(UBOOT_TC_DIR) $(UBOOT_SRC)
$(MAKE) -C $(UBOOT_SRC) $(UBOOT_CONFIG)
$(MAKE) -C $(UBOOT_SRC)
touch $@
$(UBOOT_SRC):
git clone --depth=1 $(UBOOT_REPO) -b $(UBOOT_BRANCH) $@