21#ifndef CBUILD_MINGW_GXX_TOOLCHAIN
22#define CBUILD_MINGW_GXX_TOOLCHAIN
45 this->
linker =
"x86_64-w64-mingw32-g++";
46 this->
compiler =
"x86_64-w64-mingw32-g++";
47 this->
packer =
"x86_64-w64-mingw32-ar cr";
62 this->
linker =
"x86_64-w64-mingw32-g++";
63 this->
compiler =
"x86_64-w64-mingw32-g++";
64 this->
packer =
"x86_64-w64-mingw32-ar cr";
80 std::vector<std::string> hash_files;
81 if (files.size() > 0) {
82 for (
unsigned int i = 0; i < files.size(); i++) {
84 cmd += files.at(i).key;
88 cmd += files.at(i).data;
105 for (
unsigned int i = 0; i < files.size(); i++) {
106 flist += files.at(i).data;
109 if (files.size() > 0) {
131 for (
unsigned int i = 0; i < files.size(); i++) {
132 flist += files.at(i).data;
135 if (files.size() > 0) {
147 for (std::string
id : this->
depends) {
149 if (target != NULL) {
150 auto out_path = target->gen_out_name(
".exe",
".dll");
151 unsigned int end_slash = out_path.find_last_of(
'/');
153 "/" + out_path.substr(end_slash + 1);
160 std::string
gen_out_name(std::string executable =
".exe", std::string dyn_lib =
".dll",
161 std::string stat_lib =
".a")
override {
163 if (this->
name != std::string(
"")) {
259 void run(std::vector<std::string>*
args)
override {
261 std::string pargs =
"";
263 for (
auto elem : *
args) {
270 cmd = this->wine +
" ";
278 void debug(std::vector<std::string>*
args, std::vector<std::string>* pargs)
override {
#define CBUILD_BUILD_OUT_DIR
Build out in build/toolchain.
#define CBUILD_BUILD_DIR
Build directory of CBuild.
std::string gen_out_name(std::string executable=".exe", std::string dyn_lib=".dll", std::string stat_lib=".a") override
Generate output file name (after linking)
void debug(std::vector< std::string > *args, std::vector< std::string > *pargs) override
Build program in debug mode and after run gdb on it.
void post_link() override
After linking.
void build() override
Build.
MINGW_GXX(std::string id)
Construct a new MINGW_GXX object.
void link_pack() override
Linking for static libraries.
void link() override
Linking.
void run(std::vector< std::string > *args) override
Run builded app.
MINGW_GXX(std::string id, std::string name)
Construct a new MINGW_GXX object.
CBuild::Toolchain * GetToolchain(std::string name, bool force=false)
Get the registered toolchain.
bool copy(std::string start, std::string end)
Copy files or directories.
Filebuffer for CBuild ecosystem.
uint64_t hash(std::string str)
FNV-1a hashing function for std::string.
void print(std::string msg, color fg=CBuild::WHITE)
Print colored text to STDOUT.
int system(std::string cmd)
Call stdlib system() and print cmd to shell.
Custom print that support color codes.
Command for compile_commands.json.