假設我有一個頭文件,它包含在許多源文件中,可能具有非常深的層次結構。在每個源對象的先決條件中列出這個公共頭文件是非常無聊的,並且不確定是否有優雅的解決方案。謝謝!關於Makefile中的深度頭文件
0
A
回答
1
您可以使用gcc -M
生成這樣的依賴關係。從TFM:
-M Instead of outputting the result of preprocessing, output a rule suitable for make describing the dependencies of the main source file. The preprocessor outputs one make rule containing the object file name for that source file, a colon, and the names of all the included files, including those coming from -include or -imacros command line options.
相關問題
- 1. Makefile頭文件依賴關係
- 2. makefile與頭文件
- 3. Makefile vpath不能用於頭文件
- 4. 頭文件包含深度限制
- 5. Makefile |頭文件中包含的另一個頭文件的依賴關係
- 6. 關於深度紋理中的通道
- 7. CakePHP深度關聯條件
- 8. 關係的深度
- 9. Makefile頭依賴關係
- 10. 基本的Makefile和頭文件依賴關係
- 11. makefile或頭文件的簡單問題?
- 12. Makefile:測試頭文件的目標
- 13. Makefile文件依賴關係
- 14. 使用makefile編譯頭文件依賴關係
- 15. 對於makefile文件裏面
- 16. 'All'屬於Makefile文件?
- 17. 關於makefile的問題
- 18. 關於Makefile的bash shell
- 19. 關於Makefile的語法
- 20. 如何通過makefile包含頭文件
- 21. Makefile頭文件目錄錯誤
- 22. makefile:如何指定頭文件
- 23. 如何包括makefile文件頭目錄
- 24. 關於<unistd.h>頭文件
- 25. 關於更新C++頭文件
- 26. 關於C頭文件創建錯誤++
- 27. 的Makefile:執行makefile文件
- 28. 關於頭文件的C++文件夾結構的問題
- 29. 有makefile文件相關的噩夢
- 30. 一個頭文件的多個源文件Makefile