summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorDiogo Ferreira <diogo@underdev.org>2016-03-16 19:04:48 +0000
committerRicardo Cerqueira <ricardo@cyngn.com>2016-04-08 12:51:45 +0100
commite7ac98d6826afe6dad141beef85311b36040705f (patch)
tree67be90466f315e3c93c4bd2b19dd5a52824990a3 /core
parent375268cd4fc9af9c3ab0a24870c3a912cb9edd76 (diff)
downloadbuild-e7ac98d6826afe6dad141beef85311b36040705f.zip
build-e7ac98d6826afe6dad141beef85311b36040705f.tar.gz
build-e7ac98d6826afe6dad141beef85311b36040705f.tar.bz2
build: Add MTK support
When setting BOARD_USES_MTK_HARDWARE, a global MTK_HARDWARE define will be available to all target modules. Change-Id: Id2a2996139a31afb6eb37f7ee24202587cb4beb1
Diffstat (limited to 'core')
-rw-r--r--core/config.mk3
-rw-r--r--core/mtk_target.mk13
2 files changed, 16 insertions, 0 deletions
diff --git a/core/config.mk b/core/config.mk
index 9344958..4fd5bda 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -566,6 +566,9 @@ endif
# Rules for QCOM targets
include $(BUILD_SYSTEM)/qcom_target.mk
+# Rules for MTK targets
+include $(BUILD_SYSTEM)/mtk_target.mk
+
# ###############################################################
# Set up final options.
# ###############################################################
diff --git a/core/mtk_target.mk b/core/mtk_target.mk
new file mode 100644
index 0000000..7c3ba1f
--- /dev/null
+++ b/core/mtk_target.mk
@@ -0,0 +1,13 @@
+ifeq ($(BOARD_USES_MTK_HARDWARE),true)
+ mtk_flags := -DMTK_HARDWARE
+
+ TARGET_GLOBAL_CFLAGS += $(mtk_flags)
+ TARGET_GLOBAL_CPPFLAGS += $(mtk_flags)
+ CLANG_TARGET_GLOBAL_CFLAGS += $(mtk_flags)
+ CLANG_TARGET_GLOBAL_CPPFLAGS += $(mtk_flags)
+
+ 2ND_TARGET_GLOBAL_CFLAGS += $(mtk_flags)
+ 2ND_TARGET_GLOBAL_CPPFLAGS += $(mtk_flags)
+ 2ND_CLANG_TARGET_GLOBAL_CFLAGS += $(mtk_flags)
+ 2ND_CLANG_TARGET_GLOBAL_CPPFLAGS += $(mtk_flags)
+endif