2

I need to convert several large Visual Studio projects to use GNU build tools. GUI IDE is no option. Right now I am trying to learn make & autotools. There are some good tutorials online, including the official documentation. But the amount of material is quite overwhelming. I would really appropriate any newbie advice.

Where to start?

What are the typical steps?

How make make the project ready for source code distribution?

What can be skipped if source code distribution isn't needed (in house use only)?

Thanks.

pic11
  • 14,267
  • 21
  • 83
  • 119
  • 1
    This isn't a complete answer, but if you're distributing source for your project for use on Un*x platforms, Autotools will probably come into play. The book [Autotools: A Practitioner's Guide](http://www.amazon.com/Autotools-Practioners-Autoconf-Automake-Libtool/dp/1593272065/ref=sr_1_1?ie=UTF8&qid=1301457392&sr=8-1) is a well-regarded introduction to Autotools. – Andrew Brown Mar 30 '11 at 03:59
  • See http://stackoverflow.com/questions/2176427/comprehensive-gnu-make-gcc-tutorial – Martin Beckett Mar 30 '11 at 04:31
  • Start by writing a makefile. Reading the info pages for `make` is a must, and it should take you one afternoon to grasp the concepts, and one more to fully master it. – Alexandre C. Mar 30 '11 at 08:19

3 Answers3

2

I suggest you to use CMake. You could start here.

Naszta
  • 7,560
  • 2
  • 33
  • 49
1

Like both Naszta and Fabio recommended: Try out CMake, because it can generate visual studio projects on windows and unix-makefiles.

In addition, I would suggest you look at MinGW: MinGW provides a GCC toolchain on Windows. You can start by porting your code to MinGW, while keeping all the windows-specific stuff. In a later phase you can try getting rid of all the windows-specific stuff.

André
  • 18,348
  • 6
  • 60
  • 74
0

Are you set on Autotools? Because most projects migrate away from them because autotools are so complicated.

Id also suggest CMake which is a Meta build system, and can create unix makefiles, Visual Studio Projects (and all kinds of project files for IDEs) in a platform neutral way.

It also has some goodies like CPack (which creates Installer packages for all platforms) and CTest.

Fabio Fracassi
  • 3,791
  • 1
  • 18
  • 17