-
Notifications
You must be signed in to change notification settings - Fork 87
/
localvar.mk
135 lines (115 loc) · 3.13 KB
/
localvar.mk
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#
# Currenly the following local variables are used for
# each product to define the behavior for porting
# local-zip-file MUST be defined
# local-out-zip-file
# local-modified-apps
# local-modified-priv-apps
# local-modified-jars
# local-miui-removed-apps
# local-miui-modified-apps
# local-phone-apps
# local-phone-priv-apps
# local-pre-zip
# local-after-zip
# local-density
# local-certificate-dir
# local-target-bit
# See nexus5/makefile as an example
#
ifeq ($(USE_ANDROID_OUT),true)
RELEASE_BIT := 32
ifeq ($(strip $(local-target-bit)),64)
RELEASE_BIT := 64
endif
RELEASE_DENSITY := $(strip $(local-density))
ifeq ($(RELEASE_DENSITY),)
RELEASE_DENSITY := XHDPI
endif
else
PREBUILT_BIT := 32
ifeq ($(strip $(local-target-bit)),64)
PREBUILT_BIT := 64
endif
PREBUILT_DENSITY := $(strip $(local-density))
ifeq ($(PREBUILT_DENSITY),)
PREBUILT_DENSITY := XHDPI
endif
endif
ERR_REPORT :=
VERIFY_OTA :=
ZIP_FILE := $(strip $(local-zip-file))
ifeq ($(ZIP_FILE),)
ERR_REPORT += error-no-zipfile
endif
OUT_ZIP_FILE := $(strip $(local-out-zip-file))
ifeq ($(OUT_ZIP_FILE),)
OUT_ZIP_FILE:= update.zip
endif
MOD_APPS := $(strip $(local-modified-apps))
MOD_MIUI_APPS := $(strip $(local-miui-modified-apps))
MIUI_APP_BLACKLIST := $(MOD_MIUI_APPS) $(strip $(local-miui-removed-apps)) \
$(strip $(local-phone-apps)) $(strip $(local-phone-priv-apps))
PHONE_JARS := $(strip $(local-modified-jars))
VENDOR_APPS := $(strip $(local-phone-apps))
VENDOR_PRIV_APPS := $(strip $(local-phone-priv-apps))
ACT_PRE_ZIP := $(strip $(local-pre-zip))
ACT_PRE_ZIP += pre-zip-misc
ifeq ($(strip $(local-rewrite-skia-lib)),false)
REWRITE_SKIA_LIB := false
else
REWRITE_SKIA_LIB := true
endif
ACT_PRE_ZIP += $(VERIFY_OTA)
ACT_AFTER_ZIP := $(strip $(local-after-zip))
#
# log could be set with 'make -e log=value target' and the value:
# quiet : print information about the make stage and the scripts
# info : print more information related to the running scripts
# verbose: print all information from executed commands
# and the default value is 'info'
log := info
PROG :=
APK_VERBOSE := --verbose
ifeq ($(strip $(log)),verbose)
INFO :=
VERBOSE :=
else
VERBOSE := >/dev/null
APK_VERBOSE := --quiet
ifeq ($(strip $(log)),quiet)
INFO := >/dev/null
endif
endif
# use 'make -e showcommand=true' to print all executed commands, if not
# set, only the scripts are printed. To disable all commands (including
# those scripts), use 'make -s'
ifeq ($(strip $(showcommand)),true)
hide :=
else
hide := @
endif
# variable for local-ota
ifeq ($(strip $(otabase)),)
OTA_BASE := $(shell adb shell getprop ro.build.version.incremental 2>/dev/null | tail -n 1 | sed -e "s/0.\.//" | sed -e "s/://g")
else
OTA_BASE := $(strip $(otabase))
endif
ifeq ($(strip $(otatype)),fullota)
OTA_TYPE := fullota
else
OTA_TYPE := zipfile
endif
ifeq ($(strip $(OTA_BASE)),)
OTA_BASE :=unknown
endif
ifeq ($(strip $(include_thirdpart_app)),true)
INCLUDE_THIRDPART_APP := true
else
INCLUDE_THIRDPART_APP := false
endif
ifeq ($(wildcard $(strip $(local-certificate-dir))),)
CERTIFICATE_DIR := $(PORT_ROOT)/build/security
else
CERTIFICATE_DIR := $(strip $(local-certificate-dir))
endif