I have a C++ project with thousands of lines of code. Until now, i am using gnu make to build it under unix/linux but now i need to create C++ executables using the C++ compiler shipped with visual studio 2008.
Could someone please suggest a good way to automate the build process on windows? Does gnu make work on windows? What are my other options?
GNU make work on windows, as entire GCC suite, but if you want to use Microsoft compiler you need makefiles compatible with nmake (Microsoft version of make) or invoke the compiler from command-line directly passing appropiate arguments.
I would probably want to modify my existing makefiles and not write new ones for windows.
So does gnu make under windows require cygwin? Are you aware of any tool which can generate Makefiles for me based on the target platform? (unix, windows or solaris)?
make and nmake just invoke commands, so you should be able to use the Microsoft compiler with the GnuWin32 version of make easily enough. Or gcc with nmake, if you wanted to. (For example, I use both nmake and make -- independently -- with things like Doxygen and GraphViz, to create my code documentation)
But the various compiler options will all have to be altered. And the default enviroment the make tool sets up might need tweaking. So if you have a common makefile which sets up you compiler, linker, etc. options you just have to tweak it. Elsewise you could have a lot of small changes to make.
When it comes to generation of platform specific makefiles (and VC++ projects and solutions), CMake appears to be quite popular: http://www.cmake.org/