Really allow LDFLAGS to be set for libraries as well

This commit is contained in:
Pierre Pronchery 2010-12-04 21:05:57 +00:00
parent aaf210b8ff
commit 87bc953075

View File

@ -987,9 +987,8 @@ static int _target_library(Configure * configure, FILE * fp,
fprintf(fp, "%s%s%s", " -Wl,-soname,", target, ".so.0"); fprintf(fp, "%s%s%s", " -Wl,-soname,", target, ".so.0");
else else
fprintf(fp, "%s%s", " -Wl,-soname,", p); fprintf(fp, "%s%s", " -Wl,-soname,", p);
fprintf(fp, "%s%s%s", " $(", target, "_OBJS)"); fprintf(fp, "%s%s%s%s%s", " $(", target, "_OBJS) $(", target,
if((p = config_get(configure->config, target, "ldflags")) != NULL) "_LDFLAGS)");
_binary_ldflags(configure, fp, p);
if(q != NULL) if(q != NULL)
{ {
sprintf(q, "%s.so", target); sprintf(q, "%s.so", target);
@ -1097,10 +1096,8 @@ static int _target_plugin(Configure * configure, FILE * fp,
if((p = config_get(configure->config, target, "depends")) != NULL) if((p = config_get(configure->config, target, "depends")) != NULL)
fprintf(fp, " %s", p); fprintf(fp, " %s", p);
fputc('\n', fp); fputc('\n', fp);
fprintf(fp, "%s%s%s%s%s", "\t$(LD) -o ", target, ".so $(", target, fprintf(fp, "%s%s%s%s%s%s%s", "\t$(LD) -o ", target, ".so $(", target,
"_OBJS)"); "_OBJS) $(", target, "_LDFLAGS)");
if((p = config_get(configure->config, target, "ldflags")) != NULL)
_binary_ldflags(configure, fp, p);
if((q = malloc(strlen(target) + 4)) != NULL) if((q = malloc(strlen(target) + 4)) != NULL)
{ {
sprintf(q, "%s.so", target); sprintf(q, "%s.so", target);