From bafbd7acc3c3ec1cf594223dbf09c73b2c88d6bf Mon Sep 17 00:00:00 2001 From: Zhao Wei Liew Date: Sat, 7 Jan 2017 12:36:19 +0800 Subject: build: qcom_target: Clean up QCOM_HARDWARE_VARIANT checks Change-Id: I97f812412f94a0638e78eaf7e45112b6924120a9 --- core/qcom_target.mk | 38 ++++++++++++++++++++------------------ 1 file 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)) -- cgit v1.1