Replies: 6 comments 4 replies
-
g++ -MM生成的.d一般都是头文件,为什么会有.cpp和.cc在? |
Beta Was this translation helpful? Give feedback.
-
我那个makefile会自动根据.h替换为.cpp判断是否存在,然后添加.o的依赖,自动编译.
|
Beta Was this translation helpful? Give feedback.
-
我这个通用的makefile挺好用的, 但还有点问题. 编译出来的所有程序都有全部的so依赖,但大部分程序不需要用到所有的so库. |
Beta Was this translation helpful? Give feedback.
-
after_build_file 里 通过 target:dependfile(sourcefile) 取下依赖文件,自己解析替换获取 cpp 后,自己调用 compiler 编译下加入 target:objectfiles() |
Beta Was this translation helpful? Give feedback.
-
我照着说的做了, 但是效果不好, 必须自己调用g++编译得到.o,再target:objectfiles()链接. |
Beta Was this translation helpful? Give feedback.
-
ninja有这种功能, gcc -MD分析依赖, 自动建立依赖关系.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
你在什么场景下需要该功能?
我有一个通配符的Makefile,可以根据g++ -MM生成目标的依赖文件存入.d文件里,再读取.d文件,检查相应的.cpp或.cc文件是否存在,存在则编译出相应的.o文件, 再把.o一起和cpp文件链接.
请问,xmake怎么实现这样的功能?
描述可能的解决方案
不知
描述你认为的候选方案
No response
其他信息
No response
Beta Was this translation helpful? Give feedback.
All reactions