最近在嘗試build Uboot project, 想要新增新的source file 卻沒辦法,研究了一下Makefile一直往下追,才找到如何請complier 去build新增的檔案。
把source code放在自己想要的資料夾裡面。
然後針對該資料夾下的Makefile (又或者自己知道哪個Makefile會進來build這個folder)
找到後新增
+obj-y += your_source_file.o即可
最近在嘗試build Uboot project, 想要新增新的source file 卻沒辦法,研究了一下Makefile一直往下追,才找到如何請complier 去build新增的檔案。
把source code放在自己想要的資料夾裡面。
然後針對該資料夾下的Makefile (又或者自己知道哪個Makefile會進來build這個folder)
找到後新增
+obj-y += your_source_file.o即可
搶先發佈留言