| 1 |
void _static_library(string ofiles, string library) |
| 2 |
{ |
| 3 |
if (!exists(library) || g_compiled) |
| 4 |
{ |
| 5 |
run("ar r " + library + " " + ofiles); |
| 6 |
run("ranlib " + library); |
| 7 |
run("rm " + ofiles); |
| 8 |
} |
| 9 |
} |
| 10 |
|
| 11 |
void makeLibrary(string oDstDir, string library) |
| 12 |
{ |
| 13 |
int index; |
| 14 |
|
| 15 |
g_compiled = 0; |
| 16 |
|
| 17 |
md(oDstDir); |
| 18 |
// compile all files |
| 19 |
for (index = g_nClasses; index--; ) |
| 20 |
std_cpp(oDstDir, index, g_classes[index], library); // ./stdcpp |
| 21 |
|
| 22 |
// make the library |
| 23 |
_static_library(oDstDir + "/*.o", library); |
| 24 |
} |