views:

13510

answers:

6

I heard a lot about makefile and how it simplifies the compilation process. I`m using VS2008, can somebody please advice me some online references or books when I can find how to deal with it?

A: 

The VS equivalent of a makefile is a "Solution" (over-simplified, I know).

Joel Coehoorn
A: 

If you are asking about actual command line makefiles then you can export a makefile, or you can call MSBuild on a solution file from the command line. What exactly do you want to do with the makefile?

You can do a search on SO for MSBuild for more details.

Tim
+6  A: 

A UNIX guy probably told you that. :)

You can use makefiles in VS, but when you do it bypasses all the built-in functionality in MSVC's IDE. Makefiles are basically the reinterpret_cast of the builder. IMO the simplest thing is just to use Solutions.

John Dibling
.vcproj files have a lot of bloat, and grow unwieldy quite fast unless you're using something else to generate them (scons, cmake).
Tom
Plus Microsoft uses makefiles internally. No one would even dream of loading windows source code into a solution file.
Filip
A: 

Makefiles and build files are about automating your build. If you use a script like MSBuild or NAnt, you can build your project or solution directly from command line. This in turn makes it possible to automate the build, have it run by a build server.

Besides building your solution it is typical that a build script includes task to run unit tests, report code coverage and complexity and more.

mmiika
+1  A: 

I actually use a makefile to build any dependencies needed before invoking devenv to build a particular project as in the following:

debug: coratools_debug
    devenv coralib.vcproj /build debug

coratools_debug: nothing
    cd ../coratools
    nmake debug
    cd $(MAKEDIR)

In my opinion, this is much easier than trying to figure out the overly complicated visual studio project management scheme.

Jon Trauntvein
+5  A: 

The Microsoft Program Maintenance Utility (NMAKE.EXE) is a tool that builds projects based on commands contained in a description file.

NMAKE Reference

uvts_cvs