summaryrefslogtreecommitdiff
path: root/maje.h
blob: 920efa5bcfbda3290cc725b8a3c0543d52d42b9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef MAJE_H
#define MAJE_H

#include <sys/stat.h>

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