diff options
author | midipix <writeonce@midipix.org> | 2018-07-11 08:46:55 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-07-11 09:35:43 -0400 |
commit | 9a02e2b279c811545fbbaed99041b3171d64bb84 (patch) | |
tree | 8dc75224dc239bc7817a89c4a033fc0d357c6f50 /src/driver | |
parent | 0bfff4a80d596810a1798a3710a0e9ff96a9f925 (diff) | |
download | slibtool-9a02e2b279c811545fbbaed99041b3171d64bb84.tar.bz2 slibtool-9a02e2b279c811545fbbaed99041b3171d64bb84.tar.xz |
driver: added --windres support.
Diffstat (limited to 'src/driver')
-rw-r--r-- | src/driver/slbt_driver_ctx.c | 32 |
1 files changed, 32 insertions, 0 deletions
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; |