cm: Commonize cmsdk specific targets.
Change-Id: Idb5884d37722c0d2334cb805e2855dbf03835fc3
diff --git a/config/cmsdk_common.mk b/config/cmsdk_common.mk
new file mode 100644
index 0000000..06081b9
--- /dev/null
+++ b/config/cmsdk_common.mk
@@ -0,0 +1,41 @@
+# Permissions for cmsdk services
+PRODUCT_COPY_FILES += \
+ vendor/bliss/config/permissions/org.cyanogenmod.theme.xml:system/etc/permissions/org.cyanogenmod.theme.xml \
+ vendor/bliss/config/permissions/org.cyanogenmod.livelockscreen.xml:system/etc/permissions/org.cyanogenmod.livelockscreen.xml
+
+# CM Platform Library
+PRODUCT_PACKAGES += \
+ org.cyanogenmod.platform-res \
+ org.cyanogenmod.platform \
+ org.cyanogenmod.platform.xml
+
+# CM Hardware Abstraction Framework
+PRODUCT_PACKAGES += \
+ org.cyanogenmod.hardware \
+ org.cyanogenmod.hardware.xml
+
+ifndef CM_PLATFORM_SDK_VERSION
+ # This is the canonical definition of the SDK version, which defines
+ # the set of APIs and functionality available in the platform. It
+ # is a single integer that increases monotonically as updates to
+ # the SDK are released. It should only be incremented when the APIs for
+ # the new release are frozen (so that developers don't write apps against
+ # intermediate builds).
+ CM_PLATFORM_SDK_VERSION := 5
+endif
+
+ifndef CM_PLATFORM_REV
+ # For internal SDK revisions that are hotfixed/patched
+ # Reset after each CM_PLATFORM_SDK_VERSION release
+ # If you are doing a release and this is NOT 0, you are almost certainly doing it wrong
+ CM_PLATFORM_REV := 0
+endif
+
+# CyanogenMod Platform SDK Version
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.cm.build.version.plat.sdk=$(CM_PLATFORM_SDK_VERSION)
+
+# CyanogenMod Platform Internal
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.cm.build.version.plat.rev=$(CM_PLATFORM_REV)
+
diff --git a/config/common.mk b/config/common.mk
index 53dcf2a..bd77515 100644
--- a/config/common.mk
+++ b/config/common.mk
@@ -117,16 +117,15 @@
PRODUCT_COPY_FILES += \
vendor/bliss/config/permissions/com.bliss.android.xml:system/etc/permissions/com.bliss.android.xml
-# Live lockscreen
-PRODUCT_COPY_FILES += \
- vendor/bliss/config/permissions/org.cyanogenmod.livelockscreen.xml:system/etc/permissions/org.cyanogenmod.livelockscreen.xml
-
# Theme engine
include vendor/bliss/config/themes_common.mk
# Bliss Audio Mods
-include vendor/bliss/config/bliss_audio_mod.mk
+# CMSDK
+include vendor/bliss/config/cmsdk_common.mk
+
# Required CM packages
PRODUCT_PACKAGES += \
Development \
@@ -155,17 +154,6 @@
PRODUCT_PACKAGES += \
Exchange2
-# CM Platform Library
-PRODUCT_PACKAGES += \
- org.cyanogenmod.platform-res \
- org.cyanogenmod.platform \
- org.cyanogenmod.platform.xml
-
-# CM Hardware Abstraction Framework
-PRODUCT_PACKAGES += \
- org.cyanogenmod.hardware \
- org.cyanogenmod.hardware.xml
-
# Other packages
PRODUCT_PACKAGES += \
BlissOTA \
@@ -286,30 +274,6 @@
vendor/bliss/prebuilt/common/UPDATE-SuperSU.zip:system/addon.d/UPDATE-SuperSU.zip \
vendor/bliss/prebuilt/common/etc/init.d/99SuperSUDaemon:system/etc/init.d/99SuperSUDaemon
-ifndef CM_PLATFORM_SDK_VERSION
- # This is the canonical definition of the SDK version, which defines
- # the set of APIs and functionality available in the platform. It
- # is a single integer that increases monotonically as updates to
- # the SDK are released. It should only be incremented when the APIs for
- # the new release are frozen (so that developers don't write apps against
- # intermediate builds).
- CM_PLATFORM_SDK_VERSION := 5
-endif
-
-ifndef CM_PLATFORM_REV
- # For internal SDK revisions that are hotfixed/patched
- # Reset after each CM_PLATFORM_SDK_VERSION release
- # If you are doing a release and this is NOT 0, you are almost certainly doing it wrong
- CM_PLATFORM_REV := 0
-endif
-
-# CyanogenMod Platform SDK Version
-PRODUCT_PROPERTY_OVERRIDES += \
- ro.cm.build.version.plat.sdk=$(CM_PLATFORM_SDK_VERSION)
-
-# CyanogenMod Platform Internal
-PRODUCT_PROPERTY_OVERRIDES += \
- ro.cm.build.version.plat.rev=$(CM_PLATFORM_REV)
-include $(WORKSPACE)/build_env/image-auto-bits.mk
diff --git a/config/themes_common.mk b/config/themes_common.mk
index 12caa3f..f16b52b 100644
--- a/config/themes_common.mk
+++ b/config/themes_common.mk
@@ -3,6 +3,3 @@
aapt \
ThemeChooser \
ThemesProvider
-
-PRODUCT_COPY_FILES += \
- vendor/bliss/config/permissions/org.cyanogenmod.theme.xml:system/etc/permissions/org.cyanogenmod.theme.xml