How to use Omake build system for a Visual studio 2010 project - visual-studio-2010

I have a project, which works fine in VS-2010. And runs fine.
But I want to create a make-file by using Omake. How to build the same in Omake.
I have gone through all the documentation of Omake, but it does not say how to make it.
My VS-2010 project contains .c, .cpp, .h, .rc MFC and many subdirectories too.

There is no direct way to convert a project from VS to Omake: you have to write the 'OMakefile's by hand since the two build systems (MSBuild is behind VS) and concepts are somewhat different. Once the OMakefile's are working, you can always create a Visual Studio project of type "Makefile" that calls the omake utility behind the scene.
If the reason for change is that you want to make the projet multi-platform (well, I doubt so since you use MFC), you may consider CMake, a widely-used project generation tool. CMake can generate both Makefiles (GNU) and VS projects, depending on the platform, from a project description.

Related

What is the benefit of building with CMake?

I am working on SFML and I am curious about the option that I can compile it myself. I found it in tutorials, but from the first line I became confused:
CMake is an open-source meta build system. Instead of building SFML, it builds what builds SFML: Visual Studio solutions ...
There is a build option in visual studio too, is there any difference between that build and CMake build?
What does it mean that it builds what builds SFML? It means library files?
Visual studio solutions? What does it mean? As far as i know, when i open a new project it is within a solution and i can add new projects to this solution (I am confused about why there must be more than one project in a solution too!).
What does it mean that CMake builds a solution? And what is it for?
There is sourcecode. People want to compile it. It is difficult and annoying to type the compile commands into a terminal.
People invent build systems, to make 1.) more easy. For example make files or what Visual Studio integrates and stores in its files, called solution.
There are projects, that are cross-platform. They could provide make files, solution files, files for Xcode, Eclipse and so on. This becomes difficult and annoying.
People invent systems, that creates build system to ease 3.). From a common set of files, several different build systems can be steered.
In your actual case: CMake creates the solution file, you can open the solution file and built SFML with that.
CMake is a wonderful tool for cross-platform development without the hassle of maintaining separate build utilities. On Windows, CMake can create a Visual Studio solution file based on its CMakeLists.txt file. On Linux, generally CMake outputs a makefile. CMake is compatible with many build tools, I recommend reading more of there documentation on their website to gain more information.
Edit: Just to be more clear. CMake literally builds what builds SFML since it creates the Visual Studio solution used to build SFML.
A build in VS for a solution is building the library itself. A CMake build generates the VS solution with which you would use to build the library.
See 1.
A VS solution is the full buildable setup containing 1 or more projects. Solutions can contain multiple projects since VS has a limitation on only 1 output per project. If you want multiple outputs (e.g. 4 dlls) each output needs it's own project.

How can I generate a makefile for my project from within Visual Studio 2013

I need to be able to produce the makefile for my C++ project, although I cannot find how to do this within visual studio.
The common solution to this type of problem is to use a cross-platform build system that can generate platform appropriate build files. CMake is one example of this. It can be used to generate Solution and Project files on Windows and make files for Linux. It can also generate make files for mingw32. Note that this will be a fairly significant departure from your current set up and can take some time to get working correctly.

Using Windows/Linux Makefile with Microsoft Visual Studio 2010

I have a Makefile that I use to build my application in both Windows and Linux. All complex project- and platform-related stuff are already dealt in this Makefile.
Today, I use a common editor to code and call GNU make from command line. Now I am considering to move to Microsoft Visual Studio 2010. I already use MSVS2010 when debuging using a not-configured Intel Visual Fortran Empty Project with my files.
I don't want to duplicate my work configuring a new Visual Studio project and I want to use the Makefile instead.
Is there a way to do it with MSVS2010? Or, is there any other better way to keep the configuration at one place "usable" from Windows and Linux?
In the somewhat distant past I used VC++2005 in just this way. The trick is to create an external project (or command-line project or something like that—I forget the terminology now). The command-line you give to this project is make -j4 target (ymmv). Naturally the makefile needs to use cl as the compiler, link as the linker &c.
Now everthing is hooked up, and you can press the f7 key in VC++ to build your project, and f4 takes you through the errors. [I used cygwin make, and it all worked rather well.]

Visual Studio Solution to SCONS?

Is there any tool that can convert a large and complex* Visual Studio 2005 (or 2008) Solution into a SCons project?
* Lots of projects and multiple configurations on multiple platforms/compilers
Probably not, and even if there were, SCons gives you significantly more transparency and flexibility about managing your build than visual studio does. As a starting point, it's best to do each one in turn.
Create a new makefile project
Clone the source from one project to another
Invoke scons from the makefile command.
Replace the dependancies on the old project with the scons version.
Test
Repeat from 1. with each project.
Once you've done a few projects, it's pretty easy to refactor the major differences between build types (shared libs, static libs and programs) and platforms into a module of common scons helpers that can be imported. On windows, consider groups of flags for things like debug and release builds, standard library linkage and exception handling.
Also, things to look out for include:
If you're doing cross platform builds, consider the differences between the linking models with respect to the effects of missing symbols.
What you'll do to deal with manifest files and invoking the visual studio tools.
Variant build directories (debug/release) can be tricky at the start. Start simple, and enhance your build once you're sure it's necessary.
The following script looks promising. I may give it a whirl: the reason the by hand solution isn't completely practical due to the sheer scale of the solution in question: it has hundreds of projects. This is why I was thinking a script that would generate SCons modules would give me a starting point.
Unfortunately porting the solution in question to SCons by hand would be a project in itself!, although I do admit it would be the 'correct' way to do it.

Build Visual Studio Projects from Jamfiles?

Anyone know of a way to create Visual Studio Projects from a build based on Jamfiles?
I'd settle for a jamfile -> XML-or-some-other-intermediate-format exporter tool, so I could write my own.
This jam distribution has a tool that does that:
http://redmine.jamplex.org/
See here:
http://redmine.jamplex.org/git/jamplus/docs/html/jamtoworkspace.html
Haven't used any of it myself yet, so I'm afraid I can't say anything about how well it works.
You might also consider CMake. CMake files are about as easy to write as Jamfiles, and CMake can generate projects for Visual Studio, Xcode, and Unix Makefiles automatically. I used to use Jam for all my Linux projects, but once I discovered CMake, I haven't gone back.
JamPlus has a built-in workspace generator that reads a project's Jamfiles and exports an IDE workspace.
http://jamplus.org/git/jamplus/docs/html/jamtoworkspace.html

Resources