troika: Switch to patchelf from tools-lineage
[GitHub/LineageOS/android_device_motorola_troika.git] / setup-makefiles.sh
CommitLineData
8d7fdab7
JA
1#!/bin/bash
2#
7363fe0f 3# Copyright (C) 2016 The CyanogenMod Project
8d7fdab7
JA
4# Copyright (C) 2017-2020 The LineageOS Project
5#
7363fe0f 6# SPDX-License-Identifier: Apache-2.0
8d7fdab7
JA
7#
8
9set -e
10
8d7fdab7 11DEVICE=troika
7363fe0f 12VENDOR=motorola
8d7fdab7
JA
13
14# Load extract_utils and do some sanity checks
15MY_DIR="${BASH_SOURCE%/*}"
16if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
17
7363fe0f 18ANDROID_ROOT="${MY_DIR}/../../.."
8d7fdab7 19
7363fe0f 20HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
8d7fdab7
JA
21if [ ! -f "${HELPER}" ]; then
22 echo "Unable to find helper script at ${HELPER}"
23 exit 1
24fi
25source "${HELPER}"
26
27# Initialize the helper
7363fe0f 28setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}"
8d7fdab7 29
7363fe0f
MB
30# Warning headers and guards
31write_headers
8d7fdab7 32
8d7fdab7
JA
33write_makefiles "${MY_DIR}/proprietary-files.txt" true
34
35# Finish
36write_footers