| 8 | #include "build_include.h" |
| 9 | |
| 10 | NORETURN void usage(const std::string& prog, const std::string& error = "") |
| 11 | { |
| 12 | std::cout |
| 13 | << "Usage: " << prog << " mode API.json [template_file] output_file\n" |
| 14 | << " Modes are\n" |
| 15 | << " loader : takes the API.json and output file as arguments and generates a loader_proc header file for use by loader.cpp\n" |
| 16 | << " osx : takes the API.json and output file as arguments and generates an OS X symbol export file\n" |
| 17 | << " linux : takes the API.json and output file as arguments and generates an Linux symbol export file\n" |
| 18 | << " include: takes any input file and output file as arguments and loads the input file into an C includable output file\n" |
| 19 | << " csharp : takes the API.json and output file as arguments and generates a CS wrapper module\n" |
| 20 | << "\n"; |
| 21 | if (!error.empty()) { |
| 22 | std::cerr << "Error: " << error << std::endl; |
| 23 | } |
| 24 | exit(1); |
| 25 | } |
| 26 | |
| 27 | int main(int argc, char* argv[]) |
| 28 | { |