-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
84 lines (63 loc) · 1.57 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
CPUS := "$(shell nproc)"
image = "local/aosp-build:latest"
device = ${DEVICE}
OTA_CHANNEL ?= beta
.DEFAULT_GOAL := default
contain := \
mkdir -p keys build/base && \
mkdir -p keys build/release && \
mkdir -p keys build/external && \
docker run -it --rm -h "android" \
-v $(PWD)/build/base:/home/build/base \
-v $(PWD)/build/release:/home/build/release \
-v $(PWD)/build/external:/home/build/external \
-v $(PWD)/build/.rnd:/home/build/.rnd \
-v $(PWD)/keys:/home/build/keys \
-v $(PWD)/scripts:/home/build/scripts \
-v $(PWD)/config.yml:/home/build/config.yml \
-v $(PWD)/manifests:/home/build/manifests \
-v $(PWD)/patches:/home/build/patches \
-u $(shell id -u):$(shell id -g) \
-e DEVICE=$(device) \
-e OTA_CHANNEL=$(OTA_CHANNEL) \
--cpus $(CPUS) \
$(image)
default: build
manifest:
$(contain) manifest
config: manifest
$(contain) config
fetch: random
docker build -t local/aosp-build .
mkdir -p build
@$(contain) fetch
tools: fetch
@$(contain) tools
random:
test -f $(PWD)/build/.rnd || head -c 1G </dev/urandom > $(PWD)/build/.rnd
keys: tools
@$(contain) keys
build: fetch
@$(contain) build
kernel: tools
@$(contain) build-kernel
vendor: tools
@$(contain) build-vendor
chromium: tools
@$(contain) build-chromium
release: tools
mkdir -p build/release
@$(contain) release
test-repro:
@$(contain) test-repro
test:
@$(contain) test-repro
shell:
@$(contain) shell
diff:
@$(contain) bash -c "cd base; repo diff -u"
clean:
@$(contain) clean
mrproper: clean
rm -rf build
.PHONY: build shell diff install update flash clean tools default