setup-makefiles.sh 1.1 KB

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