From 9a02e2b279c811545fbbaed99041b3171d64bb84 Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 11 Jul 2018 08:46:55 -0400 Subject: driver: added --windres support. --- src/driver/slbt_driver_ctx.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src/driver') diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c index 6675adb..44cdd81 100644 --- a/src/driver/slbt_driver_ctx.c +++ b/src/driver/slbt_driver_ctx.c @@ -617,6 +617,31 @@ static int slbt_init_host_params( host->ranlib = drvhost->ranlib; } + /* windres */ + if (host->windres) + cfgmeta->windres = cfgexplicit; + + else if (strcmp(host->flavor,"cygwin") + && strcmp(host->flavor,"midipix") + && strcmp(host->flavor,"mingw")) { + host->windres = ""; + cfgmeta->windres = "not applicable"; + + } else { + if (!(drvhost->windres = calloc(1,toollen))) + return -1; + + if (fnative) { + strcpy(drvhost->windres,"windres"); + cfgmeta->windres = cfgnative; + } else { + sprintf(drvhost->windres,"%s-windres",host->host); + cfgmeta->windres = cfghost; + } + + host->windres = drvhost->windres; + } + /* dlltool */ if (host->dlltool) cfgmeta->dlltool = cfgexplicit; @@ -687,6 +712,9 @@ static void slbt_free_host_params(struct slbt_host_strs * host) if (host->ranlib) free(host->ranlib); + if (host->windres) + free(host->windres); + if (host->dlltool) free(host->dlltool); @@ -1130,6 +1158,10 @@ int slbt_get_driver_ctx( cctx.host.ranlib = entry->arg; break; + case TAG_WINDRES: + cctx.host.windres = entry->arg; + break; + case TAG_DLLTOOL: cctx.host.dlltool = entry->arg; break; -- cgit v1.2.3