1 #ifndef ANDROIDTOOLS_H_
2 #define ANDROIDTOOLS_H_
5 #include <msp/fs/path.h>
16 std::set<unsigned> supported_api_levels;
18 AndroidDevKit(Builder &, const std::string &, const Msp::FS::Path & = Msp::FS::Path());
22 const Msp::FS::Path &get_root_dir() const { return root; }
23 const std::set<unsigned> &get_supported_api_levels() const { return supported_api_levels; }
24 void select_api_level(unsigned);
26 virtual void init_api_level(unsigned) = 0;
29 class AndroidSdk: public AndroidDevKit
32 Msp::FS::Path build_tools_dir;
33 // TODO use a FileTarget for the jar
34 Msp::FS::Path platform_jar;
37 AndroidSdk(Builder &);
40 void find_build_tools_dir();
41 virtual void init_api_level(unsigned);
44 const Msp::FS::Path &get_build_tools_dir() const { return build_tools_dir; }
45 const Msp::FS::Path &get_platform_jar() const { return platform_jar; }
48 class AndroidNdk: public AndroidDevKit
51 const Architecture &architecture;
52 Msp::FS::Path bin_dir;
53 Msp::FS::Path common_sysroot;
54 Msp::FS::Path platform_sysroot;
57 AndroidNdk(Builder &, const Architecture &, const AndroidSdk &);
59 static Msp::FS::Path create_default_path(const AndroidSdk &);
61 void find_toolchain_dir();
62 virtual void init_api_level(unsigned);
65 const Msp::FS::Path &get_bin_dir() const { return bin_dir; }
66 const Msp::FS::Path &get_common_sysroot() const { return common_sysroot; }
67 const Msp::FS::Path &get_platform_sysroot() const { return platform_sysroot; }
71 class AndroidTools: public Toolchain
78 AndroidTools(Builder &, const Architecture &);