You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

138 lines
4.6 KiB

  1. #!/bin/sh
  2. # Copyright (C) 2013 The CyanogenMod Project
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. # This file is generated by device/common/generate-blob-scripts.sh - DO NOT EDIT
  16. VENDOR=samsung
  17. COMMON=galaxys2-common
  18. COMMONOUTDIR=vendor/$VENDOR/$COMMON
  19. COMMONBASE=../../../$COMMONOUTDIR/proprietary
  20. COMMONMAKEFILE=../../../$COMMONOUTDIR/common-vendor-blobs.mk
  21. COMMONPROPS=../galaxys2-common/proprietary-files.txt
  22. mkdir -p ../../../vendor/$VENDOR/$COMMON/proprietary
  23. adb root
  24. adb wait-for-device
  25. echo "Pulling common files..."
  26. for FILE in `cat $COMMONPROPS | grep -v ^# | grep -v ^$`; do
  27. DIR=`dirname $FILE`
  28. if [ ! -d $COMMONBASE/$DIR ]; then
  29. mkdir -p $COMMONBASE/$DIR
  30. fi
  31. adb pull /$FILE $COMMONBASE/$FILE
  32. done
  33. (cat << EOF) | sed s/__COMMON__/$COMMON/g | sed s/__VENDOR__/$VENDOR/g > $COMMONMAKEFILE
  34. # Copyright (C) 2012 The CyanogenMod Project
  35. #
  36. # Licensed under the Apache License, Version 2.0 (the "License");
  37. # you may not use this file except in compliance with the License.
  38. # You may obtain a copy of the License at
  39. #
  40. # http://www.apache.org/licenses/LICENSE-2.0
  41. #
  42. # Unless required by applicable law or agreed to in writing, software
  43. # distributed under the License is distributed on an "AS IS" BASIS,
  44. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  45. # See the License for the specific language governing permissions and
  46. # limitations under the License.
  47. PRODUCT_PACKAGES += \\
  48. libUMP \\
  49. libfimc
  50. PRODUCT_COPY_FILES += \\
  51. \$(LOCAL_PATH)/proprietary/sbin/cbd:root/sbin/cbd
  52. PRODUCT_COPY_FILES += \\
  53. EOF
  54. LINEEND=" \\"
  55. COUNT=`cat $COMMONPROPS | grep -v ^# | grep -v ^$ | wc -l | awk {'print $1'}`
  56. for FILE in `cat $COMMONPROPS | grep -v ^# | grep -v ^$`; do
  57. COUNT=`expr $COUNT - 1`
  58. if [ $COUNT = "0" ]; then
  59. LINEEND=""
  60. fi
  61. echo " $COMMONOUTDIR/proprietary/$FILE:$FILE$LINEEND" >> $COMMONMAKEFILE
  62. done
  63. (cat << EOF) | sed s/__COMMON__/$COMMON/g | sed s/__VENDOR__/$VENDOR/g > $COMMONBASE/Android.mk
  64. # Copyright (C) 2012 The CyanogenMod Project
  65. #
  66. # Licensed under the Apache License, Version 2.0 (the "License");
  67. # you may not use this file except in compliance with the License.
  68. # You may obtain a copy of the License at
  69. #
  70. # http://www.apache.org/licenses/LICENSE-2.0
  71. #
  72. # Unless required by applicable law or agreed to in writing, software
  73. # distributed under the License is distributed on an "AS IS" BASIS,
  74. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  75. # See the License for the specific language governing permissions and
  76. # limitations under the License.
  77. LOCAL_PATH := \$(call my-dir)
  78. ifneq (\$(filter i777 i9100 sc02c n7000,\$(TARGET_DEVICE)),)
  79. include \$(CLEAR_VARS)
  80. LOCAL_MODULE := libUMP
  81. LOCAL_MODULE_OWNER := samsung
  82. LOCAL_SRC_FILES := system/lib/libUMP.so
  83. LOCAL_MODULE_TAGS := optional
  84. LOCAL_MODULE_SUFFIX := .so
  85. LOCAL_MODULE_CLASS := SHARED_LIBRARIES
  86. LOCAL_MODULE_PATH := \$(TARGET_OUT)/lib
  87. include \$(BUILD_PREBUILT)
  88. include \$(CLEAR_VARS)
  89. LOCAL_MODULE := libfimc
  90. LOCAL_MODULE_OWNER := samsung
  91. LOCAL_SRC_FILES := system/lib/libfimc.so
  92. LOCAL_MODULE_TAGS := optional
  93. LOCAL_MODULE_SUFFIX := .so
  94. LOCAL_MODULE_CLASS := SHARED_LIBRARIES
  95. LOCAL_MODULE_PATH := \$(TARGET_OUT)/lib
  96. include \$(BUILD_PREBUILT)
  97. endif
  98. EOF
  99. (cat << EOF) | sed s/__COMMON__/$COMMON/g | sed s/__VENDOR__/$VENDOR/g > ../../../$COMMONOUTDIR/common-vendor.mk
  100. # Copyright (C) 2012 The CyanogenMod Project
  101. #
  102. # Licensed under the Apache License, Version 2.0 (the "License");
  103. # you may not use this file except in compliance with the License.
  104. # You may obtain a copy of the License at
  105. #
  106. # http://www.apache.org/licenses/LICENSE-2.0
  107. #
  108. # Unless required by applicable law or agreed to in writing, software
  109. # distributed under the License is distributed on an "AS IS" BASIS,
  110. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  111. # See the License for the specific language governing permissions and
  112. # limitations under the License.
  113. # Pick up overlay for features that depend on non-open-source files
  114. DEVICE_PACKAGE_OVERLAYS += vendor/__VENDOR__/__COMMON__/overlay
  115. \$(call inherit-product, vendor/__VENDOR__/__COMMON__/common-vendor-blobs.mk)
  116. EOF