diff options
author | midipix <writeonce@midipix.org> | 2016-05-04 12:55:31 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-05-04 12:55:31 -0400 |
commit | bb2555de865f03074014a042459d69c34a2b4b3c (patch) | |
tree | 4fa24b6accca3bb90d062329c10745bef1a1dcd3 /src | |
parent | f7acc1109f966594c13fe42e32e754e9584f3a9d (diff) | |
download | slibtool-bb2555de865f03074014a042459d69c34a2b4b3c.tar.bz2 slibtool-bb2555de865f03074014a042459d69c34a2b4b3c.tar.xz |
link mode: legabits: generate a perfectly compatible wrapper.
Diffstat (limited to 'src')
-rw-r--r-- | src/logic/slbt_exec_link.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c index d964df0..d48eff8 100644 --- a/src/logic/slbt_exec_link.c +++ b/src/logic/slbt_exec_link.c @@ -997,6 +997,8 @@ int slbt_exec_link( { int ret; const char * output; + const char * header; + const char * base; char * dot; FILE * fout; struct slbt_exec_ctx * actx; @@ -1212,8 +1214,21 @@ int slbt_exec_link( fvernum = !!(dctx->cctx->verinfo.vernumber); verinfo = slbt_source_version(); + /* wrapper header */ + if (dctx->cctx->drvflags & SLBT_DRIVER_LEGABITS) { + header = " - a libtool library file\n"; + + if ((base = strrchr(output,'/'))) + base++; + else + base = output; + } else { + header = "libtool compatible library wrapper\n"; + base = ""; + } + ret = fprintf(fout, - "# libtool compatible library wrapper\n" + "# %s%s" "# Generated by %s (slibtool %d.%d.%d)\n" "# [commit reference: %s]\n\n" @@ -1237,6 +1252,9 @@ int slbt_exec_link( "libdir='%s'\n", + /* wrapper header */ + base,header, + /* nickname, verinfo */ dctx->program, verinfo->major,verinfo->minor,verinfo->revision, |