summaryrefslogtreecommitdiff
path: root/src/libctor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libctor.h')
-rw-r--r--src/libctor.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/libctor.h b/src/libctor.h
index a5fd249..0af33cb 100644
--- a/src/libctor.h
+++ b/src/libctor.h
@@ -45,6 +45,14 @@ struct Source
Language language{Language::Auto};
};
+struct Flags
+{
+ 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
+};
+
struct BuildConfiguration
{
std::string name; // Name - used for referring in other configurations.
@@ -53,10 +61,7 @@ struct BuildConfiguration
std::string target; // Output target file for this configuration
std::vector<Source> sources; // source list
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
+ Flags flags;
std::vector<std::string> externals; // externals used by this configuration
};
@@ -69,10 +74,7 @@ int reg(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
+ Flags flags;
std::vector<std::string> libs; // libraries
};
@@ -112,7 +114,7 @@ struct Configuration
std::map<std::string, std::string> env; // env used when last calling configure
std::map<std::string, std::string> tools; // tools
- std::map<std::string, std::vector<std::string>> externals;
+ std::map<std::string, Flags> externals;
};
const Configuration& configuration();