setup-makefiles.sh 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/bash
  2. #
  3. # SPDX-FileCopyrightText: 2016 The CyanogenMod Project
  4. # SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
  5. # SPDX-License-Identifier: Apache-2.0
  6. #
  7. function vendor_imports() {
  8. cat << EOF >> "$1"
  9. "device/xiaomi/sm8450-common",
  10. "hardware/qcom-caf/sm8450",
  11. "hardware/xiaomi",
  12. "vendor/qcom/opensource/commonsys-intf/display",
  13. EOF
  14. }
  15. function lib_to_package_fixup_vendor_variants() {
  16. if [ "$2" != "vendor" ]; then
  17. return 1
  18. fi
  19. case "$1" in
  20. libagmclient | \
  21. libagmmixer | \
  22. [email protected])
  23. ;;
  24. *)
  25. return 1
  26. esac
  27. }
  28. function lib_to_package_fixup() {
  29. lib_to_package_fixup_clang_rt_ubsan_standalone "$1" || \
  30. lib_to_package_fixup_proto_3_9_1 "$1" || \
  31. lib_to_package_fixup_vendor_variants "$@"
  32. }
  33. # If we're being sourced by the common script that we called,
  34. # stop right here. No need to go down the rabbit hole.
  35. if [ "${BASH_SOURCE[0]}" != "${0}" ]; then
  36. return
  37. fi
  38. set -e
  39. export DEVICE=cupid
  40. export DEVICE_COMMON=sm8450-common
  41. export VENDOR=xiaomi
  42. export VENDOR_COMMON=${VENDOR}
  43. "./../../${VENDOR_COMMON}/${DEVICE_COMMON}/setup-makefiles.sh" "$@"