From bc474f716407dec521626e76b6101df4a2f1a40a Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 30 Oct 2021 18:02:10 +0200 Subject: Add external configs. --- src/libctor.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/libctor.h') 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 sources; // source list - std::vector depends; // internal dependencies + std::vector depends; // internal target dependencies std::vector cxxflags; // flags for c++ compiler std::vector cflags; // flags for c compiler std::vector ldflags; // flags for linker std::vector asmflags; // flags for asm translator + std::vector externals; // externals used by this configuration }; using BuildConfigurations = std::vector; int reg(const char* location, BuildConfigurations (*cb)()); +struct ExternalConfiguration +{ + std::string name; // Name for configuration + std::vector cxxflags; // flags for c++ compiler + std::vector cflags; // flags for c compiler + std::vector ldflags; // flags for linker + std::vector asmflags; // flags for asm translator +}; + +using ExternalConfigurations = std::vector; + +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 -- cgit v1.2.3