Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm interested in porting a library to Windows so that I can contribute to this library's project. This library has a Makefile.am, and I can sort of figure out how the library should be built (but I'm fairly new to the concept of makefiles). I was wondering if there is an automatic way to translate a Makefile.am into something that Visual Studio 2005 can use.

What I know so far:

I do see that there are directives in the library's Makefile.am for building to a Windows target (i.e if BUILD_WINDOWS ...some stuff... endif).

I also know that there's AutoMake for Windows, which generates the Makefile.in from the .am, but I have a knowledge gap as to how this Makefile.in would then be used. (Still researching this avenue).

Is my only course to convert the makefile manually into a VS2005 project? It seems like it is easier to convert from Windows to Linux, but that may be just my imagination.

Thanks for all your help!

share|improve this question

For the makefile.in / makefile.am relation, have a look at the wikipedia on the GNU build system: http://en.wikipedia.org/wiki/GNU_build_system. There's a graph explaining the role of each file. There's no automated way that I know of, but I can recommend you too ways to be able to compile the library:

  • Install cygwin: http://www.cygwin.com that comes with the full GNU system and many useful utilities
  • Migrate the project to use cmake (http://www.cmake.org). CMake can generate Microsoft VS files as well as Unix Makefiles. This project: http://cvs.savannah.gnu.org/viewvc/tsp/?root=tsp uses cmake a builds on Windows and various Unix flavors, for example.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.