blob: 2bcf6b34a0b4c5729805befcc3a8832b4833b66f [file] [log] [blame]
Steve Kondik7d3ab392013-12-28 15:48:20 -08001# Target-specific configuration
2
Ethan Chen05f18482014-11-08 23:07:16 -08003# Populate the qcom hardware variants in the project pathmap.
4define qcom-set-path-variant
5$(call project-set-path-variant,qcom-$(2),TARGET_QCOM_$(1)_VARIANT,hardware/qcom/$(2))
6endef
7
Steve Kondik7d3ab392013-12-28 15:48:20 -08008ifeq ($(BOARD_USES_QCOM_HARDWARE),true)
9
Ethan Chen5c5f5592014-12-15 18:44:31 -080010 qcom_flags := -DQCOM_HARDWARE
11 qcom_flags += -DQCOM_BSP
Steve Kondik7d3ab392013-12-28 15:48:20 -080012
Ethan Chen84c72702014-11-10 14:34:48 -080013 TARGET_USES_QCOM_BSP := true
Ethan Chen84c72702014-11-10 14:34:48 -080014 TARGET_ENABLE_QC_AV_ENHANCEMENTS := true
Steve Kondik7d3ab392013-12-28 15:48:20 -080015
16 # Enable DirectTrack for legacy targets
Ethan Chen84c72702014-11-10 14:34:48 -080017 ifneq ($(filter msm7x30 msm8660 msm8960,$(TARGET_BOARD_PLATFORM)),)
Ethan Chen5c5f5592014-12-15 18:44:31 -080018 ifeq ($(BOARD_USES_LEGACY_ALSA_AUDIO),true)
19 qcom_flags += -DQCOM_DIRECTTRACK
20 endif
Michael Bestaseb253282014-12-09 07:28:17 +010021 # Enable legacy graphics functions
Ethan Chen5c5f5592014-12-15 18:44:31 -080022 qcom_flags += -DQCOM_BSP_LEGACY
Ethan Chen84c72702014-11-10 14:34:48 -080023 endif
Tom Marshall77547852014-09-18 09:45:33 -070024
Ethan Chen5c5f5592014-12-15 18:44:31 -080025 TARGET_GLOBAL_CFLAGS += $(qcom_flags)
26 TARGET_GLOBAL_CPPFLAGS += $(qcom_flags)
Ethan Chenfd42f222014-12-15 18:45:19 -080027 CLANG_TARGET_GLOBAL_CFLAGS += $(qcom_flags)
28 CLANG_TARGET_GLOBAL_CPPFLAGS += $(qcom_flags)
Ethan Chen5c5f5592014-12-15 18:44:31 -080029
Steve Kondik1646dc52014-12-24 21:58:01 -080030 # Multiarch needs these too..
31 2ND_TARGET_GLOBAL_CFLAGS += $(qcom_flags)
32 2ND_TARGET_GLOBAL_CPPFLAGS += $(qcom_flags)
33 2ND_CLANG_TARGET_GLOBAL_CFLAGS += $(qcom_flags)
34 2ND_CLANG_TARGET_GLOBAL_CFLAGS += $(qcom_flags)
35
Anthony King11223832014-11-17 22:06:31 +000036$(call project-set-path,qcom-audio,hardware/qcom/audio-caf/$(TARGET_BOARD_PLATFORM))
Tom Marshall77547852014-09-18 09:45:33 -070037$(call qcom-set-path-variant,CAMERA,camera)
Anthony King11223832014-11-17 22:06:31 +000038$(call project-set-path,qcom-display,hardware/qcom/display-caf/$(TARGET_BOARD_PLATFORM))
Tom Marshall77547852014-09-18 09:45:33 -070039$(call qcom-set-path-variant,GPS,gps)
Anthony King11223832014-11-17 22:06:31 +000040$(call project-set-path,qcom-media,hardware/qcom/media-caf/$(TARGET_BOARD_PLATFORM))
Tom Marshall77547852014-09-18 09:45:33 -070041$(call qcom-set-path-variant,SENSORS,sensors)
Ethan Chen05f18482014-11-08 23:07:16 -080042else
43$(call project-set-path,qcom-audio,hardware/qcom/audio)
44$(call qcom-set-path-variant,CAMERA,camera)
Anthony King11223832014-11-17 22:06:31 +000045$(call project-set-path,qcom-display,hardware/qcom/display/$(TARGET_BOARD_PLATFORM))
Ethan Chen05f18482014-11-08 23:07:16 -080046$(call qcom-set-path-variant,GPS,gps)
Lars Greiss048b9382014-11-19 14:47:45 +010047$(call project-set-path,qcom-media,hardware/qcom/media)
Ethan Chen05f18482014-11-08 23:07:16 -080048$(call qcom-set-path-variant,SENSORS,sensors)
49endif