Ricardo Cerqueira | 6ed03ff | 2011-11-28 16:37:47 +0000 | [diff] [blame] | 1 | PRODUCT_BRAND ?= cyanogenmod |
| 2 | |
Koushik Dutta | 82d0fda | 2013-02-28 10:33:25 -0800 | [diff] [blame] | 3 | SUPERUSER_EMBEDDED := true |
Koushik Dutta | 9d15c7a | 2013-03-04 00:37:02 -0800 | [diff] [blame] | 4 | SUPERUSER_PACKAGE_PREFIX := com.android.settings.cyanogenmod.superuser |
Koushik Dutta | 82d0fda | 2013-02-28 10:33:25 -0800 | [diff] [blame] | 5 | |
Steve Kondik | ba1ca33 | 2012-08-21 02:18:40 -0700 | [diff] [blame] | 6 | # To deal with CM9 specifications |
| 7 | # TODO: remove once all devices have been switched |
Steve Kondik | a894575 | 2012-03-14 00:10:33 -0700 | [diff] [blame] | 8 | ifneq ($(TARGET_BOOTANIMATION_NAME),) |
Steve Kondik | ba1ca33 | 2012-08-21 02:18:40 -0700 | [diff] [blame] | 9 | TARGET_SCREEN_DIMENSIONS := $(subst -, $(space), $(subst x, $(space), $(TARGET_BOOTANIMATION_NAME))) |
| 10 | ifeq ($(TARGET_SCREEN_WIDTH),) |
| 11 | TARGET_SCREEN_WIDTH := $(word 2, $(TARGET_SCREEN_DIMENSIONS)) |
| 12 | endif |
| 13 | ifeq ($(TARGET_SCREEN_HEIGHT),) |
| 14 | TARGET_SCREEN_HEIGHT := $(word 3, $(TARGET_SCREEN_DIMENSIONS)) |
| 15 | endif |
| 16 | endif |
| 17 | |
| 18 | ifneq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space)) |
| 19 | |
| 20 | # clear TARGET_BOOTANIMATION_NAME in case it was set for CM9 purposes |
| 21 | TARGET_BOOTANIMATION_NAME := |
| 22 | |
| 23 | # determine the smaller dimension |
| 24 | TARGET_BOOTANIMATION_SIZE := $(shell \ |
| 25 | if [ $(TARGET_SCREEN_WIDTH) -lt $(TARGET_SCREEN_HEIGHT) ]; then \ |
| 26 | echo $(TARGET_SCREEN_WIDTH); \ |
| 27 | else \ |
| 28 | echo $(TARGET_SCREEN_HEIGHT); \ |
| 29 | fi ) |
| 30 | |
| 31 | # get a sorted list of the sizes |
| 32 | bootanimation_sizes := $(subst .zip,, $(shell ls vendor/cm/prebuilt/common/bootanimation)) |
| 33 | bootanimation_sizes := $(shell echo -e $(subst $(space),'\n',$(bootanimation_sizes)) | sort -rn) |
| 34 | |
| 35 | # find the appropriate size and set |
| 36 | define check_and_set_bootanimation |
| 37 | $(eval TARGET_BOOTANIMATION_NAME := $(shell \ |
| 38 | if [ -z "$(TARGET_BOOTANIMATION_NAME)" ]; then |
| 39 | if [ $(1) -le $(TARGET_BOOTANIMATION_SIZE) ]; then \ |
| 40 | echo $(1); \ |
| 41 | exit 0; \ |
| 42 | fi; |
| 43 | fi; |
| 44 | echo $(TARGET_BOOTANIMATION_NAME); )) |
| 45 | endef |
| 46 | $(foreach size,$(bootanimation_sizes), $(call check_and_set_bootanimation,$(size))) |
| 47 | |
| 48 | PRODUCT_COPY_FILES += \ |
| 49 | vendor/cm/prebuilt/common/bootanimation/$(TARGET_BOOTANIMATION_NAME).zip:system/media/bootanimation.zip |
Steve Kondik | a894575 | 2012-03-14 00:10:33 -0700 | [diff] [blame] | 50 | endif |
| 51 | |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 52 | ifdef CM_NIGHTLY |
| 53 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 54 | ro.rommanager.developerid=cyanogenmodnightly |
| 55 | else |
| 56 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 57 | ro.rommanager.developerid=cyanogenmod |
| 58 | endif |
| 59 | |
| 60 | PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0 |
| 61 | |
| 62 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 63 | keyguard.no_require_sim=true \ |
| 64 | ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html \ |
| 65 | ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html \ |
| 66 | ro.com.google.clientidbase=android-google \ |
| 67 | ro.com.android.wifi-watchlist=GoogleGuest \ |
| 68 | ro.setupwizard.enterprise_mode=1 \ |
| 69 | ro.com.android.dateformat=MM-dd-yyyy \ |
| 70 | ro.com.android.dataroaming=false |
| 71 | |
Chirayu Desai | 88401db | 2013-03-20 16:17:17 +0530 | [diff] [blame] | 72 | ifneq ($(TARGET_BUILD_VARIANT),eng) |
Chirayu Desai | 59df363 | 2013-02-15 21:16:39 +0530 | [diff] [blame] | 73 | # Enable ADB authentication |
| 74 | ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=1 |
Chirayu Desai | 88401db | 2013-03-20 16:17:17 +0530 | [diff] [blame] | 75 | endif |
Chirayu Desai | 59df363 | 2013-02-15 21:16:39 +0530 | [diff] [blame] | 76 | |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 77 | # Copy over the changelog to the device |
| 78 | PRODUCT_COPY_FILES += \ |
| 79 | vendor/cm/CHANGELOG.mkdn:system/etc/CHANGELOG-CM.txt |
| 80 | |
Warren Togami | b1637c8 | 2012-03-03 22:37:42 -1000 | [diff] [blame] | 81 | # Backup Tool |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 82 | PRODUCT_COPY_FILES += \ |
Warren Togami | b1637c8 | 2012-03-03 22:37:42 -1000 | [diff] [blame] | 83 | vendor/cm/prebuilt/common/bin/backuptool.sh:system/bin/backuptool.sh \ |
| 84 | vendor/cm/prebuilt/common/bin/backuptool.functions:system/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 |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 87 | |
Steve Kondik | 485527d | 2011-12-20 12:14:24 -0800 | [diff] [blame] | 88 | # init.d support |
| 89 | PRODUCT_COPY_FILES += \ |
| 90 | vendor/cm/prebuilt/common/etc/init.d/00banner:system/etc/init.d/00banner \ |
| 91 | vendor/cm/prebuilt/common/bin/sysinit:system/bin/sysinit |
| 92 | |
James Sullins | eb7799c | 2012-04-05 20:18:18 -0500 | [diff] [blame] | 93 | # userinit support |
| 94 | PRODUCT_COPY_FILES += \ |
| 95 | vendor/cm/prebuilt/common/etc/init.d/90userinit:system/etc/init.d/90userinit |
| 96 | |
Ricardo Cerqueira | 8f412cb | 2012-10-18 16:38:25 +0100 | [diff] [blame] | 97 | # CM-specific init file |
| 98 | PRODUCT_COPY_FILES += \ |
| 99 | vendor/cm/prebuilt/common/etc/init.local.rc:root/init.cm.rc |
| 100 | |
Steve Kondik | 485527d | 2011-12-20 12:14:24 -0800 | [diff] [blame] | 101 | # Compcache/Zram support |
| 102 | PRODUCT_COPY_FILES += \ |
Steve Kondik | 485527d | 2011-12-20 12:14:24 -0800 | [diff] [blame] | 103 | vendor/cm/prebuilt/common/bin/compcache:system/bin/compcache \ |
| 104 | vendor/cm/prebuilt/common/bin/handle_compcache:system/bin/handle_compcache |
| 105 | |
jt1134 | e59a416 | 2013-01-11 22:24:47 -0600 | [diff] [blame] | 106 | # Terminal Emulator |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 107 | PRODUCT_COPY_FILES += \ |
Robert Burns | 7ce9d9e | 2013-01-02 10:06:52 -0500 | [diff] [blame] | 108 | vendor/cm/proprietary/Term.apk:system/app/Term.apk \ |
Steve Kondik | abfc079 | 2012-09-20 10:26:25 -0700 | [diff] [blame] | 109 | vendor/cm/proprietary/lib/armeabi/libjackpal-androidterm4.so:system/lib/libjackpal-androidterm4.so |
fitsnugly | 407b399 | 2012-01-14 18:50:25 -0500 | [diff] [blame] | 110 | |
Adam Farden | db2438b | 2012-03-07 14:34:38 +0100 | [diff] [blame] | 111 | # Bring in camera effects |
fitsnugly | 407b399 | 2012-01-14 18:50:25 -0500 | [diff] [blame] | 112 | PRODUCT_COPY_FILES += \ |
fitsnugly | c1c6ce2 | 2012-01-12 01:10:39 -0500 | [diff] [blame] | 113 | vendor/cm/prebuilt/common/media/LMprec_508.emd:system/media/LMprec_508.emd \ |
| 114 | vendor/cm/prebuilt/common/media/PFFprec_600.emd:system/media/PFFprec_600.emd |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 115 | |
| 116 | # Enable SIP+VoIP on all targets |
| 117 | PRODUCT_COPY_FILES += \ |
Ricardo Cerqueira | 3ff9b6f | 2012-07-11 11:21:50 +0100 | [diff] [blame] | 118 | 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] | 119 | |
sleeplessninja | 918a7ea | 2013-01-30 14:45:20 -0600 | [diff] [blame] | 120 | # Enable wireless Xbox 360 controller support |
| 121 | PRODUCT_COPY_FILES += \ |
| 122 | frameworks/base/data/keyboards/Vendor_045e_Product_028e.kl:system/usr/keylayout/Vendor_045e_Product_0719.kl |
| 123 | |
Steve Kondik | e0c12da | 2012-03-25 17:21:32 -0700 | [diff] [blame] | 124 | # This is CM! |
| 125 | PRODUCT_COPY_FILES += \ |
| 126 | vendor/cm/config/permissions/com.cyanogenmod.android.xml:system/etc/permissions/com.cyanogenmod.android.xml |
| 127 | |
Mike Kasick | 511d609 | 2012-01-26 17:54:31 -0500 | [diff] [blame] | 128 | # Don't export PS1 in /system/etc/mkshrc. |
| 129 | PRODUCT_COPY_FILES += \ |
| 130 | vendor/cm/prebuilt/common/etc/mkshrc:system/etc/mkshrc |
| 131 | |
Ricardo Cerqueira | 9f75d84 | 2012-05-04 10:15:56 +0100 | [diff] [blame] | 132 | # T-Mobile theme engine |
| 133 | include vendor/cm/config/themes_common.mk |
| 134 | |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 135 | # Required CM packages |
| 136 | PRODUCT_PACKAGES += \ |
Steve Kondik | e0c297d | 2011-12-20 16:16:01 -0800 | [diff] [blame] | 137 | Camera \ |
| 138 | Development \ |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 139 | LatinIME \ |
Koushik Dutta | 05dc42e | 2011-11-25 18:02:09 -0800 | [diff] [blame] | 140 | Superuser \ |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 141 | su |
| 142 | |
| 143 | # Optional CM packages |
| 144 | PRODUCT_PACKAGES += \ |
Koushik Dutta | 74d3bad | 2011-11-27 13:00:30 -0800 | [diff] [blame] | 145 | VideoEditor \ |
| 146 | VoiceDialer \ |
Warren Togami | 5960a70 | 2012-02-22 09:22:42 -1000 | [diff] [blame] | 147 | SoundRecorder \ |
Andreas Schneider | a69dc02 | 2012-08-28 12:21:46 +0200 | [diff] [blame] | 148 | Basic |
Koushik Dutta | 8387c32 | 2011-11-26 17:31:19 -0800 | [diff] [blame] | 149 | |
Steve Kondik | 04a4941 | 2011-12-14 14:02:19 -0800 | [diff] [blame] | 150 | # Custom CM packages |
| 151 | PRODUCT_PACKAGES += \ |
nebkat | 0acffd5 | 2011-12-22 16:47:22 +0000 | [diff] [blame] | 152 | Trebuchet \ |
Steve Kondik | 04a4941 | 2011-12-14 14:02:19 -0800 | [diff] [blame] | 153 | DSPManager \ |
Steve Kondik | a25e4e0 | 2011-12-14 22:27:07 -0800 | [diff] [blame] | 154 | libcyanogen-dsp \ |
Steve Kondik | fcc1610 | 2012-05-05 16:23:24 -0700 | [diff] [blame] | 155 | audio_effects.conf \ |
Ricardo Cerqueira | 3dc4354 | 2012-05-25 04:31:26 +0400 | [diff] [blame] | 156 | CMWallpapers \ |
Ricardo Cerqueira | 2526fef | 2012-09-29 17:17:45 +0100 | [diff] [blame] | 157 | Apollo \ |
Steve Kondik | 7bd6121 | 2012-10-31 22:40:46 -0700 | [diff] [blame] | 158 | CMUpdater \ |
DvTonder | f007403 | 2012-12-30 13:37:40 -0500 | [diff] [blame] | 159 | CMFileManager \ |
| 160 | LockClock |
Steve Kondik | 04a4941 | 2011-12-14 14:02:19 -0800 | [diff] [blame] | 161 | |
Sebastian Schmidt | 7d5de0c | 2012-04-15 11:39:25 +0200 | [diff] [blame] | 162 | # Extra tools in CM |
| 163 | PRODUCT_PACKAGES += \ |
Steve Kondik | 0898028 | 2012-07-05 01:20:47 -0700 | [diff] [blame] | 164 | openvpn \ |
| 165 | e2fsck \ |
| 166 | mke2fs \ |
Steve Kondik | 1949eb5 | 2012-09-20 17:09:07 -0700 | [diff] [blame] | 167 | tune2fs \ |
| 168 | bash \ |
| 169 | vim \ |
| 170 | nano \ |
| 171 | htop \ |
| 172 | powertop \ |
| 173 | lsof |
Sebastian Schmidt | 7d5de0c | 2012-04-15 11:39:25 +0200 | [diff] [blame] | 174 | |
Chirayu Desai | 8636d67 | 2012-07-19 16:04:25 +0530 | [diff] [blame] | 175 | # Openssh |
| 176 | PRODUCT_PACKAGES += \ |
| 177 | scp \ |
| 178 | sftp \ |
| 179 | ssh \ |
| 180 | sshd \ |
| 181 | sshd_config \ |
| 182 | ssh-keygen \ |
Chirayu Desai | 4bacf67 | 2012-08-19 17:30:04 +0530 | [diff] [blame] | 183 | start-ssh |
| 184 | |
| 185 | # rsync |
| 186 | PRODUCT_PACKAGES += \ |
| 187 | rsync |
Chirayu Desai | 8636d67 | 2012-07-19 16:04:25 +0530 | [diff] [blame] | 188 | |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 189 | PRODUCT_PACKAGE_OVERLAYS += vendor/cm/overlay/dictionaries |
Steve Kondik | 254db26 | 2011-12-20 15:02:07 -0800 | [diff] [blame] | 190 | PRODUCT_PACKAGE_OVERLAYS += vendor/cm/overlay/common |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 191 | |
Ricardo Cerqueira | ed3e91e | 2012-07-11 16:05:12 +0100 | [diff] [blame] | 192 | PRODUCT_VERSION_MAJOR = 10 |
Chirayu Desai | 909ce86 | 2012-11-22 15:50:54 +0530 | [diff] [blame] | 193 | PRODUCT_VERSION_MINOR = 1 |
| 194 | PRODUCT_VERSION_MAINTENANCE = 0-RC0 |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 195 | |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 196 | # Set CM_BUILDTYPE |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 197 | ifdef CM_NIGHTLY |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 198 | CM_BUILDTYPE := NIGHTLY |
| 199 | endif |
| 200 | ifdef CM_EXPERIMENTAL |
| 201 | CM_BUILDTYPE := EXPERIMENTAL |
| 202 | endif |
| 203 | ifdef CM_RELEASE |
| 204 | CM_BUILDTYPE := RELEASE |
| 205 | endif |
| 206 | |
Ricardo Cerqueira | d8e7666 | 2012-06-08 11:08:15 +0100 | [diff] [blame] | 207 | ifdef CM_BUILDTYPE |
| 208 | ifdef CM_EXTRAVERSION |
| 209 | # Force build type to EXPERIMENTAL |
| 210 | CM_BUILDTYPE := EXPERIMENTAL |
| 211 | # Add leading dash to CM_EXTRAVERSION |
| 212 | CM_EXTRAVERSION := -$(CM_EXTRAVERSION) |
| 213 | endif |
| 214 | else |
| 215 | # If CM_BUILDTYPE is not defined, set to UNOFFICIAL |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 216 | CM_BUILDTYPE := UNOFFICIAL |
Ricardo Cerqueira | d8e7666 | 2012-06-08 11:08:15 +0100 | [diff] [blame] | 217 | CM_EXTRAVERSION := |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 218 | endif |
| 219 | |
| 220 | ifdef CM_RELEASE |
| 221 | CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD) |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 222 | else |
Chirayu Desai | e6e6163 | 2012-12-04 19:16:48 +0530 | [diff] [blame] | 223 | ifeq ($(PRODUCT_VERSION_MINOR),0) |
| 224 | CM_VERSION := $(PRODUCT_VERSION_MAJOR)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)-$(CM_BUILD)$(CM_EXTRAVERSION) |
| 225 | else |
| 226 | CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)-$(CM_BUILD)$(CM_EXTRAVERSION) |
| 227 | endif |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 228 | endif |
Koushik Dutta | d69b292 | 2012-02-23 14:07:44 -0800 | [diff] [blame] | 229 | |
| 230 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 231 | ro.cm.version=$(CM_VERSION) \ |
Warren Togami | b1637c8 | 2012-03-03 22:37:42 -1000 | [diff] [blame] | 232 | ro.modversion=$(CM_VERSION) |
Ricardo Cerqueira | d542274 | 2012-11-13 10:42:11 +0000 | [diff] [blame] | 233 | |
| 234 | |
| 235 | -include $(WORKSPACE)/hudson/image-auto-bits.mk |