File: stdcompile

package info (click to toggle)
yodl 4.05.02-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,724 kB
  • sloc: ansic: 7,803; perl: 683; cpp: 570; sh: 411; xml: 190; makefile: 163
file content (24 lines) | stat: -rw-r--r-- 628 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
void _static_library(string ofiles, string library)
{
    if (!exists(library) || g_compiled)
    {
        run("ar r " + library + " " + ofiles);
        run("ranlib " + library);
        run("rm " + ofiles);
    }
}

void makeLibrary(string oDstDir, string library)
{
    int index;

    g_compiled = 0;
    
    md(oDstDir);
                                                // compile all files
    for (index = g_nClasses; index--; )
        std_cpp(oDstDir, index, g_classes[index], library);     // ./stdcpp

                                            // make the library
    _static_library(oDstDir + "/*.o", library);
}