summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/qcom_target.mk38
1 files changed, 20 insertions, 18 deletions
diff --git a/core/qcom_target.mk b/core/qcom_target.mk
index 9ce451b..d5631ab 100644
--- a/core/qcom_target.mk
+++ b/core/qcom_target.mk
@@ -22,6 +22,10 @@ $(call project-set-path,qcom-$(2),$(strip $(path)))
endef
ifeq ($(BOARD_USES_QCOM_HARDWARE),true)
+ B_FAMILY := msm8226 msm8610 msm8974
+ B64_FAMILY := msm8992 msm8994
+ BR_FAMILY := msm8909 msm8916
+ UM_FAMILY := msm8937 msm8953
qcom_flags := -DQCOM_HARDWARE
qcom_flags += -DQCOM_BSP
@@ -55,24 +59,22 @@ ifeq ($(BOARD_USES_QCOM_HARDWARE),true)
2ND_CLANG_TARGET_GLOBAL_CFLAGS += $(qcom_flags)
2ND_CLANG_TARGET_GLOBAL_CPPFLAGS += $(qcom_flags)
- ifeq ($(QCOM_HARDWARE_VARIANT),)
- ifneq ($(filter msm8610 msm8226 msm8974,$(TARGET_BOARD_PLATFORM)),)
- QCOM_HARDWARE_VARIANT := msm8974
- else
- ifneq ($(filter msm8909 msm8916,$(TARGET_BOARD_PLATFORM)),)
- QCOM_HARDWARE_VARIANT := msm8916
- else
- ifneq ($(filter msm8953 msm8937,$(TARGET_BOARD_PLATFORM)),)
- QCOM_HARDWARE_VARIANT := msm8937
- else
- ifneq ($(filter msm8992 msm8994,$(TARGET_BOARD_PLATFORM)),)
- QCOM_HARDWARE_VARIANT := msm8994
- else
- QCOM_HARDWARE_VARIANT := $(TARGET_BOARD_PLATFORM)
- endif
- endif
- endif
- endif
+ ifeq ($(call is-board-platform-in-list, $(B_FAMILY)),true)
+ QCOM_HARDWARE_VARIANT := msm8974
+ else
+ ifeq ($(call is-board-platform-in-list, $(B64_FAMILY)),true)
+ QCOM_HARDWARE_VARIANT := msm8994
+ else
+ ifeq ($(call is-board-platform-in-list, $(BR_FAMILY)),true)
+ QCOM_HARDWARE_VARIANT := msm8916
+ else
+ ifeq ($(call is-board-platform-in-list, $(UM_FAMILY)),true)
+ QCOM_HARDWARE_VARIANT := msm8937
+ else
+ QCOM_HARDWARE_VARIANT := $(TARGET_BOARD_PLATFORM)
+ endif
+ endif
+ endif
endif
$(call project-set-path,qcom-audio,hardware/qcom/audio-caf/$(QCOM_HARDWARE_VARIANT))