[Feature][R306][task-view-654]nand support based on prj_mifi_min project

    Only Configure: Yes
    Affected branch: master
    Affected module: FLASH
    Is it affected on both ZXIC and MTK: only ZXIC
    Self-test: Yes
    Doc Update: No

Change-Id: Ic76866365a81e3c53b091dbb5da2a87fa8af4e84
diff --git a/Makefile b/Makefile
index c7bca08..5e808ef 100755
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,7 @@
 RF_TYPES ?= 230A
 DCXOS ?= yes
 PATH_PRJ ?= lynq/CPE
+PATCH ?= no
 ifeq ($(RF_TYPES), 230A)
 RF_TYPE_R306 = RF_TYPE=230A
 endif
@@ -29,6 +30,11 @@
 .PHONY:copy
 copy:
 	cp -rf $(PATH_PRJ)/* .
+ifeq ($(PATCH), yes)
+	cp -rf $(PATH_PRJ)/nand_patch/* .
+else
+	@echo PATCH=no
+endif
 .PHONY:help
 help:
 	@echo example prj_cpe_min : make or make AP_PRJ=prj_cpe_min BOOT_PRJ=ufi_mini PACK_PRJ=prj_cpe PATH_PRJ=lynq/CPE
@@ -55,4 +61,10 @@
 	@echo The default value of PATH_PRJ is lynq/CPE. The following values are optional :
 	@ls lynq/*/ -d | tr '\n' '   '
 	@echo
+	@echo
+	@echo The default value of PATCH is no. The nand_patch directory is supported as follows :
+	@find lynq -mindepth 1 -maxdepth 2 -name nand_patch | xargs -I {} dirname "{}" | tr '\n' '   '
+	@echo
+	@echo To support the nand_patch directory, add PATCH=yes at the end of compilation.
+	@echo