+ char *externals = talloc_strdup(name, "");
+ char **deps;
+
+ for (deps = get_deps(objs, dir); *deps; deps++) {
+ if (!strstarts(*deps, "ccan/"))
+ continue;
+
+ /* ccan/foo -> ccan/foo.o */
+ externals = talloc_asprintf_append(externals, " %s.o", *deps);
+ }