How to make a Makefile file out of a VC project?

Discussion about everything. New games, 3d math, development tips...
Post Reply
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

How to make a Makefile file out of a VC project?

Post by MasterGod »

I want to port my project to Linux so I need a Makefile file.
How can I make a Makefile file out of my VC project if it is even possible. Basically I want to keep the folder structure I have with VC so how can I do that?

Thanks.
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Google how to write makefiles ;)

I don't know if VC has any feature to actually make the makefile for you, probably not. But i think devc++ does makefiles for you automatically.. maybe, might be thinking of something else.
Image Image Image
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Google reveals the usual collection of filthy hippies sneering that anyone with a modicum of XML and Perl/Python/Ruby/MyScriptIsLeeterThanYourScript could do it in 5 minutes, but curiously, none of them seem to get around to actually doing so.

This is the closest thing to an actual solution that I can find , and of course it's in written in C#, not one of the Hippy Languages.

Alternatively, you could learn XML and Perl/Python/Ruby/MyScriptIsLeeterThanYourScript and do it yourself in 5 minutes. :P
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Since you cannot reuse the compiler flags and linker options it basically boils down to adding the required source files into your Makefile. I'd suggest to take one of the example makefiles and exchange the filenames/adapt the paths. You can take example1, where the Makefile is already quite adaptable, or take the demo Makefile, which contains the code to compile all cpp files separately (and only when necessary).
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

Thanks guys but between learning how to write it from scratch and writing a program to scan a VC project and generate a Makefile I prefer to learn how to make a Makefile on my own then.. :wink:
But thanks anyways.
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
Post Reply