summaryrefslogtreecommitdiff
path: root/utils/mcpu-tool-options.h
blob: f6fe356fe6d126b53073244ff5423e3bbbf818f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef __MCPU_TOOL_OPTIONS_H__
#define __MCPU_TOOL_OPTIONS_H__ 1

#include <stdio.h>

#include "mcpu-config.h"
#include "mcpu-version.h"
#include "mcpu-library-search.h"
#include "mcpu-runtime.h"

typedef struct mcpu_tool_options mcpu_tool_options;
struct mcpu_tool_options
{
  const char         *progname;
  const char         *sys_root;
  int                 help;
  int                 no_config;
  int                 dump_config;
  int                 print_search_dirs;
  mcpu_version_action version_action;
  char               *user_config_file;
  int                 runtime_config_read;
  int                 system_config_read;
  int                 user_config_read;
  mcpu_runtime_paths   runtime;
  mcpu_config          config;
  mcpu_library_search  library_search;
};

void mcpu_tool_options_init( mcpu_tool_options *options,
                             const char *progname );
void mcpu_tool_options_free( mcpu_tool_options *options );
int  mcpu_tool_options_prepare( mcpu_tool_options *options,
                                const char *argv0 );
int  mcpu_tool_parse_common_option( mcpu_tool_options *options,
                                    int argc, char **argv, int *index );
int  mcpu_tool_add_library_directory( mcpu_tool_options *options,
                                      const char *directory );
int  mcpu_tool_add_library_path( mcpu_tool_options *options,
                                 const char *path );
int  mcpu_tool_resolve_library( const mcpu_tool_options *options,
                                const char *name, char **resolved );
int  mcpu_tool_resolve_library_alternatives(
                                const mcpu_tool_options *options,
                                const char *const *names, size_t name_count,
                                char **resolved, size_t *selected_index );
int  mcpu_tool_has_information_action( const mcpu_tool_options *options );
int  mcpu_tool_dump_config( const mcpu_tool_options *options, FILE *stream );
int  mcpu_tool_print_search_dirs( const mcpu_tool_options *options,
                                  FILE *stream );

#endif /* __MCPU_TOOL_OPTIONS_H__ */