How to add a new Projectconfig.mk file to the codebase, making it more priority than
mediatek/config/$project/projectconfig.mk
Projectconfig.mk
Priority is greater than Projectconfig.mk file under $project directory
[Solution]
Step1. Add your own folder name under Mediatek/config, such as Testconfig, where you put your own projectconfig.mk
Step2. Modify the Define in the file MEDIATEK/BUILD/LIBS/CUSTOM.MK. Mtk.custom.generate-folder-list the command pack, add the folder name added in Step1 at the top of the last line of the command pack, adding the last behavior after: Testconfig $ (_fp_list_) $ (_cust_list_ ) $ (call LC, $ (mtk_platform)) common)
In this way, the macros added in this projectconfig.mk will overwrite the same names in the other projectconfig.mk
However, this method has two limitations:
1. The added folder must be in the Mediatek/config directory
2. Step2 must put the name of the added folder to the top of the last line of the command package, if you add two folders, such as TESTCONFIG1 and TESTCONFIG2, you need to add two folders to the last line of the command pack, where the previous one has precedence
How Android adds a new level of projectconfig.mk file to codebase