blob: 00a536cbd0bb9decfc35bcdaecb9f58288fb5f89 [file] [log] [blame]
Ricardo Cerqueira6ed03ff2011-11-28 16:37:47 +00001PRODUCT_BRAND ?= cyanogenmod
2
Steve Kondikba1ca332012-08-21 02:18:40 -07003ifneq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space))
Steve Kondikba1ca332012-08-21 02:18:40 -07004# determine the smaller dimension
5TARGET_BOOTANIMATION_SIZE := $(shell \
Dan Pasanena70323c2016-08-30 14:52:01 -05006 if [ "$(TARGET_SCREEN_WIDTH)" -lt "$(TARGET_SCREEN_HEIGHT)" ]; then \
Steve Kondikba1ca332012-08-21 02:18:40 -07007 echo $(TARGET_SCREEN_WIDTH); \
8 else \
9 echo $(TARGET_SCREEN_HEIGHT); \
10 fi )
11
12# get a sorted list of the sizes
Steve Kondikc86fb122016-11-08 12:40:43 -080013bootanimation_sizes := $(subst .zip,,$(shell ls -1 vendor/cm/prebuilt/common/bootanimation | sort -rn))
Steve Kondikba1ca332012-08-21 02:18:40 -070014
15# find the appropriate size and set
16define check_and_set_bootanimation
17$(eval TARGET_BOOTANIMATION_NAME := $(shell \
18 if [ -z "$(TARGET_BOOTANIMATION_NAME)" ]; then
Dan Pasanena70323c2016-08-30 14:52:01 -050019 if [ "$(1)" -le "$(TARGET_BOOTANIMATION_SIZE)" ]; then \
Steve Kondikba1ca332012-08-21 02:18:40 -070020 echo $(1); \
21 exit 0; \
22 fi;
23 fi;
24 echo $(TARGET_BOOTANIMATION_NAME); ))
25endef
26$(foreach size,$(bootanimation_sizes), $(call check_and_set_bootanimation,$(size)))
27
Steven Luo367e6482014-01-30 12:51:04 -080028ifeq ($(TARGET_BOOTANIMATION_HALF_RES),true)
29PRODUCT_BOOTANIMATION := vendor/cm/prebuilt/common/bootanimation/halfres/$(TARGET_BOOTANIMATION_NAME).zip
30else
William Roberts4256e662013-08-21 13:43:54 -070031PRODUCT_BOOTANIMATION := vendor/cm/prebuilt/common/bootanimation/$(TARGET_BOOTANIMATION_NAME).zip
Steve Kondika8945752012-03-14 00:10:33 -070032endif
Steven Luo367e6482014-01-30 12:51:04 -080033endif
Steve Kondika8945752012-03-14 00:10:33 -070034
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000035ifdef CM_NIGHTLY
36PRODUCT_PROPERTY_OVERRIDES += \
37 ro.rommanager.developerid=cyanogenmodnightly
38else
39PRODUCT_PROPERTY_OVERRIDES += \
40 ro.rommanager.developerid=cyanogenmod
41endif
42
43PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
44
Steve Kondik5a27f632013-11-06 13:55:11 -080045ifeq ($(PRODUCT_GMS_CLIENTID_BASE),)
46PRODUCT_PROPERTY_OVERRIDES += \
47 ro.com.google.clientidbase=android-google
48else
49PRODUCT_PROPERTY_OVERRIDES += \
50 ro.com.google.clientidbase=$(PRODUCT_GMS_CLIENTID_BASE)
51endif
52
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000053PRODUCT_PROPERTY_OVERRIDES += \
54 keyguard.no_require_sim=true \
55 ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html \
56 ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html \
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000057 ro.com.android.wifi-watchlist=GoogleGuest \
58 ro.setupwizard.enterprise_mode=1 \
59 ro.com.android.dateformat=MM-dd-yyyy \
60 ro.com.android.dataroaming=false
61
Ricardo Cerqueiraf3835632013-08-04 13:25:00 +010062PRODUCT_PROPERTY_OVERRIDES += \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +010063 ro.build.selinux=1
Ricardo Cerqueiraf3835632013-08-04 13:25:00 +010064
Arne Coucheron61536d42016-09-09 00:04:09 +020065# Default notification/alarm sounds
66PRODUCT_PROPERTY_OVERRIDES += \
67 ro.config.notification_sound=Argon.ogg \
Zhao Wei Liew805a7a22016-10-03 15:30:05 +080068 ro.config.alarm_alert=Hassium.ogg
Arne Coucheron61536d42016-09-09 00:04:09 +020069
Ricardo Cerqueiraed634842015-09-12 00:13:01 +010070ifneq ($(TARGET_BUILD_VARIANT),user)
Steve Kondike4f938c2014-02-04 22:59:01 -080071# Thank you, please drive thru!
72PRODUCT_PROPERTY_OVERRIDES += persist.sys.dun.override=0
Ricardo Cerqueiraed634842015-09-12 00:13:01 +010073endif
Steve Kondike4f938c2014-02-04 22:59:01 -080074
Chirayu Desai88401db2013-03-20 16:17:17 +053075ifneq ($(TARGET_BUILD_VARIANT),eng)
Chirayu Desai59df3632013-02-15 21:16:39 +053076# Enable ADB authentication
77ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=1
Chirayu Desai88401db2013-03-20 16:17:17 +053078endif
Chirayu Desai59df3632013-02-15 21:16:39 +053079
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000080# Copy over the changelog to the device
81PRODUCT_COPY_FILES += \
82 vendor/cm/CHANGELOG.mkdn:system/etc/CHANGELOG-CM.txt
83
Warren Togamib1637c82012-03-03 22:37:42 -100084# Backup Tool
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000085PRODUCT_COPY_FILES += \
Tom Marshall65aff662014-12-12 11:56:04 -080086 vendor/cm/prebuilt/common/bin/backuptool.sh:install/bin/backuptool.sh \
87 vendor/cm/prebuilt/common/bin/backuptool.functions:install/bin/backuptool.functions \
Ricardo Cerqueira129989b2012-12-19 01:11:21 +000088 vendor/cm/prebuilt/common/bin/50-cm.sh:system/addon.d/50-cm.sh \
89 vendor/cm/prebuilt/common/bin/blacklist:system/addon.d/blacklist
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000090
Abhisek Devkotaf1c5ab82016-07-06 15:18:29 -070091# Backup Services whitelist
92PRODUCT_COPY_FILES += \
93 vendor/cm/config/permissions/backup.xml:system/etc/sysconfig/backup.xml
94
Ricardo Cerqueiraaff5e542014-05-09 22:24:12 +010095# Signature compatibility validation
96PRODUCT_COPY_FILES += \
Tom Marshall65aff662014-12-12 11:56:04 -080097 vendor/cm/prebuilt/common/bin/otasigcheck.sh:install/bin/otasigcheck.sh
Ricardo Cerqueiraaff5e542014-05-09 22:24:12 +010098
Steve Kondik485527d2011-12-20 12:14:24 -080099# init.d support
100PRODUCT_COPY_FILES += \
101 vendor/cm/prebuilt/common/etc/init.d/00banner:system/etc/init.d/00banner \
102 vendor/cm/prebuilt/common/bin/sysinit:system/bin/sysinit
103
Ricardo Cerqueirafd6bfe72015-03-16 12:22:11 +0000104ifneq ($(TARGET_BUILD_VARIANT),user)
James Sullinseb7799c2012-04-05 20:18:18 -0500105# userinit support
106PRODUCT_COPY_FILES += \
107 vendor/cm/prebuilt/common/etc/init.d/90userinit:system/etc/init.d/90userinit
Ricardo Cerqueirafd6bfe72015-03-16 12:22:11 +0000108endif
James Sullinseb7799c2012-04-05 20:18:18 -0500109
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +0100110# CM-specific init file
111PRODUCT_COPY_FILES += \
112 vendor/cm/prebuilt/common/etc/init.local.rc:root/init.cm.rc
113
herriojr5d2c9982015-10-01 11:20:26 -0700114# Copy over added mimetype supported in libcore.net.MimeUtils
115PRODUCT_COPY_FILES += \
116 vendor/cm/prebuilt/common/lib/content-types.properties:system/lib/content-types.properties
117
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000118# Enable SIP+VoIP on all targets
119PRODUCT_COPY_FILES += \
Ricardo Cerqueira3ff9b6f2012-07-11 11:21:50 +0100120 frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000121
sleeplessninja918a7ea2013-01-30 14:45:20 -0600122# Enable wireless Xbox 360 controller support
123PRODUCT_COPY_FILES += \
124 frameworks/base/data/keyboards/Vendor_045e_Product_028e.kl:system/usr/keylayout/Vendor_045e_Product_0719.kl
125
Steve Kondike0c12da2012-03-25 17:21:32 -0700126# This is CM!
127PRODUCT_COPY_FILES += \
128 vendor/cm/config/permissions/com.cyanogenmod.android.xml:system/etc/permissions/com.cyanogenmod.android.xml
129
Arne Coucheron61536d42016-09-09 00:04:09 +0200130# Include CM audio files
131include vendor/cm/config/cm_audio.mk
132
Michael Bestasc37028d2015-11-03 21:39:04 +0200133# Theme engine
Ricardo Cerqueira9f75d842012-05-04 10:15:56 +0100134include vendor/cm/config/themes_common.mk
135
Luca Stefani25801972016-08-27 00:44:50 +0200136ifneq ($(TARGET_DISABLE_CMSDK), true)
Adnan Begovicf3610f52016-03-15 14:17:47 -0700137# CMSDK
138include vendor/cm/config/cmsdk_common.mk
Luca Stefani25801972016-08-27 00:44:50 +0200139endif
Adnan Begovicf3610f52016-03-15 14:17:47 -0700140
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000141# Required CM packages
142PRODUCT_PACKAGES += \
Steve Kondik4992d382016-08-29 18:23:03 -0700143 BluetoothExt \
Roman Birgcdb0ea62016-07-25 08:45:42 -0700144 CMAudioService \
Steve Kondik21e414a2016-09-03 05:28:29 -0700145 CMParts \
Steve Kondike0c297d2011-12-20 16:16:01 -0800146 Development \
d34d851457a2016-07-20 13:19:32 -0700147 Profiles \
Luis Vidal049d4c52016-08-13 01:32:58 -0700148 WeatherManagerService
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000149
150# Optional CM packages
151PRODUCT_PACKAGES += \
Ricardo Cerqueira117984f2015-01-04 01:55:24 +0000152 libemoji \
Arne Coucheron61536d42016-09-09 00:04:09 +0200153 LiveWallpapersPicker \
Steve Kondikdf96b442016-10-13 11:37:08 -0700154 PhotoTable \
155 Terminal
Koushik Dutta8387c322011-11-26 17:31:19 -0800156
Steve Kondikdac37852015-12-01 13:31:45 -0800157# Include librsjni explicitly to workaround GMS issue
158PRODUCT_PACKAGES += \
159 librsjni
160
Steve Kondik04a49412011-12-14 14:02:19 -0800161# Custom CM packages
162PRODUCT_PACKAGES += \
Steve Kondikc4f6b972014-12-09 13:29:29 -0800163 AudioFX \
DvTonderf0074032012-12-30 13:37:40 -0500164 CMFileManager \
Arne Coucheron3ae1edd2015-11-05 02:35:12 +0100165 CMSettingsProvider \
Steve Kondikdf96b442016-10-13 11:37:08 -0700166 CMUpdater \
167 CMWallpapers \
168 CyanogenSetupWizard \
169 Eleven \
d34d2cf159c2016-03-08 09:12:04 -0800170 ExactCalculator \
Steve Kondikdf96b442016-10-13 11:37:08 -0700171 Launcher3 \
Luis Vidal6d61d302016-03-21 10:18:29 -0700172 LiveLockScreenService \
Steve Kondikdf96b442016-10-13 11:37:08 -0700173 LockClock \
174 Screencast \
Arne Coucheron61536d42016-09-09 00:04:09 +0200175 SoundRecorder \
Steve Kondikdf96b442016-10-13 11:37:08 -0700176 Trebuchet \
177 WallpaperPicker \
178 WeatherProvider
Steve Kondik04a49412011-12-14 14:02:19 -0800179
Abhisek Devkotacf03e162016-03-14 12:45:43 -0800180# Exchange support
181PRODUCT_PACKAGES += \
182 Exchange2
183
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200184# Extra tools in CM
185PRODUCT_PACKAGES += \
Arne Coucheron61536d42016-09-09 00:04:09 +0200186 7z \
Arne Coucheron61536d42016-09-09 00:04:09 +0200187 bash \
188 bzip2 \
189 curl \
Steve Kondikdf96b442016-10-13 11:37:08 -0700190 fsck.ntfs \
191 gdbserver \
192 htop \
193 lib7z \
194 libsepol \
195 micro_bench \
196 mke2fs \
197 mkfs.ntfs \
198 mount.ntfs \
199 oprofiled \
200 pigz \
Arne Coucheron61536d42016-09-09 00:04:09 +0200201 powertop \
Steve Kondikdf96b442016-10-13 11:37:08 -0700202 sqlite3 \
203 strace \
204 tune2fs \
Arne Coucheron61536d42016-09-09 00:04:09 +0200205 unrar \
206 unzip \
207 vim \
208 wget \
209 zip
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200210
Steve Kondik75956202016-08-07 23:21:29 -0700211# Custom off-mode charger
212ifneq ($(WITH_CM_CHARGER),false)
213PRODUCT_PACKAGES += \
214 charger_res_images \
215 cm_charger_res_images \
216 font_log.png \
217 libhealthd.cm
218endif
219
220# ExFAT support
Scott Mertz2911a0e2015-11-09 11:35:41 -0800221WITH_EXFAT ?= true
222ifeq ($(WITH_EXFAT),true)
223TARGET_USES_EXFAT := true
224PRODUCT_PACKAGES += \
225 mount.exfat \
226 fsck.exfat \
227 mkfs.exfat
228endif
229
Chirayu Desai8636d672012-07-19 16:04:25 +0530230# Openssh
231PRODUCT_PACKAGES += \
232 scp \
233 sftp \
234 ssh \
235 sshd \
236 sshd_config \
237 ssh-keygen \
Chirayu Desai4bacf672012-08-19 17:30:04 +0530238 start-ssh
239
240# rsync
241PRODUCT_PACKAGES += \
242 rsync
Chirayu Desai8636d672012-07-19 16:04:25 +0530243
Michael Bestas7d5d16d2014-06-10 20:06:48 +0300244# Stagefright FFMPEG plugin
Steve Kondikb5ee3772016-09-06 03:06:35 -0700245PRODUCT_PACKAGES += \
246 libffmpeg_extractor \
247 libffmpeg_omx \
248 media_codecs_ffmpeg.xml
249
250PRODUCT_PROPERTY_OVERRIDES += \
251 media.sf.omx-plugin=libffmpeg_omx.so \
252 media.sf.extractor-plugin=libffmpeg_extractor.so
Steve Kondik7c968692015-07-08 09:53:12 -0700253
Zhao Wei Liewe6ba7452016-10-13 13:57:44 +0800254# Telephony
255PRODUCT_PACKAGES += \
256 telephony-ext
257
258PRODUCT_BOOT_JARS += \
259 telephony-ext
260
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100261# These packages are excluded from user builds
262ifneq ($(TARGET_BUILD_VARIANT),user)
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100263PRODUCT_PACKAGES += \
Steve Kondik275701b2013-11-06 12:41:34 -0800264 procmem \
265 procrank \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100266 su
repo Shareef Ali4bcfc312014-12-29 17:52:04 -0600267endif
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100268
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100269PRODUCT_PROPERTY_OVERRIDES += \
270 persist.sys.root_access=0
271
Ricardo Cerqueira15c9ef42016-03-11 14:09:52 +0000272DEVICE_PACKAGE_OVERLAYS += vendor/cm/overlay/common
Koushik Duttac6f7a492011-11-28 07:44:23 -0800273
Dan Pasanen69354102016-08-24 10:19:50 -0500274PRODUCT_VERSION_MAJOR = 14
Steve Kondik7d4f0f22016-10-25 20:35:15 -0700275PRODUCT_VERSION_MINOR = 1
Dan Pasanen69354102016-08-24 10:19:50 -0500276PRODUCT_VERSION_MAINTENANCE := 0
Adrian DC3e85bf72016-08-06 21:47:23 +0200277
Scott Mertza9950592016-08-05 12:24:19 -0700278ifeq ($(TARGET_VENDOR_SHOW_MAINTENANCE_VERSION),true)
Adrian DC3e85bf72016-08-06 21:47:23 +0200279 CM_VERSION_MAINTENANCE := $(PRODUCT_VERSION_MAINTENANCE)
Scott Mertza9950592016-08-05 12:24:19 -0700280else
Adrian DC3e85bf72016-08-06 21:47:23 +0200281 CM_VERSION_MAINTENANCE := 0
Scott Mertza9950592016-08-05 12:24:19 -0700282endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800283
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100284# Set CM_BUILDTYPE from the env RELEASE_TYPE, for jenkins compat
285
286ifndef CM_BUILDTYPE
287 ifdef RELEASE_TYPE
288 # Starting with "CM_" is optional
289 RELEASE_TYPE := $(shell echo $(RELEASE_TYPE) | sed -e 's|^CM_||g')
290 CM_BUILDTYPE := $(RELEASE_TYPE)
291 endif
Warren Togami2128e2f2012-05-06 19:49:33 -1000292endif
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100293
294# Filter out random types, so it'll reset to UNOFFICIAL
295ifeq ($(filter RELEASE NIGHTLY SNAPSHOT EXPERIMENTAL,$(CM_BUILDTYPE)),)
296 CM_BUILDTYPE :=
Warren Togami2128e2f2012-05-06 19:49:33 -1000297endif
298
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100299ifdef CM_BUILDTYPE
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100300 ifneq ($(CM_BUILDTYPE), SNAPSHOT)
301 ifdef CM_EXTRAVERSION
302 # Force build type to EXPERIMENTAL
303 CM_BUILDTYPE := EXPERIMENTAL
304 # Remove leading dash from CM_EXTRAVERSION
305 CM_EXTRAVERSION := $(shell echo $(CM_EXTRAVERSION) | sed 's/-//')
306 # Add leading dash to CM_EXTRAVERSION
307 CM_EXTRAVERSION := -$(CM_EXTRAVERSION)
308 endif
309 else
310 ifndef CM_EXTRAVERSION
311 # Force build type to EXPERIMENTAL, SNAPSHOT mandates a tag
312 CM_BUILDTYPE := EXPERIMENTAL
313 else
314 # Remove leading dash from CM_EXTRAVERSION
315 CM_EXTRAVERSION := $(shell echo $(CM_EXTRAVERSION) | sed 's/-//')
316 # Add leading dash to CM_EXTRAVERSION
317 CM_EXTRAVERSION := -$(CM_EXTRAVERSION)
318 endif
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100319 endif
320else
321 # If CM_BUILDTYPE is not defined, set to UNOFFICIAL
Warren Togami2128e2f2012-05-06 19:49:33 -1000322 CM_BUILDTYPE := UNOFFICIAL
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100323 CM_EXTRAVERSION :=
Warren Togami2128e2f2012-05-06 19:49:33 -1000324endif
325
Matt Mowerf4168392013-12-13 11:04:14 -0600326ifeq ($(CM_BUILDTYPE), UNOFFICIAL)
327 ifneq ($(TARGET_UNOFFICIAL_BUILD_ID),)
Michael Bestas3bf9ba82013-12-18 00:22:58 +0200328 CM_EXTRAVERSION := -$(TARGET_UNOFFICIAL_BUILD_ID)
Matt Mowerf4168392013-12-13 11:04:14 -0600329 endif
330endif
331
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100332ifeq ($(CM_BUILDTYPE), RELEASE)
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000333 ifndef TARGET_VENDOR_RELEASE_BUILD_ID
334 CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD)
335 else
336 ifeq ($(TARGET_BUILD_VARIANT),user)
Adrian DC3e85bf72016-08-06 21:47:23 +0200337 ifeq ($(CM_VERSION_MAINTENANCE),0)
Jessica Wagantall79204e62016-07-14 15:42:08 -0700338 CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(CM_BUILD)
339 else
Adrian DC3e85bf72016-08-06 21:47:23 +0200340 CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(CM_VERSION_MAINTENANCE)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(CM_BUILD)
Jessica Wagantall79204e62016-07-14 15:42:08 -0700341 endif
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000342 else
343 CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD)
344 endif
345 endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800346else
Adrian DC3e85bf72016-08-06 21:47:23 +0200347 ifeq ($(CM_VERSION_MAINTENANCE),0)
Jessica Wagantall79204e62016-07-14 15:42:08 -0700348 CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)$(CM_EXTRAVERSION)-$(CM_BUILD)
349 else
Adrian DC3e85bf72016-08-06 21:47:23 +0200350 CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(CM_VERSION_MAINTENANCE)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)$(CM_EXTRAVERSION)-$(CM_BUILD)
Jessica Wagantall79204e62016-07-14 15:42:08 -0700351 endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800352endif
Koushik Duttad69b2922012-02-23 14:07:44 -0800353
354PRODUCT_PROPERTY_OVERRIDES += \
355 ro.cm.version=$(CM_VERSION) \
Brint E. Kriebelaf917582014-07-10 10:31:00 -0700356 ro.cm.releasetype=$(CM_BUILDTYPE) \
Abhisek Devkota381a3052013-12-10 04:35:08 -0800357 ro.modversion=$(CM_VERSION) \
NBruderman3b7f3d22015-03-04 12:08:33 +0200358 ro.cmlegal.url=https://cyngn.com/legal/privacy-policy
Ricardo Cerqueirad5422742012-11-13 10:42:11 +0000359
Michael Bestas3952f6c2016-08-26 01:12:08 +0300360ifeq ($(OTA_PACKAGE_SIGNING_KEY),)
361 PRODUCT_EXTRA_RECOVERY_KEYS += \
362 vendor/cm/build/target/product/security/cm \
363 vendor/cm/build/target/product/security/cm-devkey
364endif
365
Ricardo Cerqueira178dbd62013-10-23 20:56:56 +0100366-include vendor/cm-priv/keys/keys.mk
367
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000368CM_DISPLAY_VERSION := $(CM_VERSION)
369
Brint E. Kriebelac948f52014-01-24 09:58:36 -0800370ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),)
371ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),build/target/product/security/testkey)
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000372 ifneq ($(CM_BUILDTYPE), UNOFFICIAL)
373 ifndef TARGET_VENDOR_RELEASE_BUILD_ID
374 ifneq ($(CM_EXTRAVERSION),)
Ricardo Cerqueira17b25872014-02-16 17:15:07 +0000375 # Remove leading dash from CM_EXTRAVERSION
376 CM_EXTRAVERSION := $(shell echo $(CM_EXTRAVERSION) | sed 's/-//')
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000377 TARGET_VENDOR_RELEASE_BUILD_ID := $(CM_EXTRAVERSION)
378 else
Ricardo Cerqueira17b25872014-02-16 17:15:07 +0000379 TARGET_VENDOR_RELEASE_BUILD_ID := $(shell date -u +%Y%m%d)
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000380 endif
381 else
Ricardo Cerqueira17b25872014-02-16 17:15:07 +0000382 TARGET_VENDOR_RELEASE_BUILD_ID := $(TARGET_VENDOR_RELEASE_BUILD_ID)
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000383 endif
Adrian DC3e85bf72016-08-06 21:47:23 +0200384 ifeq ($(CM_VERSION_MAINTENANCE),0)
Jessica Wagantall79204e62016-07-14 15:42:08 -0700385 CM_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(CM_BUILD)
386 else
Adrian DC3e85bf72016-08-06 21:47:23 +0200387 CM_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(CM_VERSION_MAINTENANCE)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(CM_BUILD)
Jessica Wagantall79204e62016-07-14 15:42:08 -0700388 endif
389endif
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000390endif
Ricardo Cerqueira74b4f9b2014-01-11 16:00:16 +0000391endif
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000392
393PRODUCT_PROPERTY_OVERRIDES += \
394 ro.cm.display.version=$(CM_DISPLAY_VERSION)
395
Brint E. Kriebela1e49122014-01-31 11:59:56 -0800396-include $(WORKSPACE)/build_env/image-auto-bits.mk
Steve Kondik960c4f42016-09-02 21:11:11 -0700397-include vendor/cm/config/partner_gms.mk
Koushik Dutta41fd0aa2013-12-07 22:04:17 -0800398-include vendor/cyngn/product.mk
Steve Kondikb9dd4002014-09-10 15:41:43 -0700399
Chris Sarbora39b9aa82014-12-17 14:41:28 -0800400$(call prepend-product-if-exists, vendor/extra/product.mk)