blob: 4d4026c29c175f65a59fd2c2da50765387224be5 [file] [log] [blame]
Matthias Andreas Benkardf59e0972018-04-10 22:01:34 +02001For detailed information on using, building, and modifying Weld, please visit:
2http://www.agottem.com/weld
3
4Weld is a build system for GNU make. It is an implementation of a non-recursive make system. Weld
5is intended for C and C++ projects, however, could be easily extended to other languages. Weld is
6designed to work on Linux or FreeBSD using GCC and Windows using MinGW.
7
8To start using Weld, first create a directory to host all the source for your project. A typical
9project is expected to be composed of many libraries and binaries with a single top level makefile.
10An example layout may be something like:
11
12 my_project/
13 makefile
14
15 libs/
16 gui/
17 graph/
18 def.mk
19 source/...
20 include/...
21 button/
22 def.mk
23 source/...
24 include/...
25 data/
26 compute/
27 compute.mk
28 source/...
29 include/...
30 bins/
31 my_app/
32 def.mk
33 source/...
34
35The above example lays out a project with a handful of libs and a binary. To build, simply type
36make at the top-level. Weld will do a simple find for any files name "def.mk". Each "def.mk" is
37then included and a complete dependency tree is constructed. This means make knows how every build
38artifact is related and what order things need to be built in. If make's "-j" option is used you'll
39perform a build with optimal parallelization.
40
41Additionally, because the full dependency tree is known, incremental builds will only ever build
42precisely what is needed. If dependencies haven't changed, no time will be wasted needlessly
43rebuilding components.
44
45In addition to Weld generating a complete dependency tree for you, it'll also define useful targets.
46For instance, "make libcompute.a" will build just the compute library and any dependencies. "make
47my_app" will build just my_app and any dependencies. "make clean" will clean the project.
48
49For details on specifying def.mk files, see the "c.def.mk.template" or "resource.def.mk.template"
50files. For insight into the weld command line, see the "command_line.txt" file.