开发者

C++ make files from source generator - is there any such?

So what开发者_高级运维 I want is simple

  • to feed a program with my sources (a folder with nested folders for src headers and resources (it does not matter in which IDE project was created))
  • than I shall provide it with data on what compiler I want to use and on what os
  • have it read them all (project is open source so I can allow it all happen online)
  • app shall show me a list of libs it thinks I use - it shall show if I already have files for ones like in my resources folder (like headers and .lib or .a on windows and linux) and it shall highlight ones I have to declare some local pathes to.
  • than I shall provide it with data it requested
  • and it shall provide me with make files (at least for gpp and msvc)

Is there any such thing? because it would be grate!


The GNU build system has a suite of tools, commonly referred to as autotools. As @wilhelmtell pointed out, autoconf is part of this suite. The basic idea is that your source code is the starting input to a complicated chain of processes that result in a nice, portable Makefile. Each step of the process produces intermediary text files that you could tweak to your likening, but there are utilities that do the bulk of the work for you.

That being said, autotools can be quite overwhelming and possibly overkill depending on your needs. In my experience, I've usually found it easier to just hand-code a simple Makefile on my own.

C++ make files from source generator - is there any such?


There are a number of makefile generators, but I wouldn't expect any of them to guess the libraries from your source code. Many people recommend cmake based on its maturity, but premake is not too bad either, and getting active development. There are no doubt others.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜