summaryrefslogtreecommitdiff
path: root/tools/aidl/main.cpp
blob: 7cc2198bb5dfb7a5f93fddd59ee78ab3eba928d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "aidl.h"
#include "options.h"

#include <stdio.h>

int
main(int argc, const char **argv)
{
    Options options;
    int result = parse_options(argc, argv, &options);
    if (result) {
        return result;
    }

    switch (options.task) {
        case COMPILE_AIDL:
            return compile_aidl(options);
        case PREPROCESS_AIDL:
            return preprocess_aidl(options);
    }
    fprintf(stderr, "aidl: internal error\n");
    return 1;
}