1eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen MurdochCompilation has a few phases:
2eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
3eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch1. Generate the header and dispatch source files that have to match the GL api.
4eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch   These read in a description of the GL api in the form of XML files. In
5eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch   addition, generate the GLSL parser and lexer using flex and bison. These
6eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch   sources are needed for step 2
7eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch2. Compile everything in src/glsl into a library. This step uses the parser and
8eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch   lexer output.
9eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch3. Compile the compiler (executable) that can create the builtin functions'
10eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch   source file.  Note that this step uses builtin_stubs.cpp because we haven't
11eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch   generated the actual builtin functions' source file yet.
12eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch4. Invoke the compiler that we just built to create
13eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch   gen/mesa/builtin_function.cpp
14eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch5. Compile the rest of mesa, using the builtins that we created in step 4. In
15eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch   addition, link in all the files that we've previously compiled in step 2.
16