blob: 321392749a0828557de8e0362388ad4353be18d7 [file] [log] [blame]
Ricardo Cerqueira6ed03ff2011-11-28 16:37:47 +00001PRODUCT_BRAND ?= cyanogenmod
2
Steve Kondikba1ca332012-08-21 02:18:40 -07003# To deal with CM9 specifications
4# TODO: remove once all devices have been switched
Steve Kondika8945752012-03-14 00:10:33 -07005ifneq ($(TARGET_BOOTANIMATION_NAME),)
Steve Kondikba1ca332012-08-21 02:18:40 -07006TARGET_SCREEN_DIMENSIONS := $(subst -, $(space), $(subst x, $(space), $(TARGET_BOOTANIMATION_NAME)))
7ifeq ($(TARGET_SCREEN_WIDTH),)
8TARGET_SCREEN_WIDTH := $(word 2, $(TARGET_SCREEN_DIMENSIONS))
9endif
10ifeq ($(TARGET_SCREEN_HEIGHT),)
11TARGET_SCREEN_HEIGHT := $(word 3, $(TARGET_SCREEN_DIMENSIONS))
12endif
13endif
14
15ifneq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space))
16
17# clear TARGET_BOOTANIMATION_NAME in case it was set for CM9 purposes
18TARGET_BOOTANIMATION_NAME :=
19
20# determine the smaller dimension
21TARGET_BOOTANIMATION_SIZE := $(shell \
22 if [ $(TARGET_SCREEN_WIDTH) -lt $(TARGET_SCREEN_HEIGHT) ]; then \
23 echo $(TARGET_SCREEN_WIDTH); \
24 else \
25 echo $(TARGET_SCREEN_HEIGHT); \
26 fi )
27
28# get a sorted list of the sizes
29bootanimation_sizes := $(subst .zip,, $(shell ls vendor/cm/prebuilt/common/bootanimation))
30bootanimation_sizes := $(shell echo -e $(subst $(space),'\n',$(bootanimation_sizes)) | sort -rn)
31
32# find the appropriate size and set
33define check_and_set_bootanimation
34$(eval TARGET_BOOTANIMATION_NAME := $(shell \
35 if [ -z "$(TARGET_BOOTANIMATION_NAME)" ]; then
36 if [ $(1) -le $(TARGET_BOOTANIMATION_SIZE) ]; then \
37 echo $(1); \
38 exit 0; \
39 fi;
40 fi;
41 echo $(TARGET_BOOTANIMATION_NAME); ))
42endef
43$(foreach size,$(bootanimation_sizes), $(call check_and_set_bootanimation,$(size)))
44
45PRODUCT_COPY_FILES += \
46 vendor/cm/prebuilt/common/bootanimation/$(TARGET_BOOTANIMATION_NAME).zip:system/media/bootanimation.zip
Steve Kondika8945752012-03-14 00:10:33 -070047endif
48
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000049ifdef CM_NIGHTLY
50PRODUCT_PROPERTY_OVERRIDES += \
51 ro.rommanager.developerid=cyanogenmodnightly
52else
53PRODUCT_PROPERTY_OVERRIDES += \
54 ro.rommanager.developerid=cyanogenmod
55endif
56
57PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
58
59PRODUCT_PROPERTY_OVERRIDES += \
60 keyguard.no_require_sim=true \
61 ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html \
62 ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html \
63 ro.com.google.clientidbase=android-google \
64 ro.com.android.wifi-watchlist=GoogleGuest \
65 ro.setupwizard.enterprise_mode=1 \
66 ro.com.android.dateformat=MM-dd-yyyy \
67 ro.com.android.dataroaming=false
68
69# Copy over the changelog to the device
70PRODUCT_COPY_FILES += \
71 vendor/cm/CHANGELOG.mkdn:system/etc/CHANGELOG-CM.txt
72
Warren Togamib1637c82012-03-03 22:37:42 -100073# Backup Tool
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000074PRODUCT_COPY_FILES += \
Warren Togamib1637c82012-03-03 22:37:42 -100075 vendor/cm/prebuilt/common/bin/backuptool.sh:system/bin/backuptool.sh \
76 vendor/cm/prebuilt/common/bin/backuptool.functions:system/bin/backuptool.functions \
77 vendor/cm/prebuilt/common/bin/50-cm.sh:system/addon.d/50-cm.sh
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000078
Steve Kondik485527d2011-12-20 12:14:24 -080079# init.d support
80PRODUCT_COPY_FILES += \
81 vendor/cm/prebuilt/common/etc/init.d/00banner:system/etc/init.d/00banner \
82 vendor/cm/prebuilt/common/bin/sysinit:system/bin/sysinit
83
James Sullinseb7799c2012-04-05 20:18:18 -050084# userinit support
85PRODUCT_COPY_FILES += \
86 vendor/cm/prebuilt/common/etc/init.d/90userinit:system/etc/init.d/90userinit
87
Steve Kondik485527d2011-12-20 12:14:24 -080088# Compcache/Zram support
89PRODUCT_COPY_FILES += \
90 vendor/cm/prebuilt/common/etc/init.local.rc:system/etc/init.local.rc \
91 vendor/cm/prebuilt/common/bin/compcache:system/bin/compcache \
92 vendor/cm/prebuilt/common/bin/handle_compcache:system/bin/handle_compcache
93
Brint E. Kriebelc2a88d62012-07-11 14:21:15 -060094# Nam configuration script
95PRODUCT_COPY_FILES += \
96 vendor/cm/prebuilt/common/bin/modelid_cfg.sh:system/bin/modelid_cfg.sh
97
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000098PRODUCT_COPY_FILES += \
99 vendor/cm/proprietary/RomManager.apk:system/app/RomManager.apk \
Steve Kondika25e4e02011-12-14 22:27:07 -0800100 vendor/cm/proprietary/Term.apk:system/app/Term.apk \
Steve Kondikb208b922012-07-17 01:43:07 -0700101 vendor/cm/proprietary/lib/armeabi/libjackpal-androidterm4.so:system/lib/libjackpal-androidterm4.so \
102 vendor/cm/prebuilt/common/apps/Superuser.apk:system/app/Superuser.apk
fitsnugly407b3992012-01-14 18:50:25 -0500103
Adam Fardendb2438b2012-03-07 14:34:38 +0100104# Bring in camera effects
fitsnugly407b3992012-01-14 18:50:25 -0500105PRODUCT_COPY_FILES += \
fitsnuglyc1c6ce22012-01-12 01:10:39 -0500106 vendor/cm/prebuilt/common/media/LMprec_508.emd:system/media/LMprec_508.emd \
107 vendor/cm/prebuilt/common/media/PFFprec_600.emd:system/media/PFFprec_600.emd
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000108
109# Enable SIP+VoIP on all targets
110PRODUCT_COPY_FILES += \
Ricardo Cerqueira3ff9b6f2012-07-11 11:21:50 +0100111 frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000112
Steve Kondike0c12da2012-03-25 17:21:32 -0700113# This is CM!
114PRODUCT_COPY_FILES += \
115 vendor/cm/config/permissions/com.cyanogenmod.android.xml:system/etc/permissions/com.cyanogenmod.android.xml
116
Mike Kasick511d6092012-01-26 17:54:31 -0500117# Don't export PS1 in /system/etc/mkshrc.
118PRODUCT_COPY_FILES += \
119 vendor/cm/prebuilt/common/etc/mkshrc:system/etc/mkshrc
120
Ricardo Cerqueira9f75d842012-05-04 10:15:56 +0100121# T-Mobile theme engine
122include vendor/cm/config/themes_common.mk
123
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000124# Required CM packages
125PRODUCT_PACKAGES += \
Steve Kondike0c297d2011-12-20 16:16:01 -0800126 Camera \
127 Development \
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000128 LatinIME \
Steve Kondike0c297d2011-12-20 16:16:01 -0800129 SpareParts \
Koushik Dutta05dc42e2011-11-25 18:02:09 -0800130 Superuser \
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000131 Superuser.apk \
132 su
133
134# Optional CM packages
135PRODUCT_PACKAGES += \
Koushik Dutta74d3bad2011-11-27 13:00:30 -0800136 VideoEditor \
137 VoiceDialer \
Warren Togami5960a702012-02-22 09:22:42 -1000138 SoundRecorder \
Andreas Schneidera69dc022012-08-28 12:21:46 +0200139 Basic
Koushik Dutta8387c322011-11-26 17:31:19 -0800140
Steve Kondik04a49412011-12-14 14:02:19 -0800141# Custom CM packages
142PRODUCT_PACKAGES += \
nebkat0acffd52011-12-22 16:47:22 +0000143 Trebuchet \
Steve Kondik04a49412011-12-14 14:02:19 -0800144 DSPManager \
Steve Kondika25e4e02011-12-14 22:27:07 -0800145 libcyanogen-dsp \
Steve Kondikfcc16102012-05-05 16:23:24 -0700146 audio_effects.conf \
Ricardo Cerqueira3dc43542012-05-25 04:31:26 +0400147 CMWallpapers \
148 Apollo
Steve Kondik04a49412011-12-14 14:02:19 -0800149
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200150# Extra tools in CM
151PRODUCT_PACKAGES += \
Steve Kondik08980282012-07-05 01:20:47 -0700152 openvpn \
153 e2fsck \
154 mke2fs \
155 tune2fs
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200156
Chirayu Desai8636d672012-07-19 16:04:25 +0530157# Openssh
158PRODUCT_PACKAGES += \
159 scp \
160 sftp \
161 ssh \
162 sshd \
163 sshd_config \
164 ssh-keygen \
Chirayu Desai4bacf672012-08-19 17:30:04 +0530165 start-ssh
166
167# rsync
168PRODUCT_PACKAGES += \
169 rsync
Chirayu Desai8636d672012-07-19 16:04:25 +0530170
Koushik Duttac6f7a492011-11-28 07:44:23 -0800171PRODUCT_PACKAGE_OVERLAYS += vendor/cm/overlay/dictionaries
Steve Kondik254db262011-12-20 15:02:07 -0800172PRODUCT_PACKAGE_OVERLAYS += vendor/cm/overlay/common
Koushik Duttac6f7a492011-11-28 07:44:23 -0800173
Ricardo Cerqueiraed3e91e2012-07-11 16:05:12 +0100174PRODUCT_VERSION_MAJOR = 10
Koushik Duttac6f7a492011-11-28 07:44:23 -0800175PRODUCT_VERSION_MINOR = 0
Ricardo Cerqueiraed3e91e2012-07-11 16:05:12 +0100176PRODUCT_VERSION_MAINTENANCE = 0-RC0
Koushik Duttac6f7a492011-11-28 07:44:23 -0800177
Warren Togami2128e2f2012-05-06 19:49:33 -1000178# Set CM_BUILDTYPE
Koushik Duttac6f7a492011-11-28 07:44:23 -0800179ifdef CM_NIGHTLY
Warren Togami2128e2f2012-05-06 19:49:33 -1000180 CM_BUILDTYPE := NIGHTLY
181endif
182ifdef CM_EXPERIMENTAL
183 CM_BUILDTYPE := EXPERIMENTAL
184endif
185ifdef CM_RELEASE
186 CM_BUILDTYPE := RELEASE
187endif
188
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100189ifdef CM_BUILDTYPE
190 ifdef CM_EXTRAVERSION
191 # Force build type to EXPERIMENTAL
192 CM_BUILDTYPE := EXPERIMENTAL
193 # Add leading dash to CM_EXTRAVERSION
194 CM_EXTRAVERSION := -$(CM_EXTRAVERSION)
195 endif
196else
197 # If CM_BUILDTYPE is not defined, set to UNOFFICIAL
Warren Togami2128e2f2012-05-06 19:49:33 -1000198 CM_BUILDTYPE := UNOFFICIAL
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100199 CM_EXTRAVERSION :=
Warren Togami2128e2f2012-05-06 19:49:33 -1000200endif
201
202ifdef CM_RELEASE
203 CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD)
Koushik Duttac6f7a492011-11-28 07:44:23 -0800204else
Warren Togami2128e2f2012-05-06 19:49:33 -1000205 CM_VERSION := $(PRODUCT_VERSION_MAJOR)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)-$(CM_BUILD)$(CM_EXTRAVERSION)
Koushik Duttac6f7a492011-11-28 07:44:23 -0800206endif
Koushik Duttad69b2922012-02-23 14:07:44 -0800207
208PRODUCT_PROPERTY_OVERRIDES += \
209 ro.cm.version=$(CM_VERSION) \
Warren Togamib1637c82012-03-03 22:37:42 -1000210 ro.modversion=$(CM_VERSION)