CUDA and GNU Autotools
The GNU build system, also known as Autotools, is a suite of programming tools designed to assist in making source code packages portable to many Unix-like systems. It can be difficult to make a software program portable: the C compiler differs from system to system; certain library functions are missing on some systems; header files may have different names. One way to handle this is write conditional code, with code blocks selected by means of preprocessor directives (#ifdef); but because of the wide variety of build environments this approach quickly becomes unmanageable. The GNU build system is designed to address this problem more manageably.
One of the drawbacks to GNU Autotools is that is only provides native support for certain languages, however, it is flexible enough so that you can make it do what you want it to do... if you know how. I wanted to distribute CUDA based applications with GNU Autotools but unfortunately CUDA is not one of the languages that it supports... so I started googling around. I found several threads where other people wanted to be able to do the same thing. I found various bread crumbs here and there that enabled me to piece together a working build.
Since I couldn't find all of the information that I needed in one spot, I figured I'd write it all down and publish it so others don't have to waste time figuring it out. "The ClusterChimps Guide to Integrating CUDA and GNU Autotools" is a simple guide to building CUDA targets using GNU Autotools. It will show you how to build stand alone CUDA applications, static CUDA libraries, and shared CUDA libraries. The guide comes with a companion example tarball.
The ClusterChimps Guide to Integrating CUDA and GNU Autotools
Source Code (4955 downloads)
This tarball contains the GNU Autotools CUDA examples
Download tarball
Source Code (4955 downloads)
This tarball contains the GNU Autotools CUDA examples
Download tarball