Link to home
Start Free TrialLog in
Avatar of mrjoltcola
mrjoltcolaFlag for United States of America

asked on

Generate NMAKE Makefile from VC++ project?

Is there a quick way to generate a valid makefile for nmake given an existing Visual C++ project? I'm using VS 2008.
SOLUTION
Avatar of DanRollins
DanRollins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The vcbuild is quite mighty and I didn't miss the nmake. In VC6 we were used to generate makefiles from dsp project files which indeed was a 'bug farm' and I was really happy when we ported to VC8 and vcbuild and dropped the OS/2 branch which was the major reason for using makefiles.
Avatar of mrjoltcola

ASKER

Thanks guys, my main problem is maintaining this for open source projects. On UNIX I used to use autoconf, and it may very well support nmake, but I doubt it.

Secondly, trying to run vcvars32.bat to get the right environment involves either asking the user, or detecting it, so I am just trying to figure out the best approach.

It would seem someone would have written a tool, by now, to export a makefile.

Anyway, to the answers, vcbuild will do for now. I will just continue to maintain a separate makefile for UNIX, and possibly will write a Perl script to generate one from the project file at some point.

Points to both of you!
>>>> I will just continue to maintain a separate makefile for UNIX

Yes, I did the same for a dll project at Windows/VC7 and AIX/xlC and - though I made the AIX makefile programatically by evaluating the source files from vcproj it actually was *not* a conversion of a vcproj to a unix makefile but something very much less, i. e. updating the list of source files in an existing unix make file. And I don't think that more is senseful.