#ifndef MAJE_H #define MAJE_H #include struct majefile { struct majefile *next; struct majefile *prev; struct stat st; char path[]; }; struct majeflag { struct majeflag *next; struct majeflag *prev; enum { MAJE_CFLAG, MAJE_LDFLAG, MAJE_LDLIB, MAJE_LIB } type; char flag[]; }; struct majefile *find_source_files(const char *path); char *find_main(struct majefile *sources); struct majefile *find_includes(const struct majefile *file); void make_makefile(const char *makefile, struct majefile *sources, const char *target); struct majefile *insert_file(struct majefile *list, const char *path, const struct stat *st); struct majeflag *insert_flag(struct majeflag *list, char *flag); struct majeflag *add_flags(const struct majefile *source, struct majeflag *flags); #endif