Copyright © 2008-2018, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.
Date: 2008feb18 OS: Linux Q. Makefiles are so tedious. Is there an alternative? A. I use Jam. (There are several other alternatives like Ant.) Here's how to get started. If you are using RedHat/Fedora/CentOS you can install it by doing:dnf install jamCreate a file called "Jamfile" in the same folder as your source code. This simple example shows a program composed of "hello.cpp" and "extra.cpp" which is compiled into a binary called "hello". I specify some compiler and linker options.C++ = gcc ; C++FLAGS = -g -I. -fno-rtti -fno-exceptions ; LINK = gcc ; LINKFLAGS = -L/usr/lib -lg -lstdc++ ; EXEMODE = 0755 ; Main hello : hello.cpp extra.cpp ; InstallBin /usr/local/bin : hello ;Notice that space is required around the punctuation. Like the colons, semicolons and equals. Now you can compile the program by doing:jamAt the command line.jam installwill install it.
Add a commentSign in to add a comment