android_device_oneplus_dre/setup-makefiles.sh
Aaron Kling 29f5285274 dre: Add vendor soong imports to extract
Change-Id: Ib19e69dc35af6b04519eeb695228af65f3d01d2a
2024-10-07 19:17:57 -05:00

48 lines
1.1 KiB
Bash
Executable file

#!/bin/bash
#
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
# SPDX-License-Identifier: Apache-2.0
#
set -e
DEVICE=dre
VENDOR=oneplus
# Load extract_utils and do some sanity checks
MY_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
ANDROID_ROOT="${MY_DIR}/../../.."
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
if [ ! -f "${HELPER}" ]; then
echo "Unable to find helper script at ${HELPER}"
exit 1
fi
source "${HELPER}"
function vendor_imports() {
cat << EOF >> "$1"
"device/oneplus/dre",
"hardware/qcom-caf/sm8350",
"hardware/qcom-caf/wlan",
"hardware/oplus",
"vendor/qcom/opensource/commonsys/display",
"vendor/qcom/opensource/commonsys-intf/display",
"vendor/qcom/opensource/dataservices",
"vendor/qcom/opensource/display",
EOF
}
# Initialize the helper
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}"
# Warning headers and guards
write_headers
write_makefiles "${MY_DIR}/proprietary-files.txt"
# Finish
write_footers