This page outlines how to create and use a makefile for Cloudy, using gcc and its associated make utility.  It is based on experiences of Peter van Hoof in using gcc with the code.  There are several steps, first create a dependencies file using gcc, then place the Makefile you download from the web site's source directory in your source directory, finally compile the code with the make command.

Create a dependencies file:  The first step is to create a dependencies file, called Makefile.dep, that explicitly describes how the various files depend on one another.  After moving into the source directory create it with the following command:

gcc -MM *.c > Makefile.dep

Download Makefile  Obtain Peter van Hoof's Makefile from the web site's source directory (Unix end of lines).  Place it in the same directory as the source files and the dependencies file

Compile the code:  Execute the command

make

to compile the code.  The resulting executable will be named cloudy.exe.  This will only work with the gnu make, which may be named gmake on your system. 

The file "Makefile" has been set up for an optimized compilation with gcc. It can be altered easily for other compilers by editing the "CC", "CFLAGS", and "LDFLAGS" fields in the file. A full compilation from scratch can be forced by issuing the commands:

make clean
make

Hit Counter
Last changed 12/26/05.
Return to the Cloudy Home Page.
Copyright 1978-2006 Gary J. Ferland