Ricardo Cerqueira | 6ed03ff | 2011-11-28 16:37:47 +0000 | [diff] [blame] | 1 | PRODUCT_BRAND ?= cyanogenmod |
| 2 | |
Steve Kondik | ba1ca33 | 2012-08-21 02:18:40 -0700 | [diff] [blame] | 3 | ifneq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space)) |
Steve Kondik | ba1ca33 | 2012-08-21 02:18:40 -0700 | [diff] [blame] | 4 | # determine the smaller dimension |
| 5 | TARGET_BOOTANIMATION_SIZE := $(shell \ |
Dan Pasanen | a70323c | 2016-08-30 14:52:01 -0500 | [diff] [blame] | 6 | if [ "$(TARGET_SCREEN_WIDTH)" -lt "$(TARGET_SCREEN_HEIGHT)" ]; then \ |
Steve Kondik | ba1ca33 | 2012-08-21 02:18:40 -0700 | [diff] [blame] | 7 | echo $(TARGET_SCREEN_WIDTH); \ |
| 8 | else \ |
| 9 | echo $(TARGET_SCREEN_HEIGHT); \ |
| 10 | fi ) |
| 11 | |
| 12 | # get a sorted list of the sizes |
Steve Kondik | c86fb12 | 2016-11-08 12:40:43 -0800 | [diff] [blame] | 13 | bootanimation_sizes := $(subst .zip,,$(shell ls -1 vendor/cm/prebuilt/common/bootanimation | sort -rn)) |
Steve Kondik | ba1ca33 | 2012-08-21 02:18:40 -0700 | [diff] [blame] | 14 | |
| 15 | # find the appropriate size and set |
| 16 | define check_and_set_bootanimation |
| 17 | $(eval TARGET_BOOTANIMATION_NAME := $(shell \ |
Luca Stefani | aa92150 | 2016-11-13 18:53:07 +0100 | [diff] [blame] | 18 | if [ -z "$(TARGET_BOOTANIMATION_NAME)" ]; then \ |
Dan Pasanen | a70323c | 2016-08-30 14:52:01 -0500 | [diff] [blame] | 19 | if [ "$(1)" -le "$(TARGET_BOOTANIMATION_SIZE)" ]; then \ |
Steve Kondik | ba1ca33 | 2012-08-21 02:18:40 -0700 | [diff] [blame] | 20 | echo $(1); \ |
| 21 | exit 0; \ |
| 22 | fi; |
| 23 | fi; |
| 24 | echo $(TARGET_BOOTANIMATION_NAME); )) |
| 25 | endef |
| 26 | $(foreach size,$(bootanimation_sizes), $(call check_and_set_bootanimation,$(size))) |
| 27 | |
Steven Luo | 367e648 | 2014-01-30 12:51:04 -0800 | [diff] [blame] | 28 | ifeq ($(TARGET_BOOTANIMATION_HALF_RES),true) |
| 29 | PRODUCT_BOOTANIMATION := vendor/cm/prebuilt/common/bootanimation/halfres/$(TARGET_BOOTANIMATION_NAME).zip |
| 30 | else |
William Roberts | 4256e66 | 2013-08-21 13:43:54 -0700 | [diff] [blame] | 31 | PRODUCT_BOOTANIMATION := vendor/cm/prebuilt/common/bootanimation/$(TARGET_BOOTANIMATION_NAME).zip |
Steve Kondik | a894575 | 2012-03-14 00:10:33 -0700 | [diff] [blame] | 32 | endif |
Steven Luo | 367e648 | 2014-01-30 12:51:04 -0800 | [diff] [blame] | 33 | endif |
Steve Kondik | a894575 | 2012-03-14 00:10:33 -0700 | [diff] [blame] | 34 | |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 35 | PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0 |
| 36 | |
Steve Kondik | 5a27f63 | 2013-11-06 13:55:11 -0800 | [diff] [blame] | 37 | ifeq ($(PRODUCT_GMS_CLIENTID_BASE),) |
| 38 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 39 | ro.com.google.clientidbase=android-google |
| 40 | else |
| 41 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 42 | ro.com.google.clientidbase=$(PRODUCT_GMS_CLIENTID_BASE) |
| 43 | endif |
| 44 | |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 45 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 46 | keyguard.no_require_sim=true \ |
| 47 | ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html \ |
| 48 | ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html \ |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 49 | ro.com.android.wifi-watchlist=GoogleGuest \ |
| 50 | ro.setupwizard.enterprise_mode=1 \ |
| 51 | ro.com.android.dateformat=MM-dd-yyyy \ |
| 52 | ro.com.android.dataroaming=false |
| 53 | |
Ricardo Cerqueira | f383563 | 2013-08-04 13:25:00 +0100 | [diff] [blame] | 54 | PRODUCT_PROPERTY_OVERRIDES += \ |
Ricardo Cerqueira | a21887e | 2013-09-25 17:13:25 +0100 | [diff] [blame] | 55 | ro.build.selinux=1 |
Ricardo Cerqueira | f383563 | 2013-08-04 13:25:00 +0100 | [diff] [blame] | 56 | |
Arne Coucheron | 61536d4 | 2016-09-09 00:04:09 +0200 | [diff] [blame] | 57 | # Default notification/alarm sounds |
| 58 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 59 | ro.config.notification_sound=Argon.ogg \ |
Zhao Wei Liew | 805a7a2 | 2016-10-03 15:30:05 +0800 | [diff] [blame] | 60 | ro.config.alarm_alert=Hassium.ogg |
Arne Coucheron | 61536d4 | 2016-09-09 00:04:09 +0200 | [diff] [blame] | 61 | |
Ricardo Cerqueira | ed63484 | 2015-09-12 00:13:01 +0100 | [diff] [blame] | 62 | ifneq ($(TARGET_BUILD_VARIANT),user) |
Steve Kondik | e4f938c | 2014-02-04 22:59:01 -0800 | [diff] [blame] | 63 | # Thank you, please drive thru! |
| 64 | PRODUCT_PROPERTY_OVERRIDES += persist.sys.dun.override=0 |
Ricardo Cerqueira | ed63484 | 2015-09-12 00:13:01 +0100 | [diff] [blame] | 65 | endif |
Steve Kondik | e4f938c | 2014-02-04 22:59:01 -0800 | [diff] [blame] | 66 | |
Chirayu Desai | 88401db | 2013-03-20 16:17:17 +0530 | [diff] [blame] | 67 | ifneq ($(TARGET_BUILD_VARIANT),eng) |
Chirayu Desai | 59df363 | 2013-02-15 21:16:39 +0530 | [diff] [blame] | 68 | # Enable ADB authentication |
| 69 | ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=1 |
Chirayu Desai | 88401db | 2013-03-20 16:17:17 +0530 | [diff] [blame] | 70 | endif |
Chirayu Desai | 59df363 | 2013-02-15 21:16:39 +0530 | [diff] [blame] | 71 | |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 72 | # Copy over the changelog to the device |
| 73 | PRODUCT_COPY_FILES += \ |
| 74 | vendor/cm/CHANGELOG.mkdn:system/etc/CHANGELOG-CM.txt |
| 75 | |
Warren Togami | b1637c8 | 2012-03-03 22:37:42 -1000 | [diff] [blame] | 76 | # Backup Tool |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 77 | PRODUCT_COPY_FILES += \ |
Tom Marshall | 65aff66 | 2014-12-12 11:56:04 -0800 | [diff] [blame] | 78 | vendor/cm/prebuilt/common/bin/backuptool.sh:install/bin/backuptool.sh \ |
| 79 | vendor/cm/prebuilt/common/bin/backuptool.functions:install/bin/backuptool.functions \ |
Ricardo Cerqueira | 129989b | 2012-12-19 01:11:21 +0000 | [diff] [blame] | 80 | vendor/cm/prebuilt/common/bin/50-cm.sh:system/addon.d/50-cm.sh \ |
| 81 | vendor/cm/prebuilt/common/bin/blacklist:system/addon.d/blacklist |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 82 | |
Abhisek Devkota | f1c5ab8 | 2016-07-06 15:18:29 -0700 | [diff] [blame] | 83 | # Backup Services whitelist |
| 84 | PRODUCT_COPY_FILES += \ |
| 85 | vendor/cm/config/permissions/backup.xml:system/etc/sysconfig/backup.xml |
| 86 | |
Ricardo Cerqueira | aff5e54 | 2014-05-09 22:24:12 +0100 | [diff] [blame] | 87 | # Signature compatibility validation |
| 88 | PRODUCT_COPY_FILES += \ |
Tom Marshall | 65aff66 | 2014-12-12 11:56:04 -0800 | [diff] [blame] | 89 | vendor/cm/prebuilt/common/bin/otasigcheck.sh:install/bin/otasigcheck.sh |
Ricardo Cerqueira | aff5e54 | 2014-05-09 22:24:12 +0100 | [diff] [blame] | 90 | |
Steve Kondik | 485527d | 2011-12-20 12:14:24 -0800 | [diff] [blame] | 91 | # init.d support |
| 92 | PRODUCT_COPY_FILES += \ |
| 93 | vendor/cm/prebuilt/common/etc/init.d/00banner:system/etc/init.d/00banner \ |
| 94 | vendor/cm/prebuilt/common/bin/sysinit:system/bin/sysinit |
| 95 | |
Ricardo Cerqueira | fd6bfe7 | 2015-03-16 12:22:11 +0000 | [diff] [blame] | 96 | ifneq ($(TARGET_BUILD_VARIANT),user) |
James Sullins | eb7799c | 2012-04-05 20:18:18 -0500 | [diff] [blame] | 97 | # userinit support |
| 98 | PRODUCT_COPY_FILES += \ |
| 99 | vendor/cm/prebuilt/common/etc/init.d/90userinit:system/etc/init.d/90userinit |
Ricardo Cerqueira | fd6bfe7 | 2015-03-16 12:22:11 +0000 | [diff] [blame] | 100 | endif |
James Sullins | eb7799c | 2012-04-05 20:18:18 -0500 | [diff] [blame] | 101 | |
Ricardo Cerqueira | 8f412cb | 2012-10-18 16:38:25 +0100 | [diff] [blame] | 102 | # CM-specific init file |
| 103 | PRODUCT_COPY_FILES += \ |
| 104 | vendor/cm/prebuilt/common/etc/init.local.rc:root/init.cm.rc |
| 105 | |
herriojr | 5d2c998 | 2015-10-01 11:20:26 -0700 | [diff] [blame] | 106 | # Copy over added mimetype supported in libcore.net.MimeUtils |
| 107 | PRODUCT_COPY_FILES += \ |
| 108 | vendor/cm/prebuilt/common/lib/content-types.properties:system/lib/content-types.properties |
| 109 | |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 110 | # Enable SIP+VoIP on all targets |
| 111 | PRODUCT_COPY_FILES += \ |
Ricardo Cerqueira | 3ff9b6f | 2012-07-11 11:21:50 +0100 | [diff] [blame] | 112 | frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 113 | |
sleeplessninja | 918a7ea | 2013-01-30 14:45:20 -0600 | [diff] [blame] | 114 | # Enable wireless Xbox 360 controller support |
| 115 | PRODUCT_COPY_FILES += \ |
| 116 | frameworks/base/data/keyboards/Vendor_045e_Product_028e.kl:system/usr/keylayout/Vendor_045e_Product_0719.kl |
| 117 | |
Steve Kondik | e0c12da | 2012-03-25 17:21:32 -0700 | [diff] [blame] | 118 | # This is CM! |
| 119 | PRODUCT_COPY_FILES += \ |
| 120 | vendor/cm/config/permissions/com.cyanogenmod.android.xml:system/etc/permissions/com.cyanogenmod.android.xml |
| 121 | |
Arne Coucheron | 61536d4 | 2016-09-09 00:04:09 +0200 | [diff] [blame] | 122 | # Include CM audio files |
| 123 | include vendor/cm/config/cm_audio.mk |
| 124 | |
Michael Bestas | c37028d | 2015-11-03 21:39:04 +0200 | [diff] [blame] | 125 | # Theme engine |
Ricardo Cerqueira | 9f75d84 | 2012-05-04 10:15:56 +0100 | [diff] [blame] | 126 | include vendor/cm/config/themes_common.mk |
| 127 | |
Luca Stefani | 2580197 | 2016-08-27 00:44:50 +0200 | [diff] [blame] | 128 | ifneq ($(TARGET_DISABLE_CMSDK), true) |
Adnan Begovic | f3610f5 | 2016-03-15 14:17:47 -0700 | [diff] [blame] | 129 | # CMSDK |
| 130 | include vendor/cm/config/cmsdk_common.mk |
Luca Stefani | 2580197 | 2016-08-27 00:44:50 +0200 | [diff] [blame] | 131 | endif |
Adnan Begovic | f3610f5 | 2016-03-15 14:17:47 -0700 | [diff] [blame] | 132 | |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 133 | # Required CM packages |
| 134 | PRODUCT_PACKAGES += \ |
Steve Kondik | 4992d38 | 2016-08-29 18:23:03 -0700 | [diff] [blame] | 135 | BluetoothExt \ |
Roman Birg | cdb0ea6 | 2016-07-25 08:45:42 -0700 | [diff] [blame] | 136 | CMAudioService \ |
Steve Kondik | 21e414a | 2016-09-03 05:28:29 -0700 | [diff] [blame] | 137 | CMParts \ |
Steve Kondik | e0c297d | 2011-12-20 16:16:01 -0800 | [diff] [blame] | 138 | Development \ |
d34d | 851457a | 2016-07-20 13:19:32 -0700 | [diff] [blame] | 139 | Profiles \ |
Luis Vidal | 049d4c5 | 2016-08-13 01:32:58 -0700 | [diff] [blame] | 140 | WeatherManagerService |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 141 | |
| 142 | # Optional CM packages |
| 143 | PRODUCT_PACKAGES += \ |
Ricardo Cerqueira | 117984f | 2015-01-04 01:55:24 +0000 | [diff] [blame] | 144 | libemoji \ |
Arne Coucheron | 61536d4 | 2016-09-09 00:04:09 +0200 | [diff] [blame] | 145 | LiveWallpapersPicker \ |
Steve Kondik | df96b44 | 2016-10-13 11:37:08 -0700 | [diff] [blame] | 146 | PhotoTable \ |
| 147 | Terminal |
Koushik Dutta | 8387c32 | 2011-11-26 17:31:19 -0800 | [diff] [blame] | 148 | |
Steve Kondik | dac3785 | 2015-12-01 13:31:45 -0800 | [diff] [blame] | 149 | # Include librsjni explicitly to workaround GMS issue |
| 150 | PRODUCT_PACKAGES += \ |
| 151 | librsjni |
| 152 | |
Steve Kondik | 04a4941 | 2011-12-14 14:02:19 -0800 | [diff] [blame] | 153 | # Custom CM packages |
| 154 | PRODUCT_PACKAGES += \ |
Steve Kondik | c4f6b97 | 2014-12-09 13:29:29 -0800 | [diff] [blame] | 155 | AudioFX \ |
DvTonder | f007403 | 2012-12-30 13:37:40 -0500 | [diff] [blame] | 156 | CMFileManager \ |
Arne Coucheron | 3ae1edd | 2015-11-05 02:35:12 +0100 | [diff] [blame] | 157 | CMSettingsProvider \ |
Steve Kondik | df96b44 | 2016-10-13 11:37:08 -0700 | [diff] [blame] | 158 | CMUpdater \ |
| 159 | CMWallpapers \ |
| 160 | CyanogenSetupWizard \ |
| 161 | Eleven \ |
d34d | 2cf159c | 2016-03-08 09:12:04 -0800 | [diff] [blame] | 162 | ExactCalculator \ |
Steve Kondik | df96b44 | 2016-10-13 11:37:08 -0700 | [diff] [blame] | 163 | Launcher3 \ |
Luis Vidal | 6d61d30 | 2016-03-21 10:18:29 -0700 | [diff] [blame] | 164 | LiveLockScreenService \ |
Steve Kondik | df96b44 | 2016-10-13 11:37:08 -0700 | [diff] [blame] | 165 | LockClock \ |
| 166 | Screencast \ |
Arne Coucheron | 61536d4 | 2016-09-09 00:04:09 +0200 | [diff] [blame] | 167 | SoundRecorder \ |
Steve Kondik | df96b44 | 2016-10-13 11:37:08 -0700 | [diff] [blame] | 168 | Trebuchet \ |
| 169 | WallpaperPicker \ |
| 170 | WeatherProvider |
Steve Kondik | 04a4941 | 2011-12-14 14:02:19 -0800 | [diff] [blame] | 171 | |
Abhisek Devkota | cf03e16 | 2016-03-14 12:45:43 -0800 | [diff] [blame] | 172 | # Exchange support |
| 173 | PRODUCT_PACKAGES += \ |
| 174 | Exchange2 |
| 175 | |
Sebastian Schmidt | 7d5de0c | 2012-04-15 11:39:25 +0200 | [diff] [blame] | 176 | # Extra tools in CM |
| 177 | PRODUCT_PACKAGES += \ |
Arne Coucheron | 61536d4 | 2016-09-09 00:04:09 +0200 | [diff] [blame] | 178 | 7z \ |
Arne Coucheron | 61536d4 | 2016-09-09 00:04:09 +0200 | [diff] [blame] | 179 | bash \ |
| 180 | bzip2 \ |
| 181 | curl \ |
Steve Kondik | df96b44 | 2016-10-13 11:37:08 -0700 | [diff] [blame] | 182 | fsck.ntfs \ |
| 183 | gdbserver \ |
| 184 | htop \ |
| 185 | lib7z \ |
| 186 | libsepol \ |
| 187 | micro_bench \ |
| 188 | mke2fs \ |
| 189 | mkfs.ntfs \ |
| 190 | mount.ntfs \ |
| 191 | oprofiled \ |
| 192 | pigz \ |
Arne Coucheron | 61536d4 | 2016-09-09 00:04:09 +0200 | [diff] [blame] | 193 | powertop \ |
Steve Kondik | df96b44 | 2016-10-13 11:37:08 -0700 | [diff] [blame] | 194 | sqlite3 \ |
| 195 | strace \ |
| 196 | tune2fs \ |
Arne Coucheron | 61536d4 | 2016-09-09 00:04:09 +0200 | [diff] [blame] | 197 | unrar \ |
| 198 | unzip \ |
| 199 | vim \ |
| 200 | wget \ |
| 201 | zip |
Sebastian Schmidt | 7d5de0c | 2012-04-15 11:39:25 +0200 | [diff] [blame] | 202 | |
Steve Kondik | 7595620 | 2016-08-07 23:21:29 -0700 | [diff] [blame] | 203 | # Custom off-mode charger |
| 204 | ifneq ($(WITH_CM_CHARGER),false) |
| 205 | PRODUCT_PACKAGES += \ |
| 206 | charger_res_images \ |
| 207 | cm_charger_res_images \ |
| 208 | font_log.png \ |
| 209 | libhealthd.cm |
| 210 | endif |
| 211 | |
| 212 | # ExFAT support |
Scott Mertz | 2911a0e | 2015-11-09 11:35:41 -0800 | [diff] [blame] | 213 | WITH_EXFAT ?= true |
| 214 | ifeq ($(WITH_EXFAT),true) |
| 215 | TARGET_USES_EXFAT := true |
| 216 | PRODUCT_PACKAGES += \ |
| 217 | mount.exfat \ |
| 218 | fsck.exfat \ |
| 219 | mkfs.exfat |
| 220 | endif |
| 221 | |
Chirayu Desai | 8636d67 | 2012-07-19 16:04:25 +0530 | [diff] [blame] | 222 | # Openssh |
| 223 | PRODUCT_PACKAGES += \ |
| 224 | scp \ |
| 225 | sftp \ |
| 226 | ssh \ |
| 227 | sshd \ |
| 228 | sshd_config \ |
| 229 | ssh-keygen \ |
Chirayu Desai | 4bacf67 | 2012-08-19 17:30:04 +0530 | [diff] [blame] | 230 | start-ssh |
| 231 | |
| 232 | # rsync |
| 233 | PRODUCT_PACKAGES += \ |
| 234 | rsync |
Chirayu Desai | 8636d67 | 2012-07-19 16:04:25 +0530 | [diff] [blame] | 235 | |
Michael Bestas | 7d5d16d | 2014-06-10 20:06:48 +0300 | [diff] [blame] | 236 | # Stagefright FFMPEG plugin |
Steve Kondik | b5ee377 | 2016-09-06 03:06:35 -0700 | [diff] [blame] | 237 | PRODUCT_PACKAGES += \ |
| 238 | libffmpeg_extractor \ |
| 239 | libffmpeg_omx \ |
| 240 | media_codecs_ffmpeg.xml |
| 241 | |
| 242 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 243 | media.sf.omx-plugin=libffmpeg_omx.so \ |
| 244 | media.sf.extractor-plugin=libffmpeg_extractor.so |
Steve Kondik | 7c96869 | 2015-07-08 09:53:12 -0700 | [diff] [blame] | 245 | |
Joey Rizzoli | 73a3965 | 2016-11-23 21:19:00 +0100 | [diff] [blame] | 246 | # Storage manager |
| 247 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 248 | ro.storage_manager.enabled=true |
| 249 | |
Zhao Wei Liew | e6ba745 | 2016-10-13 13:57:44 +0800 | [diff] [blame] | 250 | # Telephony |
| 251 | PRODUCT_PACKAGES += \ |
| 252 | telephony-ext |
| 253 | |
| 254 | PRODUCT_BOOT_JARS += \ |
| 255 | telephony-ext |
| 256 | |
Ricardo Cerqueira | a21887e | 2013-09-25 17:13:25 +0100 | [diff] [blame] | 257 | # These packages are excluded from user builds |
| 258 | ifneq ($(TARGET_BUILD_VARIANT),user) |
Ricardo Cerqueira | a21887e | 2013-09-25 17:13:25 +0100 | [diff] [blame] | 259 | PRODUCT_PACKAGES += \ |
Steve Kondik | 275701b | 2013-11-06 12:41:34 -0800 | [diff] [blame] | 260 | procmem \ |
| 261 | procrank \ |
Ricardo Cerqueira | a21887e | 2013-09-25 17:13:25 +0100 | [diff] [blame] | 262 | su |
repo Shareef Ali | 4bcfc31 | 2014-12-29 17:52:04 -0600 | [diff] [blame] | 263 | endif |
Ricardo Cerqueira | a21887e | 2013-09-25 17:13:25 +0100 | [diff] [blame] | 264 | |
Ricardo Cerqueira | a21887e | 2013-09-25 17:13:25 +0100 | [diff] [blame] | 265 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 266 | persist.sys.root_access=0 |
| 267 | |
Ricardo Cerqueira | 15c9ef4 | 2016-03-11 14:09:52 +0000 | [diff] [blame] | 268 | DEVICE_PACKAGE_OVERLAYS += vendor/cm/overlay/common |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 269 | |
Dan Pasanen | 6935410 | 2016-08-24 10:19:50 -0500 | [diff] [blame] | 270 | PRODUCT_VERSION_MAJOR = 14 |
Steve Kondik | 7d4f0f2 | 2016-10-25 20:35:15 -0700 | [diff] [blame] | 271 | PRODUCT_VERSION_MINOR = 1 |
Dan Pasanen | 6935410 | 2016-08-24 10:19:50 -0500 | [diff] [blame] | 272 | PRODUCT_VERSION_MAINTENANCE := 0 |
Adrian DC | 3e85bf7 | 2016-08-06 21:47:23 +0200 | [diff] [blame] | 273 | |
Scott Mertz | a995059 | 2016-08-05 12:24:19 -0700 | [diff] [blame] | 274 | ifeq ($(TARGET_VENDOR_SHOW_MAINTENANCE_VERSION),true) |
Adrian DC | 3e85bf7 | 2016-08-06 21:47:23 +0200 | [diff] [blame] | 275 | CM_VERSION_MAINTENANCE := $(PRODUCT_VERSION_MAINTENANCE) |
Scott Mertz | a995059 | 2016-08-05 12:24:19 -0700 | [diff] [blame] | 276 | else |
Adrian DC | 3e85bf7 | 2016-08-06 21:47:23 +0200 | [diff] [blame] | 277 | CM_VERSION_MAINTENANCE := 0 |
Scott Mertz | a995059 | 2016-08-05 12:24:19 -0700 | [diff] [blame] | 278 | endif |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 279 | |
Ricardo Cerqueira | 554f370 | 2013-09-24 17:58:56 +0100 | [diff] [blame] | 280 | # Set CM_BUILDTYPE from the env RELEASE_TYPE, for jenkins compat |
| 281 | |
| 282 | ifndef CM_BUILDTYPE |
| 283 | ifdef RELEASE_TYPE |
| 284 | # Starting with "CM_" is optional |
| 285 | RELEASE_TYPE := $(shell echo $(RELEASE_TYPE) | sed -e 's|^CM_||g') |
| 286 | CM_BUILDTYPE := $(RELEASE_TYPE) |
| 287 | endif |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 288 | endif |
Ricardo Cerqueira | 554f370 | 2013-09-24 17:58:56 +0100 | [diff] [blame] | 289 | |
| 290 | # Filter out random types, so it'll reset to UNOFFICIAL |
| 291 | ifeq ($(filter RELEASE NIGHTLY SNAPSHOT EXPERIMENTAL,$(CM_BUILDTYPE)),) |
| 292 | CM_BUILDTYPE := |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 293 | endif |
| 294 | |
Ricardo Cerqueira | d8e7666 | 2012-06-08 11:08:15 +0100 | [diff] [blame] | 295 | ifdef CM_BUILDTYPE |
Ricardo Cerqueira | 554f370 | 2013-09-24 17:58:56 +0100 | [diff] [blame] | 296 | ifneq ($(CM_BUILDTYPE), SNAPSHOT) |
| 297 | ifdef CM_EXTRAVERSION |
| 298 | # Force build type to EXPERIMENTAL |
| 299 | CM_BUILDTYPE := EXPERIMENTAL |
| 300 | # Remove leading dash from CM_EXTRAVERSION |
| 301 | CM_EXTRAVERSION := $(shell echo $(CM_EXTRAVERSION) | sed 's/-//') |
| 302 | # Add leading dash to CM_EXTRAVERSION |
| 303 | CM_EXTRAVERSION := -$(CM_EXTRAVERSION) |
| 304 | endif |
| 305 | else |
| 306 | ifndef CM_EXTRAVERSION |
| 307 | # Force build type to EXPERIMENTAL, SNAPSHOT mandates a tag |
| 308 | CM_BUILDTYPE := EXPERIMENTAL |
| 309 | else |
| 310 | # Remove leading dash from CM_EXTRAVERSION |
| 311 | CM_EXTRAVERSION := $(shell echo $(CM_EXTRAVERSION) | sed 's/-//') |
| 312 | # Add leading dash to CM_EXTRAVERSION |
| 313 | CM_EXTRAVERSION := -$(CM_EXTRAVERSION) |
| 314 | endif |
Ricardo Cerqueira | d8e7666 | 2012-06-08 11:08:15 +0100 | [diff] [blame] | 315 | endif |
| 316 | else |
| 317 | # If CM_BUILDTYPE is not defined, set to UNOFFICIAL |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 318 | CM_BUILDTYPE := UNOFFICIAL |
Ricardo Cerqueira | d8e7666 | 2012-06-08 11:08:15 +0100 | [diff] [blame] | 319 | CM_EXTRAVERSION := |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 320 | endif |
| 321 | |
Matt Mower | f416839 | 2013-12-13 11:04:14 -0600 | [diff] [blame] | 322 | ifeq ($(CM_BUILDTYPE), UNOFFICIAL) |
| 323 | ifneq ($(TARGET_UNOFFICIAL_BUILD_ID),) |
Michael Bestas | 3bf9ba8 | 2013-12-18 00:22:58 +0200 | [diff] [blame] | 324 | CM_EXTRAVERSION := -$(TARGET_UNOFFICIAL_BUILD_ID) |
Matt Mower | f416839 | 2013-12-13 11:04:14 -0600 | [diff] [blame] | 325 | endif |
| 326 | endif |
| 327 | |
Ricardo Cerqueira | 554f370 | 2013-09-24 17:58:56 +0100 | [diff] [blame] | 328 | ifeq ($(CM_BUILDTYPE), RELEASE) |
Ricardo Cerqueira | ae71f04 | 2013-11-11 00:55:51 +0000 | [diff] [blame] | 329 | ifndef TARGET_VENDOR_RELEASE_BUILD_ID |
| 330 | CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD) |
| 331 | else |
| 332 | ifeq ($(TARGET_BUILD_VARIANT),user) |
Adrian DC | 3e85bf7 | 2016-08-06 21:47:23 +0200 | [diff] [blame] | 333 | ifeq ($(CM_VERSION_MAINTENANCE),0) |
Jessica Wagantall | 79204e6 | 2016-07-14 15:42:08 -0700 | [diff] [blame] | 334 | CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(CM_BUILD) |
| 335 | else |
Adrian DC | 3e85bf7 | 2016-08-06 21:47:23 +0200 | [diff] [blame] | 336 | CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(CM_VERSION_MAINTENANCE)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(CM_BUILD) |
Jessica Wagantall | 79204e6 | 2016-07-14 15:42:08 -0700 | [diff] [blame] | 337 | endif |
Ricardo Cerqueira | ae71f04 | 2013-11-11 00:55:51 +0000 | [diff] [blame] | 338 | else |
| 339 | CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD) |
| 340 | endif |
| 341 | endif |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 342 | else |
Adrian DC | 3e85bf7 | 2016-08-06 21:47:23 +0200 | [diff] [blame] | 343 | ifeq ($(CM_VERSION_MAINTENANCE),0) |
Jessica Wagantall | 79204e6 | 2016-07-14 15:42:08 -0700 | [diff] [blame] | 344 | CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)$(CM_EXTRAVERSION)-$(CM_BUILD) |
| 345 | else |
Adrian DC | 3e85bf7 | 2016-08-06 21:47:23 +0200 | [diff] [blame] | 346 | CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(CM_VERSION_MAINTENANCE)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)$(CM_EXTRAVERSION)-$(CM_BUILD) |
Jessica Wagantall | 79204e6 | 2016-07-14 15:42:08 -0700 | [diff] [blame] | 347 | endif |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 348 | endif |
Koushik Dutta | d69b292 | 2012-02-23 14:07:44 -0800 | [diff] [blame] | 349 | |
| 350 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 351 | ro.cm.version=$(CM_VERSION) \ |
Brint E. Kriebel | af91758 | 2014-07-10 10:31:00 -0700 | [diff] [blame] | 352 | ro.cm.releasetype=$(CM_BUILDTYPE) \ |
Abhisek Devkota | 381a305 | 2013-12-10 04:35:08 -0800 | [diff] [blame] | 353 | ro.modversion=$(CM_VERSION) \ |
NBruderman | 3b7f3d2 | 2015-03-04 12:08:33 +0200 | [diff] [blame] | 354 | ro.cmlegal.url=https://cyngn.com/legal/privacy-policy |
Ricardo Cerqueira | d542274 | 2012-11-13 10:42:11 +0000 | [diff] [blame] | 355 | |
Michael Bestas | 3952f6c | 2016-08-26 01:12:08 +0300 | [diff] [blame] | 356 | ifeq ($(OTA_PACKAGE_SIGNING_KEY),) |
| 357 | PRODUCT_EXTRA_RECOVERY_KEYS += \ |
| 358 | vendor/cm/build/target/product/security/cm \ |
| 359 | vendor/cm/build/target/product/security/cm-devkey |
| 360 | endif |
| 361 | |
Ricardo Cerqueira | 178dbd6 | 2013-10-23 20:56:56 +0100 | [diff] [blame] | 362 | -include vendor/cm-priv/keys/keys.mk |
| 363 | |
Ricardo Cerqueira | 4616137 | 2014-01-09 10:25:31 +0000 | [diff] [blame] | 364 | CM_DISPLAY_VERSION := $(CM_VERSION) |
| 365 | |
Brint E. Kriebel | ac948f5 | 2014-01-24 09:58:36 -0800 | [diff] [blame] | 366 | ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),) |
| 367 | ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),build/target/product/security/testkey) |
Ricardo Cerqueira | 4616137 | 2014-01-09 10:25:31 +0000 | [diff] [blame] | 368 | ifneq ($(CM_BUILDTYPE), UNOFFICIAL) |
| 369 | ifndef TARGET_VENDOR_RELEASE_BUILD_ID |
| 370 | ifneq ($(CM_EXTRAVERSION),) |
Ricardo Cerqueira | 17b2587 | 2014-02-16 17:15:07 +0000 | [diff] [blame] | 371 | # Remove leading dash from CM_EXTRAVERSION |
| 372 | CM_EXTRAVERSION := $(shell echo $(CM_EXTRAVERSION) | sed 's/-//') |
Ricardo Cerqueira | 4616137 | 2014-01-09 10:25:31 +0000 | [diff] [blame] | 373 | TARGET_VENDOR_RELEASE_BUILD_ID := $(CM_EXTRAVERSION) |
| 374 | else |
Ricardo Cerqueira | 17b2587 | 2014-02-16 17:15:07 +0000 | [diff] [blame] | 375 | TARGET_VENDOR_RELEASE_BUILD_ID := $(shell date -u +%Y%m%d) |
Ricardo Cerqueira | 4616137 | 2014-01-09 10:25:31 +0000 | [diff] [blame] | 376 | endif |
| 377 | else |
Ricardo Cerqueira | 17b2587 | 2014-02-16 17:15:07 +0000 | [diff] [blame] | 378 | TARGET_VENDOR_RELEASE_BUILD_ID := $(TARGET_VENDOR_RELEASE_BUILD_ID) |
Ricardo Cerqueira | 4616137 | 2014-01-09 10:25:31 +0000 | [diff] [blame] | 379 | endif |
Adrian DC | 3e85bf7 | 2016-08-06 21:47:23 +0200 | [diff] [blame] | 380 | ifeq ($(CM_VERSION_MAINTENANCE),0) |
Jessica Wagantall | 79204e6 | 2016-07-14 15:42:08 -0700 | [diff] [blame] | 381 | CM_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(CM_BUILD) |
| 382 | else |
Adrian DC | 3e85bf7 | 2016-08-06 21:47:23 +0200 | [diff] [blame] | 383 | CM_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(CM_VERSION_MAINTENANCE)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(CM_BUILD) |
Jessica Wagantall | 79204e6 | 2016-07-14 15:42:08 -0700 | [diff] [blame] | 384 | endif |
| 385 | endif |
Ricardo Cerqueira | 4616137 | 2014-01-09 10:25:31 +0000 | [diff] [blame] | 386 | endif |
Ricardo Cerqueira | 74b4f9b | 2014-01-11 16:00:16 +0000 | [diff] [blame] | 387 | endif |
Ricardo Cerqueira | 4616137 | 2014-01-09 10:25:31 +0000 | [diff] [blame] | 388 | |
| 389 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 390 | ro.cm.display.version=$(CM_DISPLAY_VERSION) |
| 391 | |
Brint E. Kriebel | a1e4912 | 2014-01-31 11:59:56 -0800 | [diff] [blame] | 392 | -include $(WORKSPACE)/build_env/image-auto-bits.mk |
Steve Kondik | 960c4f4 | 2016-09-02 21:11:11 -0700 | [diff] [blame] | 393 | -include vendor/cm/config/partner_gms.mk |
Koushik Dutta | 41fd0aa | 2013-12-07 22:04:17 -0800 | [diff] [blame] | 394 | -include vendor/cyngn/product.mk |
Steve Kondik | b9dd400 | 2014-09-10 15:41:43 -0700 | [diff] [blame] | 395 | |
Chris Sarbora | 39b9aa8 | 2014-12-17 14:41:28 -0800 | [diff] [blame] | 396 | $(call prepend-product-if-exists, vendor/extra/product.mk) |