Ads by Google
Christian Borgelt's Web Pages

How to Compile the C Programs

To compile the C programs from the sources, first download one of the source packages (either <packagename>.zip or <packagename>.tar.gz, whichever format you prefer) and extract it into some directory. Since most archives contain multiple directories (most packages are very modular and share source code with other packages), extracting it to a new, empty directory may be a good idea. However, multiple packages can be extracted without harm into the same directory, since jointly used sources have the same version in all packages (provided they were downloaded at the same time).

For all C programs makefiles for GNU/Linux and Microsoft Windows are provided. The GNU/Linux makefiles are generally called makefile, the Microsoft Windows makefiles are called <packagename>.mak.

To compile a (set of) program(s) on a GNU/Linux system, make sure that GCC, the GNU Compiler Collection/GNU C Compiler is installed. Then change directory to <packagename>/src and call

make all

on the command line. With the command

make install

all programs are copied to $HOME/bin. The two commands can be combined into

make all install

To compile a (set of) program(s) on a Microsoft Windows system, make sure that Microsoft Visual Studio C/C++ is installed, including the command line tools (which are needed to compile with the help of a makefile). Note that the Community Edition of this C compiler can be obtained (perfectly legally) free of charge. (Note, however, since Community Edition 2015 the Visual C/C++ tools are no longer part of this Visual Studio Edition by default. To obtain them, choose a custom installation and explicitly select the Visual C/C++ tools for installation.) Then change directory to <packagename>/src and call (in a Microsoft Visual Studio command line window)

nmake /f <packagename>.mak all

This command is also contained in a file make._at, which can be renamed to make.bat to make it executable. The reason for not naming it make.bat directly is that many mail programs do not allow archives with executables (including batch files) to be attached to emails. I also received some evidence that some firewalls may exhibit a similar behavior: they do not let a user download an archive with an executable file in it. Using a name not ending in .bat circumvents the problem, but unfortunately requires a user to rename the file to use it.

There is no installation command for Microsoft Windows. To install the programs simply copy them into the directory in which you want to use them, or to a directory that is listed in your PATH environment variable.