micky387 | 18f07ac | 2019-06-10 00:40:50 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # Copyright (C) 2016 The CyanogenMod Project |
| 4 | # (C) 2017 The LineageOS Project |
| 5 | # (C) 2018 The Omnirom Project |
| 6 | # |
| 7 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | # you may not use this file except in compliance with the License. |
| 9 | # You may obtain a copy of the License at |
| 10 | # |
| 11 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | # |
| 13 | # Unless required by applicable law or agreed to in writing, software |
| 14 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | # See the License for the specific language governing permissions and |
| 17 | # limitations under the License. |
| 18 | # |
| 19 | |
| 20 | set -e |
| 21 | |
| 22 | # Required! |
| 23 | DEVICE=zenfone6 |
| 24 | VENDOR=asus |
| 25 | |
| 26 | INITIAL_COPYRIGHT_YEAR=2019 |
| 27 | |
| 28 | # Load extractutils and do some sanity checks |
| 29 | MY_DIR="${BASH_SOURCE%/*}" |
| 30 | if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi |
| 31 | |
| 32 | CM_ROOT="$MY_DIR"/../../.. |
| 33 | |
| 34 | HELPER="$CM_ROOT"/vendor/omni/build/tools/extract_utils.sh |
| 35 | if [ ! -f "$HELPER" ]; then |
| 36 | echo "Unable to find helper script at $HELPER" |
| 37 | exit 1 |
| 38 | fi |
| 39 | . "$HELPER" |
| 40 | |
| 41 | # Initialize the helper |
| 42 | setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT" |
| 43 | |
| 44 | # Copyright headers and guards |
| 45 | write_headers "zenfone6" |
| 46 | |
| 47 | # The standard blobs |
| 48 | write_makefiles "$MY_DIR"/proprietary-files.txt |
| 49 | |
| 50 | # Qualcomm BSP blobs - we put a conditional around here |
| 51 | # in case the BSP is actually being built |
| 52 | printf '\n%s\n' "ifeq (\$(QCPATH),)" >> "$PRODUCTMK" |
| 53 | printf '\n%s\n' "ifeq (\$(QCPATH),)" >> "$ANDROIDMK" |
| 54 | |
| 55 | write_makefiles "$MY_DIR"/proprietary-files-qc.txt |
| 56 | |
| 57 | # Qualcomm performance blobs - conditional as well |
| 58 | # in order to support Cyanogen OS builds |
| 59 | cat << EOF >> "$PRODUCTMK" |
| 60 | endif |
| 61 | |
| 62 | -include vendor/extra/devices.mk |
| 63 | ifneq (\$(call is-qc-perf-target),true) |
| 64 | EOF |
| 65 | |
| 66 | cat << EOF >> "$ANDROIDMK" |
| 67 | endif |
| 68 | |
| 69 | ifneq (\$(TARGET_HAVE_QC_PERF),true) |
| 70 | EOF |
| 71 | |
| 72 | write_makefiles "$MY_DIR"/proprietary-files-qc-perf.txt |
| 73 | |
| 74 | echo "endif" >> "$PRODUCTMK" |
| 75 | |
| 76 | cat << EOF >> "$ANDROIDMK" |
| 77 | |
| 78 | endif |
| 79 | |
| 80 | EOF |
| 81 | |
| 82 | # We are done! |
| 83 | write_footers |
| 84 | |