5 #define IDENT_CHARS "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \
6 "abcdefghijklmnopqrstuvwxyz" \
9 #define SPACE_CHARS " \f\n\r\t\v"
11 /* FIXME: Remove some -I */
12 #define CFLAGS "-O -Wall -Wundef -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Werror -Iccan/ -I. -I.. -I../.."
14 /* This actually compiles and runs the info file to get dependencies. */
15 char **get_deps(const void *ctx, const char *dir, const char *name,
16 bool recurse, char **infofile);
18 /* This is safer: just looks for ccan/ strings in info */
19 char **get_safe_ccan_deps(const void *ctx, const char *dir, const char *name,
20 bool recurse, char **infofile);
22 /* This also needs to compile the info file. */
23 char **get_libs(const void *ctx, const char *dir,
24 const char *name, unsigned int *num, char **infofile);
27 char *talloc_basename(const void *ctx, const char *dir);
28 char *talloc_dirname(const void *ctx, const char *dir);
29 char *talloc_getcwd(const void *ctx);
30 char *run_command(const void *ctx, const char *fmt, ...);
31 char *temp_file(const void *ctx, const char *extension);
35 * These all compile into a temporary dir, and return the filename.
36 * On failure they return NULL, and errmsg is set to compiler output.
38 /* Compile multiple object files into a single. */
39 char *link_objects(const void *ctx, const char *objs, char **errmsg);
40 /* Compile a single C file to an object file. Returns errmsg if fails. */
41 char *compile_object(const void *ctx, const char *cfile, char **errmsg);
42 /* Compile and link single C file, with object files, libs, etc. */
43 char *compile_and_link(const void *ctx, const char *cfile, const char *objs,
44 const char *extra_cflags, const char *libs,
46 #endif /* CCAN_TOOLS_H */