- list = talloc_strdup(f, "");
- for (i = 0; i < talloc_get_size(deps) / sizeof(*deps); i++) {
- if (deps[i]->compiled)
- list = talloc_asprintf_append(list, " %s",
- deps[i]->compiled);
+ return deps;
+}
+
+static char *example_obj_list(const void *ctx, struct manifest **deps)
+{
+ char *list = tal_strdup(ctx, "");
+ unsigned int i;
+
+ for (i = 0; i < tal_count(deps); i++) {
+ if (deps[i]->compiled[COMPILE_NORMAL])
+ tal_append_fmt(&list, " %s",
+ deps[i]->compiled[COMPILE_NORMAL]);
+ }
+ return list;
+}
+
+static char *example_lib_list(const void *ctx, struct manifest **deps)
+{
+ char *list = tal_strdup(ctx, "");
+ char **libs;
+ unsigned int i, j;
+
+ /* FIXME: This doesn't uniquify. */
+ for (i = 0; i < tal_count(deps); i++) {
+ libs = get_libs(ctx, deps[i]->dir, NULL, get_or_compile_info);
+ for (j = 0; libs[j]; j++)
+ tal_append_fmt(&list, "-l%s ", libs[j]);