X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fandroidtools.h;h=b08691c1434ce011e40eee4004d3ca0699e91725;hb=40ab4f61eaf7fc14fc6d1c2ea5eecee21882893a;hp=16f157d54dadbb2770572c80b90e83b99c8be29f;hpb=68f084e4ed817da0c25cefa1772cadf97b8cfe5e;p=builder.git diff --git a/source/androidtools.h b/source/androidtools.h index 16f157d..b08691c 100644 --- a/source/androidtools.h +++ b/source/androidtools.h @@ -1,7 +1,7 @@ #ifndef ANDROIDTOOLS_H_ #define ANDROIDTOOLS_H_ -#include +#include #include #include "toolchain.h" @@ -13,14 +13,16 @@ class AndroidDevKit protected: Builder &builder; Msp::FS::Path root; - std::set supported_api_levels; + /* Needs refactoring if API levels go over 63. At present rate this will + take decades to occur. */ + uint64_t supported_api_levels; - AndroidDevKit(Builder &, const std::string &); + AndroidDevKit(Builder &, const std::string &, const Msp::FS::Path & = Msp::FS::Path()); ~AndroidDevKit() { } public: const Msp::FS::Path &get_root_dir() const { return root; } - const std::set &get_supported_api_levels() const { return supported_api_levels; } + uint64_t get_supported_api_levels() const { return supported_api_levels; } void select_api_level(unsigned); protected: virtual void init_api_level(unsigned) = 0; @@ -38,7 +40,7 @@ public: private: void find_build_tools_dir(); - virtual void init_api_level(unsigned); + void init_api_level(unsigned) override; public: const Msp::FS::Path &get_build_tools_dir() const { return build_tools_dir; } @@ -50,17 +52,20 @@ class AndroidNdk: public AndroidDevKit private: const Architecture &architecture; Msp::FS::Path bin_dir; + Msp::FS::Path common_sysroot; Msp::FS::Path platform_sysroot; public: - AndroidNdk(Builder &, const Architecture &); - + AndroidNdk(Builder &, const Architecture &, const AndroidSdk &); private: + static Msp::FS::Path create_default_path(const AndroidSdk &); + void find_toolchain_dir(); - virtual void init_api_level(unsigned); + void init_api_level(unsigned) override; public: const Msp::FS::Path &get_bin_dir() const { return bin_dir; } + const Msp::FS::Path &get_common_sysroot() const { return common_sysroot; } const Msp::FS::Path &get_platform_sysroot() const { return platform_sysroot; } };