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 | # To deal with CM9 specifications |
| 4 | # TODO: remove once all devices have been switched |
Steve Kondik | a894575 | 2012-03-14 00:10:33 -0700 | [diff] [blame] | 5 | ifneq ($(TARGET_BOOTANIMATION_NAME),) |
Steve Kondik | ba1ca33 | 2012-08-21 02:18:40 -0700 | [diff] [blame] | 6 | TARGET_SCREEN_DIMENSIONS := $(subst -, $(space), $(subst x, $(space), $(TARGET_BOOTANIMATION_NAME))) |
| 7 | ifeq ($(TARGET_SCREEN_WIDTH),) |
| 8 | TARGET_SCREEN_WIDTH := $(word 2, $(TARGET_SCREEN_DIMENSIONS)) |
| 9 | endif |
| 10 | ifeq ($(TARGET_SCREEN_HEIGHT),) |
| 11 | TARGET_SCREEN_HEIGHT := $(word 3, $(TARGET_SCREEN_DIMENSIONS)) |
| 12 | endif |
| 13 | endif |
| 14 | |
| 15 | ifneq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space)) |
| 16 | |
| 17 | # clear TARGET_BOOTANIMATION_NAME in case it was set for CM9 purposes |
| 18 | TARGET_BOOTANIMATION_NAME := |
| 19 | |
| 20 | # determine the smaller dimension |
| 21 | TARGET_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 |
| 29 | bootanimation_sizes := $(subst .zip,, $(shell ls vendor/cm/prebuilt/common/bootanimation)) |
| 30 | bootanimation_sizes := $(shell echo -e $(subst $(space),'\n',$(bootanimation_sizes)) | sort -rn) |
| 31 | |
| 32 | # find the appropriate size and set |
| 33 | define 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); )) |
| 42 | endef |
| 43 | $(foreach size,$(bootanimation_sizes), $(call check_and_set_bootanimation,$(size))) |
| 44 | |
| 45 | PRODUCT_COPY_FILES += \ |
| 46 | 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] | 47 | endif |
| 48 | |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 49 | ifdef CM_NIGHTLY |
| 50 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 51 | ro.rommanager.developerid=cyanogenmodnightly |
| 52 | else |
| 53 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 54 | ro.rommanager.developerid=cyanogenmod |
| 55 | endif |
| 56 | |
| 57 | PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0 |
| 58 | |
| 59 | PRODUCT_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 |
| 70 | PRODUCT_COPY_FILES += \ |
| 71 | vendor/cm/CHANGELOG.mkdn:system/etc/CHANGELOG-CM.txt |
| 72 | |
Warren Togami | b1637c8 | 2012-03-03 22:37:42 -1000 | [diff] [blame] | 73 | # Backup Tool |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 74 | PRODUCT_COPY_FILES += \ |
Warren Togami | b1637c8 | 2012-03-03 22:37:42 -1000 | [diff] [blame] | 75 | 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 Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 78 | |
Steve Kondik | 485527d | 2011-12-20 12:14:24 -0800 | [diff] [blame] | 79 | # init.d support |
| 80 | PRODUCT_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 Sullins | eb7799c | 2012-04-05 20:18:18 -0500 | [diff] [blame] | 84 | # userinit support |
| 85 | PRODUCT_COPY_FILES += \ |
| 86 | vendor/cm/prebuilt/common/etc/init.d/90userinit:system/etc/init.d/90userinit |
| 87 | |
Steve Kondik | 485527d | 2011-12-20 12:14:24 -0800 | [diff] [blame] | 88 | # Compcache/Zram support |
| 89 | PRODUCT_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. Kriebel | c2a88d6 | 2012-07-11 14:21:15 -0600 | [diff] [blame] | 94 | # Nam configuration script |
| 95 | PRODUCT_COPY_FILES += \ |
| 96 | vendor/cm/prebuilt/common/bin/modelid_cfg.sh:system/bin/modelid_cfg.sh |
| 97 | |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 98 | PRODUCT_COPY_FILES += \ |
Steve Kondik | a25e4e0 | 2011-12-14 22:27:07 -0800 | [diff] [blame] | 99 | vendor/cm/proprietary/Term.apk:system/app/Term.apk \ |
Steve Kondik | abfc079 | 2012-09-20 10:26:25 -0700 | [diff] [blame] | 100 | vendor/cm/proprietary/lib/armeabi/libjackpal-androidterm4.so:system/lib/libjackpal-androidterm4.so |
fitsnugly | 407b399 | 2012-01-14 18:50:25 -0500 | [diff] [blame] | 101 | |
Adam Farden | db2438b | 2012-03-07 14:34:38 +0100 | [diff] [blame] | 102 | # Bring in camera effects |
fitsnugly | 407b399 | 2012-01-14 18:50:25 -0500 | [diff] [blame] | 103 | PRODUCT_COPY_FILES += \ |
fitsnugly | c1c6ce2 | 2012-01-12 01:10:39 -0500 | [diff] [blame] | 104 | vendor/cm/prebuilt/common/media/LMprec_508.emd:system/media/LMprec_508.emd \ |
| 105 | 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] | 106 | |
| 107 | # Enable SIP+VoIP on all targets |
| 108 | PRODUCT_COPY_FILES += \ |
Ricardo Cerqueira | 3ff9b6f | 2012-07-11 11:21:50 +0100 | [diff] [blame] | 109 | 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] | 110 | |
Steve Kondik | e0c12da | 2012-03-25 17:21:32 -0700 | [diff] [blame] | 111 | # This is CM! |
| 112 | PRODUCT_COPY_FILES += \ |
| 113 | vendor/cm/config/permissions/com.cyanogenmod.android.xml:system/etc/permissions/com.cyanogenmod.android.xml |
| 114 | |
Mike Kasick | 511d609 | 2012-01-26 17:54:31 -0500 | [diff] [blame] | 115 | # Don't export PS1 in /system/etc/mkshrc. |
| 116 | PRODUCT_COPY_FILES += \ |
| 117 | vendor/cm/prebuilt/common/etc/mkshrc:system/etc/mkshrc |
| 118 | |
Ricardo Cerqueira | 9f75d84 | 2012-05-04 10:15:56 +0100 | [diff] [blame] | 119 | # T-Mobile theme engine |
| 120 | include vendor/cm/config/themes_common.mk |
| 121 | |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 122 | # Required CM packages |
| 123 | PRODUCT_PACKAGES += \ |
Steve Kondik | e0c297d | 2011-12-20 16:16:01 -0800 | [diff] [blame] | 124 | Camera \ |
| 125 | Development \ |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 126 | LatinIME \ |
Steve Kondik | e0c297d | 2011-12-20 16:16:01 -0800 | [diff] [blame] | 127 | SpareParts \ |
Koushik Dutta | 05dc42e | 2011-11-25 18:02:09 -0800 | [diff] [blame] | 128 | Superuser \ |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 129 | su |
| 130 | |
| 131 | # Optional CM packages |
| 132 | PRODUCT_PACKAGES += \ |
Koushik Dutta | 74d3bad | 2011-11-27 13:00:30 -0800 | [diff] [blame] | 133 | VideoEditor \ |
| 134 | VoiceDialer \ |
Warren Togami | 5960a70 | 2012-02-22 09:22:42 -1000 | [diff] [blame] | 135 | SoundRecorder \ |
Andreas Schneider | a69dc02 | 2012-08-28 12:21:46 +0200 | [diff] [blame] | 136 | Basic |
Koushik Dutta | 8387c32 | 2011-11-26 17:31:19 -0800 | [diff] [blame] | 137 | |
Steve Kondik | 04a4941 | 2011-12-14 14:02:19 -0800 | [diff] [blame] | 138 | # Custom CM packages |
| 139 | PRODUCT_PACKAGES += \ |
nebkat | 0acffd5 | 2011-12-22 16:47:22 +0000 | [diff] [blame] | 140 | Trebuchet \ |
Steve Kondik | 04a4941 | 2011-12-14 14:02:19 -0800 | [diff] [blame] | 141 | DSPManager \ |
Steve Kondik | a25e4e0 | 2011-12-14 22:27:07 -0800 | [diff] [blame] | 142 | libcyanogen-dsp \ |
Steve Kondik | fcc1610 | 2012-05-05 16:23:24 -0700 | [diff] [blame] | 143 | audio_effects.conf \ |
Ricardo Cerqueira | 3dc4354 | 2012-05-25 04:31:26 +0400 | [diff] [blame] | 144 | CMWallpapers \ |
Ricardo Cerqueira | 2526fef | 2012-09-29 17:17:45 +0100 | [diff] [blame] | 145 | Apollo \ |
| 146 | CMUpdater |
Steve Kondik | 04a4941 | 2011-12-14 14:02:19 -0800 | [diff] [blame] | 147 | |
Sebastian Schmidt | 7d5de0c | 2012-04-15 11:39:25 +0200 | [diff] [blame] | 148 | # Extra tools in CM |
| 149 | PRODUCT_PACKAGES += \ |
Steve Kondik | 0898028 | 2012-07-05 01:20:47 -0700 | [diff] [blame] | 150 | openvpn \ |
| 151 | e2fsck \ |
| 152 | mke2fs \ |
Steve Kondik | 1949eb5 | 2012-09-20 17:09:07 -0700 | [diff] [blame] | 153 | tune2fs \ |
| 154 | bash \ |
| 155 | vim \ |
| 156 | nano \ |
| 157 | htop \ |
| 158 | powertop \ |
| 159 | lsof |
Sebastian Schmidt | 7d5de0c | 2012-04-15 11:39:25 +0200 | [diff] [blame] | 160 | |
Chirayu Desai | 8636d67 | 2012-07-19 16:04:25 +0530 | [diff] [blame] | 161 | # Openssh |
| 162 | PRODUCT_PACKAGES += \ |
| 163 | scp \ |
| 164 | sftp \ |
| 165 | ssh \ |
| 166 | sshd \ |
| 167 | sshd_config \ |
| 168 | ssh-keygen \ |
Chirayu Desai | 4bacf67 | 2012-08-19 17:30:04 +0530 | [diff] [blame] | 169 | start-ssh |
| 170 | |
| 171 | # rsync |
| 172 | PRODUCT_PACKAGES += \ |
| 173 | rsync |
Chirayu Desai | 8636d67 | 2012-07-19 16:04:25 +0530 | [diff] [blame] | 174 | |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 175 | PRODUCT_PACKAGE_OVERLAYS += vendor/cm/overlay/dictionaries |
Steve Kondik | 254db26 | 2011-12-20 15:02:07 -0800 | [diff] [blame] | 176 | PRODUCT_PACKAGE_OVERLAYS += vendor/cm/overlay/common |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 177 | |
Ricardo Cerqueira | ed3e91e | 2012-07-11 16:05:12 +0100 | [diff] [blame] | 178 | PRODUCT_VERSION_MAJOR = 10 |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 179 | PRODUCT_VERSION_MINOR = 0 |
Ricardo Cerqueira | ed3e91e | 2012-07-11 16:05:12 +0100 | [diff] [blame] | 180 | PRODUCT_VERSION_MAINTENANCE = 0-RC0 |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 181 | |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 182 | # Set CM_BUILDTYPE |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 183 | ifdef CM_NIGHTLY |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 184 | CM_BUILDTYPE := NIGHTLY |
| 185 | endif |
| 186 | ifdef CM_EXPERIMENTAL |
| 187 | CM_BUILDTYPE := EXPERIMENTAL |
| 188 | endif |
| 189 | ifdef CM_RELEASE |
| 190 | CM_BUILDTYPE := RELEASE |
| 191 | endif |
| 192 | |
Ricardo Cerqueira | d8e7666 | 2012-06-08 11:08:15 +0100 | [diff] [blame] | 193 | ifdef CM_BUILDTYPE |
| 194 | ifdef CM_EXTRAVERSION |
| 195 | # Force build type to EXPERIMENTAL |
| 196 | CM_BUILDTYPE := EXPERIMENTAL |
| 197 | # Add leading dash to CM_EXTRAVERSION |
| 198 | CM_EXTRAVERSION := -$(CM_EXTRAVERSION) |
| 199 | endif |
| 200 | else |
| 201 | # If CM_BUILDTYPE is not defined, set to UNOFFICIAL |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 202 | CM_BUILDTYPE := UNOFFICIAL |
Ricardo Cerqueira | d8e7666 | 2012-06-08 11:08:15 +0100 | [diff] [blame] | 203 | CM_EXTRAVERSION := |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 204 | endif |
| 205 | |
| 206 | ifdef CM_RELEASE |
| 207 | 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] | 208 | else |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 209 | CM_VERSION := $(PRODUCT_VERSION_MAJOR)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)-$(CM_BUILD)$(CM_EXTRAVERSION) |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 210 | endif |
Koushik Dutta | d69b292 | 2012-02-23 14:07:44 -0800 | [diff] [blame] | 211 | |
| 212 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 213 | ro.cm.version=$(CM_VERSION) \ |
Warren Togami | b1637c8 | 2012-03-03 22:37:42 -1000 | [diff] [blame] | 214 | ro.modversion=$(CM_VERSION) |