blob: 4a79c938770d4982ca253b640acf0985737c71a4 [file] [log] [blame]
Ricardo Cerqueira6ed03ff2011-11-28 16:37:47 +00001PRODUCT_BRAND ?= cyanogenmod
2
Koushik Dutta82d0fda2013-02-28 10:33:25 -08003SUPERUSER_EMBEDDED := true
4
Steve Kondikba1ca332012-08-21 02:18:40 -07005# To deal with CM9 specifications
6# TODO: remove once all devices have been switched
Steve Kondika8945752012-03-14 00:10:33 -07007ifneq ($(TARGET_BOOTANIMATION_NAME),)
Steve Kondikba1ca332012-08-21 02:18:40 -07008TARGET_SCREEN_DIMENSIONS := $(subst -, $(space), $(subst x, $(space), $(TARGET_BOOTANIMATION_NAME)))
9ifeq ($(TARGET_SCREEN_WIDTH),)
10TARGET_SCREEN_WIDTH := $(word 2, $(TARGET_SCREEN_DIMENSIONS))
11endif
12ifeq ($(TARGET_SCREEN_HEIGHT),)
13TARGET_SCREEN_HEIGHT := $(word 3, $(TARGET_SCREEN_DIMENSIONS))
14endif
15endif
16
17ifneq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space))
18
19# clear TARGET_BOOTANIMATION_NAME in case it was set for CM9 purposes
20TARGET_BOOTANIMATION_NAME :=
21
22# determine the smaller dimension
23TARGET_BOOTANIMATION_SIZE := $(shell \
24 if [ $(TARGET_SCREEN_WIDTH) -lt $(TARGET_SCREEN_HEIGHT) ]; then \
25 echo $(TARGET_SCREEN_WIDTH); \
26 else \
27 echo $(TARGET_SCREEN_HEIGHT); \
28 fi )
29
30# get a sorted list of the sizes
31bootanimation_sizes := $(subst .zip,, $(shell ls vendor/cm/prebuilt/common/bootanimation))
32bootanimation_sizes := $(shell echo -e $(subst $(space),'\n',$(bootanimation_sizes)) | sort -rn)
33
34# find the appropriate size and set
35define check_and_set_bootanimation
36$(eval TARGET_BOOTANIMATION_NAME := $(shell \
37 if [ -z "$(TARGET_BOOTANIMATION_NAME)" ]; then
38 if [ $(1) -le $(TARGET_BOOTANIMATION_SIZE) ]; then \
39 echo $(1); \
40 exit 0; \
41 fi;
42 fi;
43 echo $(TARGET_BOOTANIMATION_NAME); ))
44endef
45$(foreach size,$(bootanimation_sizes), $(call check_and_set_bootanimation,$(size)))
46
47PRODUCT_COPY_FILES += \
48 vendor/cm/prebuilt/common/bootanimation/$(TARGET_BOOTANIMATION_NAME).zip:system/media/bootanimation.zip
Steve Kondika8945752012-03-14 00:10:33 -070049endif
50
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000051ifdef CM_NIGHTLY
52PRODUCT_PROPERTY_OVERRIDES += \
53 ro.rommanager.developerid=cyanogenmodnightly
54else
55PRODUCT_PROPERTY_OVERRIDES += \
56 ro.rommanager.developerid=cyanogenmod
57endif
58
59PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
60
61PRODUCT_PROPERTY_OVERRIDES += \
62 keyguard.no_require_sim=true \
63 ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html \
64 ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html \
65 ro.com.google.clientidbase=android-google \
66 ro.com.android.wifi-watchlist=GoogleGuest \
67 ro.setupwizard.enterprise_mode=1 \
68 ro.com.android.dateformat=MM-dd-yyyy \
69 ro.com.android.dataroaming=false
70
Chirayu Desai59df3632013-02-15 21:16:39 +053071# Enable ADB authentication
72ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=1
73
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000074# Copy over the changelog to the device
75PRODUCT_COPY_FILES += \
76 vendor/cm/CHANGELOG.mkdn:system/etc/CHANGELOG-CM.txt
77
Warren Togamib1637c82012-03-03 22:37:42 -100078# Backup Tool
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000079PRODUCT_COPY_FILES += \
Warren Togamib1637c82012-03-03 22:37:42 -100080 vendor/cm/prebuilt/common/bin/backuptool.sh:system/bin/backuptool.sh \
81 vendor/cm/prebuilt/common/bin/backuptool.functions:system/bin/backuptool.functions \
Ricardo Cerqueira129989b2012-12-19 01:11:21 +000082 vendor/cm/prebuilt/common/bin/50-cm.sh:system/addon.d/50-cm.sh \
83 vendor/cm/prebuilt/common/bin/blacklist:system/addon.d/blacklist
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000084
Steve Kondik485527d2011-12-20 12:14:24 -080085# init.d support
86PRODUCT_COPY_FILES += \
87 vendor/cm/prebuilt/common/etc/init.d/00banner:system/etc/init.d/00banner \
88 vendor/cm/prebuilt/common/bin/sysinit:system/bin/sysinit
89
James Sullinseb7799c2012-04-05 20:18:18 -050090# userinit support
91PRODUCT_COPY_FILES += \
92 vendor/cm/prebuilt/common/etc/init.d/90userinit:system/etc/init.d/90userinit
93
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +010094# CM-specific init file
95PRODUCT_COPY_FILES += \
96 vendor/cm/prebuilt/common/etc/init.local.rc:root/init.cm.rc
97
Steve Kondik485527d2011-12-20 12:14:24 -080098# Compcache/Zram support
99PRODUCT_COPY_FILES += \
Steve Kondik485527d2011-12-20 12:14:24 -0800100 vendor/cm/prebuilt/common/bin/compcache:system/bin/compcache \
101 vendor/cm/prebuilt/common/bin/handle_compcache:system/bin/handle_compcache
102
jt1134e59a4162013-01-11 22:24:47 -0600103# Terminal Emulator
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000104PRODUCT_COPY_FILES += \
Robert Burns7ce9d9e2013-01-02 10:06:52 -0500105 vendor/cm/proprietary/Term.apk:system/app/Term.apk \
Steve Kondikabfc0792012-09-20 10:26:25 -0700106 vendor/cm/proprietary/lib/armeabi/libjackpal-androidterm4.so:system/lib/libjackpal-androidterm4.so
fitsnugly407b3992012-01-14 18:50:25 -0500107
Adam Fardendb2438b2012-03-07 14:34:38 +0100108# Bring in camera effects
fitsnugly407b3992012-01-14 18:50:25 -0500109PRODUCT_COPY_FILES += \
fitsnuglyc1c6ce22012-01-12 01:10:39 -0500110 vendor/cm/prebuilt/common/media/LMprec_508.emd:system/media/LMprec_508.emd \
111 vendor/cm/prebuilt/common/media/PFFprec_600.emd:system/media/PFFprec_600.emd
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000112
113# Enable SIP+VoIP on all targets
114PRODUCT_COPY_FILES += \
Ricardo Cerqueira3ff9b6f2012-07-11 11:21:50 +0100115 frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000116
sleeplessninja918a7ea2013-01-30 14:45:20 -0600117# Enable wireless Xbox 360 controller support
118PRODUCT_COPY_FILES += \
119 frameworks/base/data/keyboards/Vendor_045e_Product_028e.kl:system/usr/keylayout/Vendor_045e_Product_0719.kl
120
Steve Kondike0c12da2012-03-25 17:21:32 -0700121# This is CM!
122PRODUCT_COPY_FILES += \
123 vendor/cm/config/permissions/com.cyanogenmod.android.xml:system/etc/permissions/com.cyanogenmod.android.xml
124
Mike Kasick511d6092012-01-26 17:54:31 -0500125# Don't export PS1 in /system/etc/mkshrc.
126PRODUCT_COPY_FILES += \
127 vendor/cm/prebuilt/common/etc/mkshrc:system/etc/mkshrc
128
Ricardo Cerqueira9f75d842012-05-04 10:15:56 +0100129# T-Mobile theme engine
130include vendor/cm/config/themes_common.mk
131
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000132# Required CM packages
133PRODUCT_PACKAGES += \
Steve Kondike0c297d2011-12-20 16:16:01 -0800134 Camera \
135 Development \
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000136 LatinIME \
Koushik Dutta05dc42e2011-11-25 18:02:09 -0800137 Superuser \
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000138 su
139
140# Optional CM packages
141PRODUCT_PACKAGES += \
Koushik Dutta74d3bad2011-11-27 13:00:30 -0800142 VideoEditor \
143 VoiceDialer \
Warren Togami5960a702012-02-22 09:22:42 -1000144 SoundRecorder \
Andreas Schneidera69dc022012-08-28 12:21:46 +0200145 Basic
Koushik Dutta8387c322011-11-26 17:31:19 -0800146
Steve Kondik04a49412011-12-14 14:02:19 -0800147# Custom CM packages
148PRODUCT_PACKAGES += \
nebkat0acffd52011-12-22 16:47:22 +0000149 Trebuchet \
Steve Kondik04a49412011-12-14 14:02:19 -0800150 DSPManager \
Steve Kondika25e4e02011-12-14 22:27:07 -0800151 libcyanogen-dsp \
Steve Kondikfcc16102012-05-05 16:23:24 -0700152 audio_effects.conf \
Ricardo Cerqueira3dc43542012-05-25 04:31:26 +0400153 CMWallpapers \
Ricardo Cerqueira2526fef2012-09-29 17:17:45 +0100154 Apollo \
Steve Kondik7bd61212012-10-31 22:40:46 -0700155 CMUpdater \
DvTonderf0074032012-12-30 13:37:40 -0500156 CMFileManager \
157 LockClock
Steve Kondik04a49412011-12-14 14:02:19 -0800158
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200159# Extra tools in CM
160PRODUCT_PACKAGES += \
Steve Kondik08980282012-07-05 01:20:47 -0700161 openvpn \
162 e2fsck \
163 mke2fs \
Steve Kondik1949eb52012-09-20 17:09:07 -0700164 tune2fs \
165 bash \
166 vim \
167 nano \
168 htop \
169 powertop \
170 lsof
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200171
Chirayu Desai8636d672012-07-19 16:04:25 +0530172# Openssh
173PRODUCT_PACKAGES += \
174 scp \
175 sftp \
176 ssh \
177 sshd \
178 sshd_config \
179 ssh-keygen \
Chirayu Desai4bacf672012-08-19 17:30:04 +0530180 start-ssh
181
182# rsync
183PRODUCT_PACKAGES += \
184 rsync
Chirayu Desai8636d672012-07-19 16:04:25 +0530185
Koushik Duttac6f7a492011-11-28 07:44:23 -0800186PRODUCT_PACKAGE_OVERLAYS += vendor/cm/overlay/dictionaries
Steve Kondik254db262011-12-20 15:02:07 -0800187PRODUCT_PACKAGE_OVERLAYS += vendor/cm/overlay/common
Koushik Duttac6f7a492011-11-28 07:44:23 -0800188
Ricardo Cerqueiraed3e91e2012-07-11 16:05:12 +0100189PRODUCT_VERSION_MAJOR = 10
Chirayu Desai909ce862012-11-22 15:50:54 +0530190PRODUCT_VERSION_MINOR = 1
191PRODUCT_VERSION_MAINTENANCE = 0-RC0
Koushik Duttac6f7a492011-11-28 07:44:23 -0800192
Warren Togami2128e2f2012-05-06 19:49:33 -1000193# Set CM_BUILDTYPE
Koushik Duttac6f7a492011-11-28 07:44:23 -0800194ifdef CM_NIGHTLY
Warren Togami2128e2f2012-05-06 19:49:33 -1000195 CM_BUILDTYPE := NIGHTLY
196endif
197ifdef CM_EXPERIMENTAL
198 CM_BUILDTYPE := EXPERIMENTAL
199endif
200ifdef CM_RELEASE
201 CM_BUILDTYPE := RELEASE
202endif
203
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100204ifdef CM_BUILDTYPE
205 ifdef CM_EXTRAVERSION
206 # Force build type to EXPERIMENTAL
207 CM_BUILDTYPE := EXPERIMENTAL
208 # Add leading dash to CM_EXTRAVERSION
209 CM_EXTRAVERSION := -$(CM_EXTRAVERSION)
210 endif
211else
212 # If CM_BUILDTYPE is not defined, set to UNOFFICIAL
Warren Togami2128e2f2012-05-06 19:49:33 -1000213 CM_BUILDTYPE := UNOFFICIAL
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100214 CM_EXTRAVERSION :=
Warren Togami2128e2f2012-05-06 19:49:33 -1000215endif
216
217ifdef CM_RELEASE
218 CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD)
Koushik Duttac6f7a492011-11-28 07:44:23 -0800219else
Chirayu Desaie6e61632012-12-04 19:16:48 +0530220 ifeq ($(PRODUCT_VERSION_MINOR),0)
221 CM_VERSION := $(PRODUCT_VERSION_MAJOR)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)-$(CM_BUILD)$(CM_EXTRAVERSION)
222 else
223 CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)-$(CM_BUILD)$(CM_EXTRAVERSION)
224 endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800225endif
Koushik Duttad69b2922012-02-23 14:07:44 -0800226
227PRODUCT_PROPERTY_OVERRIDES += \
228 ro.cm.version=$(CM_VERSION) \
Warren Togamib1637c82012-03-03 22:37:42 -1000229 ro.modversion=$(CM_VERSION)
Ricardo Cerqueirad5422742012-11-13 10:42:11 +0000230
231
232-include $(WORKSPACE)/hudson/image-auto-bits.mk