Is it possible for us to make a Makefile for Civ5?

j_mie6

Deity
Joined
Dec 20, 2009
Messages
2,963
Location
Bristol (uni)/Swindon (home)
After doing a lot of DLL modding with Civ4 I grew very attached to the ability to quickly compile if I made a small change in a cpp file. I have since discovered that we get no such luxury with the Civ5 DLL and are forced to recompile the entire thing every time we make a change. Is it possible to switch the Civ5 DLL to use a Makefile instead (and therefore act the same way as the Civ4 DLL), or is it not feasible. Is anybody working on this, or if not, give me any pointers on how I might be able to do it myself (ie what compiler flags, compiler, dependencies etc we would need to use)?
 
I have since discovered that we get no such luxury with the Civ5 DLL and are forced to recompile the entire thing every time we make a change.

This is only true if you edit one of the .h files (as the .pch file depends on all the .h files and every .cpp file depends on the .pch file). If your changes are restricted to the .cpp files, the build process will only recompile the affected .cpp files.

Due to the use of the .pch file, a makefile would behave no differently.
 
That actually isn't the case for me, using visual studio 08 even if I just change a cpp file or worse even nothing! (Sometimes I forget if I needed to compile or not) I always have to recompile everything, no matter the situation
 
That actually isn't the case for me, using visual studio 08 even if I just change a cpp file or worse even nothing! (Sometimes I forget if I needed to compile or not) I always have to recompile everything, no matter the situation

VS2008 definitely supports incremental builds - are you sure you're pressing Build and not Rebuild? You're not doing a clean at any point? Your output window will still list all projects (since it checks them for changes) but shouldn't cycle through all of the cpp files each time.

If it's always doing a full rebuild, are your build and rebuild times the same then?

Have you done anything unusual with your intermediate/output directories or target file names?
 
Pressing build, not cleaning, build and rebuild times the same.

I have removed the other two DLLs from the project in order to speed up compilation (and remove a couple of visual studio bugs) but before I did that it still used to compile every cpp file every time...
 
Hm, whoward is right, the project shouldn't rebuild completely unless you change a header file. :confused: Maybe you have some settings in Visual Studio that force a rebuild regardless?
 
Back
Top Bottom