diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-10-30 18:02:10 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-10-30 18:02:10 +0200 |
commit | bc474f716407dec521626e76b6101df4a2f1a40a (patch) | |
tree | 2e7aa3ba12a1f65297225616ad4de59b181c932c /src/libctor.h | |
parent | 7bf162fcd98920644e4f61ac0181037eb62c807e (diff) |
Add external configs.
Diffstat (limited to 'src/libctor.h')
-rw-r--r-- | src/libctor.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/libctor.h b/src/libctor.h index 5c22614..2a10c53 100644 --- a/src/libctor.h +++ b/src/libctor.h @@ -51,17 +51,31 @@ struct BuildConfiguration OutputSystem system{OutputSystem::Host}; std::string target; // Output target file for this configuration std::vector<Source> sources; // source list - std::vector<std::string> depends; // internal dependencies + std::vector<std::string> depends; // internal target dependencies std::vector<std::string> cxxflags; // flags for c++ compiler std::vector<std::string> cflags; // flags for c compiler std::vector<std::string> ldflags; // flags for linker std::vector<std::string> asmflags; // flags for asm translator + std::vector<std::string> externals; // externals used by this configuration }; using BuildConfigurations = std::vector<BuildConfiguration>; int reg(const char* location, BuildConfigurations (*cb)()); +struct ExternalConfiguration +{ + std::string name; // Name for configuration + std::vector<std::string> cxxflags; // flags for c++ compiler + std::vector<std::string> cflags; // flags for c compiler + std::vector<std::string> ldflags; // flags for linker + std::vector<std::string> asmflags; // flags for asm translator +}; + +using ExternalConfigurations = std::vector<ExternalConfiguration>; + +int reg(const char* location, ExternalConfigurations (*cb)()); + // Convenience macro - ugly but keeps things simple(r) #define CONCAT(a, b) CONCAT_INNER(a, b) #define CONCAT_INNER(a, b) a ## b |