summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhao Wei Liew <zhaoweiliew@gmail.com>2017-01-07 12:36:19 +0800
committerZhao Wei Liew <zhaoweiliew@gmail.com>2017-01-08 02:05:00 +0000
commitbafbd7acc3c3ec1cf594223dbf09c73b2c88d6bf (patch)
treeb9f8b6bf732ba72bb5643f199b63ca2f826e68be
parent6be9bd73c705f9762831f5149f5273293dabc7ae (diff)
downloadbuild-bafbd7acc3c3ec1cf594223dbf09c73b2c88d6bf.zip
build-bafbd7acc3c3ec1cf594223dbf09c73b2c88d6bf.tar.gz
build-bafbd7acc3c3ec1cf594223dbf09c73b2c88d6bf.tar.bz2
build: qcom_target: Clean up QCOM_HARDWARE_VARIANT checks
Change-Id: I97f812412f94a0638e78eaf7e45112b6924120a9
-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))