2 This is a test/example for a nice Make based build system.
4 The Config.mak should not be saved to the repositories usually, but in this
5 case it is because part of this demonstration is to show how to customize the
6 build system through Config.mak, and specially to show how a project can be
7 "embedded" into another tweaking the Config.mak.
9 lib1 is a standalone C library compiled into a shared object. lib2 is another
10 shared library which uses lib1 and subproj, which is a standalone project
11 "embedded" into this one. subproj produces another standalone shared object.
12 Finally, prog is a program which uses lib1 and lib2.
14 Every project have it's copy of Lib.mak and it's own Toplevel.mak, which has
15 some global permanent configuration (which doesn't depends on users taste, it
16 just have information about the project, like it's name, and does the work to
17 include Lib.mak, etc.). Lib.mak shouldn't be modified ever (unless you're
18 hacking the build system) and Toplevel.mak should be changes very rarely.
20 Then each directory containing some library or program to build (or directories
21 to include) has a Build.mak, which has only the logic to build the
22 programs/libraries. A well-known Makefile is added to each directory where you
23 want to be able to do "make", just for convenience. This Makefile should be
24 created once, with the default target to build and path to the top-level
25 directory and never touched again. Build.mak should be changes only to add new
26 programs or libraries to build.