Add master branch change.
Change-Id: I8892b7102753d29fefb4e23a7a7cc67c01157560
diff --git a/mbtk/Make.defines b/mbtk/Make.defines
index 8f82632..fd8ec51 100755
--- a/mbtk/Make.defines
+++ b/mbtk/Make.defines
@@ -32,6 +32,7 @@
$(info BUILD_LIB_TYPE=$(BUILD_LIB_TYPE))
$(info BUILD_PLATFORM=$(BUILD_PLATFORM))
$(info BUILD_BRANCH=$(BUILD_BRANCH))
+$(info BUILD_PROJECT=$(BUILD_PROJECT))
$(info ROOT=$(ROOT))
$(info CC=$(CC))
$(info AR=$(AR))
@@ -65,26 +66,35 @@
-D_GNU_SOURCE
#$(info TOPDIR=$(TOPDIR))
-BUILD_PROJECT=$(shell cat $(ROOT)/../build_version | grep PROJECT | cut -d '=' -f 2)
-$(info BUILD_PROJECT=$(BUILD_PROJECT))
+# BUILD_PROJECT=$(shell cat $(ROOT)/../build_version | grep PROJECT | cut -d '=' -f 2)
+#$(info BUILD_PROJECT=$(BUILD_PROJECT))
#BUILD_PROJECT_X=$(shell ${BUILD_PROJECT:0:4})
#BUILD_PROJECT_X=$(shell echo $(BUILD_PROJECT) | cut -c 1-4)
#$(info BUILD_PROJECT_X=$(BUILD_PROJECT_X))
+# 1806
ifeq ($(BUILD_PLATFORM), asr1806)
DEFINE += -DMBTK_PLATFORM_ASR1806
-ifeq ($(shell echo $(BUILD_PROJECT) | cut -c 1-7), L508_X6)
-$(info BUILD_PROJECT=L508_X6)
+ifeq ($(BUILD_PROJECT), L508_X6)
DEFINE += -DMBTK_PROJECT_L508_X6
else
-ifeq ($(shell echo $(BUILD_PROJECT) | cut -c 1-4), T108)
-$(info BUILD_PROJECT=T108)
+ifeq ($(BUILD_PROJECT), T108)
DEFINE += -DMBTK_PROJECT_T108
else
+ifeq ($(BUILD_PROJECT), L508)
+DEFINE += -DMBTK_PROJECT_L508
+else
+ifeq ($(BUILD_PROJECT), L509)
+DEFINE += -DMBTK_PROJECT_L509
+else
$(info BUILD_PROJECT=Unknown)
endif
endif
+endif
+endif
+
+# 1803
else
DEFINE += -DMBTK_POLARSSL_SUPPORT
@@ -94,17 +104,16 @@
DEFINE += -DMBTK_PLATFORM_ASR1803
-ifeq ($(shell echo $(BUILD_PROJECT) | cut -c 1-4), L508)
-$(info BUILD_PROJECT=L508)
+ifeq ($(BUILD_PROJECT), L508)
DEFINE += -DMBTK_PROJECT_L508
else
-ifeq ($(shell echo $(BUILD_PROJECT) | cut -c 1-4), L509)
-$(info BUILD_PROJECT=L509)
+ifeq ($(BUILD_PROJECT), L509)
DEFINE += -DMBTK_PROJECT_L509
else
-ifeq ($(shell echo $(BUILD_PROJECT) | cut -c 1-6), PN1803)
-$(info BUILD_PROJECT=PN1803)
+ifeq ($(BUILD_PROJECT), PN1803)
DEFINE += -DMBTK_PROJECT_PN1803
+else
+$(info BUILD_PROJECT=Unknown)
endif
endif
endif
@@ -122,6 +131,19 @@
DEFINE += -DMBTK_YX_SUPPORT
endif
+MBTK_SG_SUPPORT=$(shell cat $(ROOT)/config | grep CONFIG_SG_SUPPORT | cut -d '=' -f 2)
+$(info MBTK_SG_SUPPORT=$(MBTK_SG_SUPPORT))
+ifeq ($(MBTK_SG_SUPPORT), y)
+DEFINE += -DMBTK_SG_SUPPORT
+DEFINE += -DMBTK_ALL_CID_SUPPORT
+endif
+
+MBTK_ALL_CID_SUPPORT=$(shell cat $(ROOT)/config | grep CONFIG_MBTK_ALL_CID_SUPPORT | cut -d '=' -f 2)
+$(info MBTK_ALL_CID_SUPPORT=$(MBTK_ALL_CID_SUPPORT))
+ifeq ($(MBTK_ALL_CID_SUPPORT), y)
+DEFINE += -DMBTK_ALL_CID_SUPPORT
+endif
+
MBTK_GNSS_MODE=$(shell cat $(ROOT)/config | grep CONFIG_MBTK_GNSS_MODE | cut -d '=' -f 2)
$(info MBTK_GNSS_MODE=$(MBTK_GNSS_MODE))
ifeq ($(MBTK_GNSS_MODE), gnss_6228)