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 \ |
| 6 | if [ $(TARGET_SCREEN_WIDTH) -lt $(TARGET_SCREEN_HEIGHT) ]; then \ |
| 7 | echo $(TARGET_SCREEN_WIDTH); \ |
| 8 | else \ |
| 9 | echo $(TARGET_SCREEN_HEIGHT); \ |
| 10 | fi ) |
| 11 | |
| 12 | # get a sorted list of the sizes |
| 13 | bootanimation_sizes := $(subst .zip,, $(shell ls vendor/cm/prebuilt/common/bootanimation)) |
| 14 | bootanimation_sizes := $(shell echo -e $(subst $(space),'\n',$(bootanimation_sizes)) | sort -rn) |
| 15 | |
| 16 | # find the appropriate size and set |
| 17 | define check_and_set_bootanimation |
| 18 | $(eval TARGET_BOOTANIMATION_NAME := $(shell \ |
| 19 | if [ -z "$(TARGET_BOOTANIMATION_NAME)" ]; then |
| 20 | if [ $(1) -le $(TARGET_BOOTANIMATION_SIZE) ]; then \ |
| 21 | echo $(1); \ |
| 22 | exit 0; \ |
| 23 | fi; |
| 24 | fi; |
| 25 | echo $(TARGET_BOOTANIMATION_NAME); )) |
| 26 | endef |
| 27 | $(foreach size,$(bootanimation_sizes), $(call check_and_set_bootanimation,$(size))) |
| 28 | |
Steven Luo | 367e648 | 2014-01-30 12:51:04 -0800 | [diff] [blame] | 29 | ifeq ($(TARGET_BOOTANIMATION_HALF_RES),true) |
| 30 | PRODUCT_BOOTANIMATION := vendor/cm/prebuilt/common/bootanimation/halfres/$(TARGET_BOOTANIMATION_NAME).zip |
| 31 | else |
William Roberts | 4256e66 | 2013-08-21 13:43:54 -0700 | [diff] [blame] | 32 | PRODUCT_BOOTANIMATION := vendor/cm/prebuilt/common/bootanimation/$(TARGET_BOOTANIMATION_NAME).zip |
Steve Kondik | a894575 | 2012-03-14 00:10:33 -0700 | [diff] [blame] | 33 | endif |
Steven Luo | 367e648 | 2014-01-30 12:51:04 -0800 | [diff] [blame] | 34 | endif |
Steve Kondik | a894575 | 2012-03-14 00:10:33 -0700 | [diff] [blame] | 35 | |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 36 | ifdef CM_NIGHTLY |
| 37 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 38 | ro.rommanager.developerid=cyanogenmodnightly |
| 39 | else |
| 40 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 41 | ro.rommanager.developerid=cyanogenmod |
| 42 | endif |
| 43 | |
| 44 | PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0 |
| 45 | |
Steve Kondik | 5a27f63 | 2013-11-06 13:55:11 -0800 | [diff] [blame] | 46 | ifeq ($(PRODUCT_GMS_CLIENTID_BASE),) |
| 47 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 48 | ro.com.google.clientidbase=android-google |
| 49 | else |
| 50 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 51 | ro.com.google.clientidbase=$(PRODUCT_GMS_CLIENTID_BASE) |
| 52 | endif |
| 53 | |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 54 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 55 | keyguard.no_require_sim=true \ |
| 56 | ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html \ |
| 57 | 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] | 58 | ro.com.android.wifi-watchlist=GoogleGuest \ |
| 59 | ro.setupwizard.enterprise_mode=1 \ |
| 60 | ro.com.android.dateformat=MM-dd-yyyy \ |
| 61 | ro.com.android.dataroaming=false |
| 62 | |
Ricardo Cerqueira | f383563 | 2013-08-04 13:25:00 +0100 | [diff] [blame] | 63 | PRODUCT_PROPERTY_OVERRIDES += \ |
Ricardo Cerqueira | a21887e | 2013-09-25 17:13:25 +0100 | [diff] [blame] | 64 | ro.build.selinux=1 |
Ricardo Cerqueira | f383563 | 2013-08-04 13:25:00 +0100 | [diff] [blame] | 65 | |
Ricardo Cerqueira | ed63484 | 2015-09-12 00:13:01 +0100 | [diff] [blame] | 66 | ifneq ($(TARGET_BUILD_VARIANT),user) |
Steve Kondik | e4f938c | 2014-02-04 22:59:01 -0800 | [diff] [blame] | 67 | # Thank you, please drive thru! |
| 68 | PRODUCT_PROPERTY_OVERRIDES += persist.sys.dun.override=0 |
Ricardo Cerqueira | ed63484 | 2015-09-12 00:13:01 +0100 | [diff] [blame] | 69 | endif |
Steve Kondik | e4f938c | 2014-02-04 22:59:01 -0800 | [diff] [blame] | 70 | |
Chirayu Desai | 88401db | 2013-03-20 16:17:17 +0530 | [diff] [blame] | 71 | ifneq ($(TARGET_BUILD_VARIANT),eng) |
Chirayu Desai | 59df363 | 2013-02-15 21:16:39 +0530 | [diff] [blame] | 72 | # Enable ADB authentication |
| 73 | ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=1 |
Chirayu Desai | 88401db | 2013-03-20 16:17:17 +0530 | [diff] [blame] | 74 | endif |
Chirayu Desai | 59df363 | 2013-02-15 21:16:39 +0530 | [diff] [blame] | 75 | |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 76 | # Copy over the changelog to the device |
| 77 | PRODUCT_COPY_FILES += \ |
| 78 | vendor/cm/CHANGELOG.mkdn:system/etc/CHANGELOG-CM.txt |
| 79 | |
Warren Togami | b1637c8 | 2012-03-03 22:37:42 -1000 | [diff] [blame] | 80 | # Backup Tool |
Steve Kondik | bc68cf2 | 2013-10-06 22:41:52 -0700 | [diff] [blame] | 81 | ifneq ($(WITH_GMS),true) |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 82 | PRODUCT_COPY_FILES += \ |
Tom Marshall | 65aff66 | 2014-12-12 11:56:04 -0800 | [diff] [blame] | 83 | vendor/cm/prebuilt/common/bin/backuptool.sh:install/bin/backuptool.sh \ |
| 84 | vendor/cm/prebuilt/common/bin/backuptool.functions:install/bin/backuptool.functions \ |
Ricardo Cerqueira | 129989b | 2012-12-19 01:11:21 +0000 | [diff] [blame] | 85 | vendor/cm/prebuilt/common/bin/50-cm.sh:system/addon.d/50-cm.sh \ |
| 86 | vendor/cm/prebuilt/common/bin/blacklist:system/addon.d/blacklist |
Steve Kondik | bc68cf2 | 2013-10-06 22:41:52 -0700 | [diff] [blame] | 87 | endif |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 88 | |
Ricardo Cerqueira | aff5e54 | 2014-05-09 22:24:12 +0100 | [diff] [blame] | 89 | # Signature compatibility validation |
| 90 | PRODUCT_COPY_FILES += \ |
Tom Marshall | 65aff66 | 2014-12-12 11:56:04 -0800 | [diff] [blame] | 91 | vendor/cm/prebuilt/common/bin/otasigcheck.sh:install/bin/otasigcheck.sh |
Ricardo Cerqueira | aff5e54 | 2014-05-09 22:24:12 +0100 | [diff] [blame] | 92 | |
Steve Kondik | 485527d | 2011-12-20 12:14:24 -0800 | [diff] [blame] | 93 | # init.d support |
| 94 | PRODUCT_COPY_FILES += \ |
| 95 | vendor/cm/prebuilt/common/etc/init.d/00banner:system/etc/init.d/00banner \ |
| 96 | vendor/cm/prebuilt/common/bin/sysinit:system/bin/sysinit |
| 97 | |
Ricardo Cerqueira | fd6bfe7 | 2015-03-16 12:22:11 +0000 | [diff] [blame] | 98 | ifneq ($(TARGET_BUILD_VARIANT),user) |
James Sullins | eb7799c | 2012-04-05 20:18:18 -0500 | [diff] [blame] | 99 | # userinit support |
| 100 | PRODUCT_COPY_FILES += \ |
| 101 | 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] | 102 | endif |
James Sullins | eb7799c | 2012-04-05 20:18:18 -0500 | [diff] [blame] | 103 | |
Ricardo Cerqueira | 8f412cb | 2012-10-18 16:38:25 +0100 | [diff] [blame] | 104 | # CM-specific init file |
| 105 | PRODUCT_COPY_FILES += \ |
| 106 | vendor/cm/prebuilt/common/etc/init.local.rc:root/init.cm.rc |
| 107 | |
herriojr | 5d2c998 | 2015-10-01 11:20:26 -0700 | [diff] [blame] | 108 | # Copy over added mimetype supported in libcore.net.MimeUtils |
| 109 | PRODUCT_COPY_FILES += \ |
| 110 | vendor/cm/prebuilt/common/lib/content-types.properties:system/lib/content-types.properties |
| 111 | |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 112 | # Enable SIP+VoIP on all targets |
| 113 | PRODUCT_COPY_FILES += \ |
Ricardo Cerqueira | 3ff9b6f | 2012-07-11 11:21:50 +0100 | [diff] [blame] | 114 | 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] | 115 | |
sleeplessninja | 918a7ea | 2013-01-30 14:45:20 -0600 | [diff] [blame] | 116 | # Enable wireless Xbox 360 controller support |
| 117 | PRODUCT_COPY_FILES += \ |
| 118 | frameworks/base/data/keyboards/Vendor_045e_Product_028e.kl:system/usr/keylayout/Vendor_045e_Product_0719.kl |
| 119 | |
Steve Kondik | e0c12da | 2012-03-25 17:21:32 -0700 | [diff] [blame] | 120 | # This is CM! |
| 121 | PRODUCT_COPY_FILES += \ |
| 122 | vendor/cm/config/permissions/com.cyanogenmod.android.xml:system/etc/permissions/com.cyanogenmod.android.xml |
| 123 | |
Michael Bestas | c37028d | 2015-11-03 21:39:04 +0200 | [diff] [blame] | 124 | # Theme engine |
Ricardo Cerqueira | 9f75d84 | 2012-05-04 10:15:56 +0100 | [diff] [blame] | 125 | include vendor/cm/config/themes_common.mk |
| 126 | |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 127 | # Required CM packages |
| 128 | PRODUCT_PACKAGES += \ |
Steve Kondik | e0c297d | 2011-12-20 16:16:01 -0800 | [diff] [blame] | 129 | Development \ |
Roman Birg | 52f92f0 | 2015-04-20 18:20:59 -0700 | [diff] [blame] | 130 | BluetoothExt \ |
| 131 | Profiles |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 132 | |
| 133 | # Optional CM packages |
| 134 | PRODUCT_PACKAGES += \ |
Ricardo Cerqueira | 117984f | 2015-01-04 01:55:24 +0000 | [diff] [blame] | 135 | libemoji \ |
| 136 | Terminal |
Koushik Dutta | 8387c32 | 2011-11-26 17:31:19 -0800 | [diff] [blame] | 137 | |
Steve Kondik | dac3785 | 2015-12-01 13:31:45 -0800 | [diff] [blame] | 138 | # Include librsjni explicitly to workaround GMS issue |
| 139 | PRODUCT_PACKAGES += \ |
| 140 | librsjni |
| 141 | |
Steve Kondik | 04a4941 | 2011-12-14 14:02:19 -0800 | [diff] [blame] | 142 | # Custom CM packages |
| 143 | PRODUCT_PACKAGES += \ |
Ricardo Cerqueira | 50dda4c | 2013-11-05 15:26:20 +0000 | [diff] [blame] | 144 | Launcher3 \ |
Michael Bestas | 8deec44 | 2013-12-13 04:54:49 +0200 | [diff] [blame] | 145 | Trebuchet \ |
Steve Kondik | c4f6b97 | 2014-12-09 13:29:29 -0800 | [diff] [blame] | 146 | AudioFX \ |
Ricardo Cerqueira | 3dc4354 | 2012-05-25 04:31:26 +0400 | [diff] [blame] | 147 | CMWallpapers \ |
DvTonder | f007403 | 2012-12-30 13:37:40 -0500 | [diff] [blame] | 148 | CMFileManager \ |
Steve Kondik | fd3b0e5 | 2014-12-09 13:01:09 -0800 | [diff] [blame] | 149 | Eleven \ |
Giulio Cervera | b6f18ff | 2013-08-20 12:53:56 +0200 | [diff] [blame] | 150 | LockClock \ |
Ricardo Cerqueira | 178ca72 | 2013-11-13 21:16:33 +0000 | [diff] [blame] | 151 | CMUpdater \ |
Michael Bestas | 344e448 | 2015-09-26 00:58:10 +0300 | [diff] [blame] | 152 | CyanogenSetupWizard \ |
Arne Coucheron | 3ae1edd | 2015-11-05 02:35:12 +0100 | [diff] [blame] | 153 | CMSettingsProvider \ |
| 154 | ExactCalculator |
Steve Kondik | 04a4941 | 2011-12-14 14:02:19 -0800 | [diff] [blame] | 155 | |
Adnan Begovic | b53c503 | 2015-04-27 16:29:56 -0700 | [diff] [blame] | 156 | # CM Platform Library |
| 157 | PRODUCT_PACKAGES += \ |
Adnan Begovic | aaac132 | 2015-05-05 18:29:29 -0700 | [diff] [blame] | 158 | org.cyanogenmod.platform-res \ |
Adnan Begovic | b53c503 | 2015-04-27 16:29:56 -0700 | [diff] [blame] | 159 | org.cyanogenmod.platform \ |
| 160 | org.cyanogenmod.platform.xml |
Adnan Begovic | b53c503 | 2015-04-27 16:29:56 -0700 | [diff] [blame] | 161 | |
Ricardo Cerqueira | 1780956 | 2013-08-08 00:49:44 +0100 | [diff] [blame] | 162 | # CM Hardware Abstraction Framework |
| 163 | PRODUCT_PACKAGES += \ |
| 164 | org.cyanogenmod.hardware \ |
| 165 | org.cyanogenmod.hardware.xml |
| 166 | |
Sebastian Schmidt | 7d5de0c | 2012-04-15 11:39:25 +0200 | [diff] [blame] | 167 | # Extra tools in CM |
| 168 | PRODUCT_PACKAGES += \ |
Tanguy Pruvot | ac602b4 | 2013-11-24 13:05:59 +0100 | [diff] [blame] | 169 | libsepol \ |
Steve Kondik | 0898028 | 2012-07-05 01:20:47 -0700 | [diff] [blame] | 170 | mke2fs \ |
Steve Kondik | 1949eb5 | 2012-09-20 17:09:07 -0700 | [diff] [blame] | 171 | tune2fs \ |
Steve Kondik | 1949eb5 | 2012-09-20 17:09:07 -0700 | [diff] [blame] | 172 | nano \ |
| 173 | htop \ |
Steve Kondik | 49852a7 | 2015-11-10 15:05:18 +0100 | [diff] [blame] | 174 | mkfs.ntfs \ |
| 175 | fsck.ntfs \ |
| 176 | mount.ntfs \ |
Ricardo Cerqueira | a21887e | 2013-09-25 17:13:25 +0100 | [diff] [blame] | 177 | gdbserver \ |
| 178 | micro_bench \ |
| 179 | oprofiled \ |
Ricardo Cerqueira | a21887e | 2013-09-25 17:13:25 +0100 | [diff] [blame] | 180 | sqlite3 \ |
Steve Kondik | 243e70b | 2015-11-14 21:04:48 +0100 | [diff] [blame] | 181 | strace \ |
| 182 | pigz |
Sebastian Schmidt | 7d5de0c | 2012-04-15 11:39:25 +0200 | [diff] [blame] | 183 | |
Scott Mertz | 2911a0e | 2015-11-09 11:35:41 -0800 | [diff] [blame] | 184 | WITH_EXFAT ?= true |
| 185 | ifeq ($(WITH_EXFAT),true) |
| 186 | TARGET_USES_EXFAT := true |
| 187 | PRODUCT_PACKAGES += \ |
| 188 | mount.exfat \ |
| 189 | fsck.exfat \ |
| 190 | mkfs.exfat |
| 191 | endif |
| 192 | |
Chirayu Desai | 8636d67 | 2012-07-19 16:04:25 +0530 | [diff] [blame] | 193 | # Openssh |
| 194 | PRODUCT_PACKAGES += \ |
| 195 | scp \ |
| 196 | sftp \ |
| 197 | ssh \ |
| 198 | sshd \ |
| 199 | sshd_config \ |
| 200 | ssh-keygen \ |
Chirayu Desai | 4bacf67 | 2012-08-19 17:30:04 +0530 | [diff] [blame] | 201 | start-ssh |
| 202 | |
| 203 | # rsync |
| 204 | PRODUCT_PACKAGES += \ |
| 205 | rsync |
Chirayu Desai | 8636d67 | 2012-07-19 16:04:25 +0530 | [diff] [blame] | 206 | |
Michael Bestas | 7d5d16d | 2014-06-10 20:06:48 +0300 | [diff] [blame] | 207 | # Stagefright FFMPEG plugin |
| 208 | PRODUCT_PACKAGES += \ |
Steve Kondik | 7c96869 | 2015-07-08 09:53:12 -0700 | [diff] [blame] | 209 | libffmpeg_extractor \ |
| 210 | libffmpeg_omx \ |
Steve Kondik | 5970250 | 2015-06-18 02:22:35 -0700 | [diff] [blame] | 211 | media_codecs_ffmpeg.xml |
Michael Bestas | 7d5d16d | 2014-06-10 20:06:48 +0300 | [diff] [blame] | 212 | |
Steve Kondik | 7c96869 | 2015-07-08 09:53:12 -0700 | [diff] [blame] | 213 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 214 | media.sf.omx-plugin=libffmpeg_omx.so \ |
| 215 | media.sf.extractor-plugin=libffmpeg_extractor.so |
| 216 | |
Ricardo Cerqueira | a21887e | 2013-09-25 17:13:25 +0100 | [diff] [blame] | 217 | # These packages are excluded from user builds |
| 218 | ifneq ($(TARGET_BUILD_VARIANT),user) |
Ricardo Cerqueira | a21887e | 2013-09-25 17:13:25 +0100 | [diff] [blame] | 219 | PRODUCT_PACKAGES += \ |
Steve Kondik | 275701b | 2013-11-06 12:41:34 -0800 | [diff] [blame] | 220 | procmem \ |
| 221 | procrank \ |
Ricardo Cerqueira | a21887e | 2013-09-25 17:13:25 +0100 | [diff] [blame] | 222 | su |
repo Shareef Ali | 4bcfc31 | 2014-12-29 17:52:04 -0600 | [diff] [blame] | 223 | endif |
Ricardo Cerqueira | a21887e | 2013-09-25 17:13:25 +0100 | [diff] [blame] | 224 | |
Ricardo Cerqueira | a21887e | 2013-09-25 17:13:25 +0100 | [diff] [blame] | 225 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 226 | persist.sys.root_access=0 |
| 227 | |
Steve Kondik | 254db26 | 2011-12-20 15:02:07 -0800 | [diff] [blame] | 228 | PRODUCT_PACKAGE_OVERLAYS += vendor/cm/overlay/common |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 229 | |
Michael Bestas | eb83dba | 2015-10-07 18:38:03 +0300 | [diff] [blame] | 230 | PRODUCT_VERSION_MAJOR = 13 |
| 231 | PRODUCT_VERSION_MINOR = 0 |
Ricardo Cerqueira | 154d029 | 2013-07-25 01:12:16 +0100 | [diff] [blame] | 232 | PRODUCT_VERSION_MAINTENANCE = 0-RC0 |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 233 | |
Ricardo Cerqueira | 554f370 | 2013-09-24 17:58:56 +0100 | [diff] [blame] | 234 | # Set CM_BUILDTYPE from the env RELEASE_TYPE, for jenkins compat |
| 235 | |
| 236 | ifndef CM_BUILDTYPE |
| 237 | ifdef RELEASE_TYPE |
| 238 | # Starting with "CM_" is optional |
| 239 | RELEASE_TYPE := $(shell echo $(RELEASE_TYPE) | sed -e 's|^CM_||g') |
| 240 | CM_BUILDTYPE := $(RELEASE_TYPE) |
| 241 | endif |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 242 | endif |
Ricardo Cerqueira | 554f370 | 2013-09-24 17:58:56 +0100 | [diff] [blame] | 243 | |
| 244 | # Filter out random types, so it'll reset to UNOFFICIAL |
| 245 | ifeq ($(filter RELEASE NIGHTLY SNAPSHOT EXPERIMENTAL,$(CM_BUILDTYPE)),) |
| 246 | CM_BUILDTYPE := |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 247 | endif |
| 248 | |
Ricardo Cerqueira | d8e7666 | 2012-06-08 11:08:15 +0100 | [diff] [blame] | 249 | ifdef CM_BUILDTYPE |
Ricardo Cerqueira | 554f370 | 2013-09-24 17:58:56 +0100 | [diff] [blame] | 250 | ifneq ($(CM_BUILDTYPE), SNAPSHOT) |
| 251 | ifdef CM_EXTRAVERSION |
| 252 | # Force build type to EXPERIMENTAL |
| 253 | CM_BUILDTYPE := EXPERIMENTAL |
| 254 | # Remove leading dash from CM_EXTRAVERSION |
| 255 | CM_EXTRAVERSION := $(shell echo $(CM_EXTRAVERSION) | sed 's/-//') |
| 256 | # Add leading dash to CM_EXTRAVERSION |
| 257 | CM_EXTRAVERSION := -$(CM_EXTRAVERSION) |
| 258 | endif |
| 259 | else |
| 260 | ifndef CM_EXTRAVERSION |
| 261 | # Force build type to EXPERIMENTAL, SNAPSHOT mandates a tag |
| 262 | CM_BUILDTYPE := EXPERIMENTAL |
| 263 | else |
| 264 | # Remove leading dash from CM_EXTRAVERSION |
| 265 | CM_EXTRAVERSION := $(shell echo $(CM_EXTRAVERSION) | sed 's/-//') |
| 266 | # Add leading dash to CM_EXTRAVERSION |
| 267 | CM_EXTRAVERSION := -$(CM_EXTRAVERSION) |
| 268 | endif |
Ricardo Cerqueira | d8e7666 | 2012-06-08 11:08:15 +0100 | [diff] [blame] | 269 | endif |
| 270 | else |
| 271 | # If CM_BUILDTYPE is not defined, set to UNOFFICIAL |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 272 | CM_BUILDTYPE := UNOFFICIAL |
Ricardo Cerqueira | d8e7666 | 2012-06-08 11:08:15 +0100 | [diff] [blame] | 273 | CM_EXTRAVERSION := |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 274 | endif |
| 275 | |
Matt Mower | f416839 | 2013-12-13 11:04:14 -0600 | [diff] [blame] | 276 | ifeq ($(CM_BUILDTYPE), UNOFFICIAL) |
| 277 | ifneq ($(TARGET_UNOFFICIAL_BUILD_ID),) |
Michael Bestas | 3bf9ba8 | 2013-12-18 00:22:58 +0200 | [diff] [blame] | 278 | CM_EXTRAVERSION := -$(TARGET_UNOFFICIAL_BUILD_ID) |
Matt Mower | f416839 | 2013-12-13 11:04:14 -0600 | [diff] [blame] | 279 | endif |
| 280 | endif |
| 281 | |
Ricardo Cerqueira | 554f370 | 2013-09-24 17:58:56 +0100 | [diff] [blame] | 282 | ifeq ($(CM_BUILDTYPE), RELEASE) |
Ricardo Cerqueira | ae71f04 | 2013-11-11 00:55:51 +0000 | [diff] [blame] | 283 | ifndef TARGET_VENDOR_RELEASE_BUILD_ID |
| 284 | CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD) |
| 285 | else |
| 286 | ifeq ($(TARGET_BUILD_VARIANT),user) |
| 287 | CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(CM_BUILD) |
| 288 | else |
| 289 | CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD) |
| 290 | endif |
| 291 | endif |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 292 | else |
Dan Pasanen | fc25486 | 2015-11-04 14:48:08 -0600 | [diff] [blame] | 293 | CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)$(CM_EXTRAVERSION)-$(CM_BUILD) |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 294 | endif |
Koushik Dutta | d69b292 | 2012-02-23 14:07:44 -0800 | [diff] [blame] | 295 | |
| 296 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 297 | ro.cm.version=$(CM_VERSION) \ |
Brint E. Kriebel | af91758 | 2014-07-10 10:31:00 -0700 | [diff] [blame] | 298 | ro.cm.releasetype=$(CM_BUILDTYPE) \ |
Abhisek Devkota | 381a305 | 2013-12-10 04:35:08 -0800 | [diff] [blame] | 299 | ro.modversion=$(CM_VERSION) \ |
NBruderman | 3b7f3d2 | 2015-03-04 12:08:33 +0200 | [diff] [blame] | 300 | ro.cmlegal.url=https://cyngn.com/legal/privacy-policy |
Ricardo Cerqueira | d542274 | 2012-11-13 10:42:11 +0000 | [diff] [blame] | 301 | |
Ricardo Cerqueira | 178dbd6 | 2013-10-23 20:56:56 +0100 | [diff] [blame] | 302 | -include vendor/cm-priv/keys/keys.mk |
| 303 | |
Ricardo Cerqueira | 4616137 | 2014-01-09 10:25:31 +0000 | [diff] [blame] | 304 | CM_DISPLAY_VERSION := $(CM_VERSION) |
| 305 | |
Brint E. Kriebel | ac948f5 | 2014-01-24 09:58:36 -0800 | [diff] [blame] | 306 | ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),) |
| 307 | ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),build/target/product/security/testkey) |
Ricardo Cerqueira | 4616137 | 2014-01-09 10:25:31 +0000 | [diff] [blame] | 308 | ifneq ($(CM_BUILDTYPE), UNOFFICIAL) |
| 309 | ifndef TARGET_VENDOR_RELEASE_BUILD_ID |
| 310 | ifneq ($(CM_EXTRAVERSION),) |
Ricardo Cerqueira | 17b2587 | 2014-02-16 17:15:07 +0000 | [diff] [blame] | 311 | # Remove leading dash from CM_EXTRAVERSION |
| 312 | CM_EXTRAVERSION := $(shell echo $(CM_EXTRAVERSION) | sed 's/-//') |
Ricardo Cerqueira | 4616137 | 2014-01-09 10:25:31 +0000 | [diff] [blame] | 313 | TARGET_VENDOR_RELEASE_BUILD_ID := $(CM_EXTRAVERSION) |
| 314 | else |
Ricardo Cerqueira | 17b2587 | 2014-02-16 17:15:07 +0000 | [diff] [blame] | 315 | TARGET_VENDOR_RELEASE_BUILD_ID := $(shell date -u +%Y%m%d) |
Ricardo Cerqueira | 4616137 | 2014-01-09 10:25:31 +0000 | [diff] [blame] | 316 | endif |
| 317 | else |
Ricardo Cerqueira | 17b2587 | 2014-02-16 17:15:07 +0000 | [diff] [blame] | 318 | TARGET_VENDOR_RELEASE_BUILD_ID := $(TARGET_VENDOR_RELEASE_BUILD_ID) |
Ricardo Cerqueira | 4616137 | 2014-01-09 10:25:31 +0000 | [diff] [blame] | 319 | endif |
Ricardo Cerqueira | 17b2587 | 2014-02-16 17:15:07 +0000 | [diff] [blame] | 320 | CM_DISPLAY_VERSION=$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID) |
Ricardo Cerqueira | 4616137 | 2014-01-09 10:25:31 +0000 | [diff] [blame] | 321 | endif |
| 322 | endif |
Ricardo Cerqueira | 74b4f9b | 2014-01-11 16:00:16 +0000 | [diff] [blame] | 323 | endif |
Ricardo Cerqueira | 4616137 | 2014-01-09 10:25:31 +0000 | [diff] [blame] | 324 | |
Brint E. Kriebel | e0e8c27 | 2014-05-21 23:37:52 -0700 | [diff] [blame] | 325 | # by default, do not update the recovery with system updates |
| 326 | PRODUCT_PROPERTY_OVERRIDES += persist.sys.recovery_update=false |
| 327 | |
Adnan Begovic | b2bd321 | 2015-06-04 19:23:35 -0700 | [diff] [blame] | 328 | ifndef CM_PLATFORM_SDK_VERSION |
| 329 | # This is the canonical definition of the SDK version, which defines |
| 330 | # the set of APIs and functionality available in the platform. It |
| 331 | # is a single integer that increases monotonically as updates to |
| 332 | # the SDK are released. It should only be incremented when the APIs for |
| 333 | # the new release are frozen (so that developers don't write apps against |
| 334 | # intermediate builds). |
Michael Bestas | eb83dba | 2015-10-07 18:38:03 +0300 | [diff] [blame] | 335 | CM_PLATFORM_SDK_VERSION := 4 |
Adnan Begovic | b2bd321 | 2015-06-04 19:23:35 -0700 | [diff] [blame] | 336 | endif |
| 337 | |
Adnan Begovic | 4534c7a | 2015-08-11 15:51:54 -0700 | [diff] [blame] | 338 | ifndef CM_PLATFORM_REV |
| 339 | # For internal SDK revisions that are hotfixed/patched |
| 340 | # Reset after each CM_PLATFORM_SDK_VERSION release |
| 341 | # If you are doing a release and this is NOT 0, you are almost certainly doing it wrong |
| 342 | CM_PLATFORM_REV := 0 |
| 343 | endif |
| 344 | |
Ricardo Cerqueira | 4616137 | 2014-01-09 10:25:31 +0000 | [diff] [blame] | 345 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 346 | ro.cm.display.version=$(CM_DISPLAY_VERSION) |
| 347 | |
Adnan Begovic | b2bd321 | 2015-06-04 19:23:35 -0700 | [diff] [blame] | 348 | # CyanogenMod Platform SDK Version |
| 349 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 350 | ro.cm.build.version.plat.sdk=$(CM_PLATFORM_SDK_VERSION) |
| 351 | |
Adnan Begovic | 4534c7a | 2015-08-11 15:51:54 -0700 | [diff] [blame] | 352 | # CyanogenMod Platform Internal |
| 353 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 354 | ro.cm.build.version.plat.rev=$(CM_PLATFORM_REV) |
| 355 | |
Brint E. Kriebel | a1e4912 | 2014-01-31 11:59:56 -0800 | [diff] [blame] | 356 | -include $(WORKSPACE)/build_env/image-auto-bits.mk |
Koushik Dutta | 41fd0aa | 2013-12-07 22:04:17 -0800 | [diff] [blame] | 357 | |
| 358 | -include vendor/cyngn/product.mk |
Steve Kondik | b9dd400 | 2014-09-10 15:41:43 -0700 | [diff] [blame] | 359 | |
Chris Sarbora | 39b9aa8 | 2014-12-17 14:41:28 -0800 | [diff] [blame] | 360 | $(call prepend-product-if-exists, vendor/extra/product.mk) |