-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcbrew.c
More file actions
70 lines (56 loc) · 2.64 KB
/
Copy pathcbrew.c
File metadata and controls
70 lines (56 loc) · 2.64 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#define CBREW_ENABLE_ASSERTS
#define CBREW_ENABLE_CONSOLE_COLORS
#define CBREW_IMPLEMENTATION
#include <cbrew/cbrew.h>
void create_lunox_core(void)
{
CbrewProject* project = CBREW_PRJ_NEW("Lunox-Core", CBREW_PROJECT_TYPE_STATIC_LIB);
CBREW_PRJ_FILES(project, "./lunox/**.c");
CBREW_PRJ_INCLUDE_DIR(project, "lunox/src");
CBREW_PRJ_FLAG(project, "-Wall");
CBREW_PRJ_FLAG(project, "-Wextra");
CBREW_PRJ_FLAG(project, "-Wunreachable-code");
CbrewConfig* debug = CBREW_CFG_NEW(project, "Debug", "bin/Lunox-Core-Debug-" CBREW_PLATFORM_NAME, "bin-int/Lunox-Core-Debug-" CBREW_PLATFORM_NAME);
CBREW_CFG_DEFINE(debug, "LNX_DEBUG");
CBREW_CFG_DEFINE(debug, "LNX_ENABLE_ASSERTS");
CBREW_CFG_DEFINE(debug, "LNX_ENABLE_VERIFY");
CBREW_CFG_FLAG(debug, "-g");
CBREW_CFG_FLAG(debug, "-O0");
CbrewConfig* release = CBREW_CFG_NEW(project, "Release", "bin/Lunox-Core-Release-" CBREW_PLATFORM_NAME, "bin-int/Lunox-Core-Release-" CBREW_PLATFORM_NAME);
CBREW_CFG_DEFINE(release, "LNX_RELEASE");
CBREW_CFG_DEFINE(release, "LNX_ENABLE_VERIFY");
CBREW_CFG_FLAG(release, "-g");
CBREW_CFG_FLAG(release, "-O2");
CbrewConfig* dist = CBREW_CFG_NEW(project, "Dist", "bin/Lunox-Core-Dist-" CBREW_PLATFORM_NAME, "bin-int/Lunox-Core-Dist-" CBREW_PLATFORM_NAME);
CBREW_CFG_DEFINE(dist, "LNX_DIST");
CBREW_CFG_FLAG(dist, "-O3");
}
void create_lunox_engine(void)
{
CbrewProject* project = CBREW_PRJ_NEW("Lunox", CBREW_PROJECT_TYPE_APP);
CBREW_PRJ_FILES(project, "./engine/**.c");
CBREW_PRJ_INCLUDE_DIR(project, "lunox/src");
CBREW_PRJ_INCLUDE_DIR(project, "engine/src");
CBREW_PRJ_LINK(project, "bin/Lunox-Core-Debug-" CBREW_PLATFORM_NAME "/Lunox-Core");
CBREW_PRJ_FLAG(project, "-Wall");
CBREW_PRJ_FLAG(project, "-Wextra");
CBREW_PRJ_FLAG(project, "-Wunreachable-code");
CbrewConfig* debug = CBREW_CFG_NEW(project, "Debug", "bin/Lunox-Debug-" CBREW_PLATFORM_NAME, "bin-int/Lunox-Debug-" CBREW_PLATFORM_NAME);
CBREW_CFG_DEFINE(debug, "LNX_DEBUG");
CBREW_CFG_FLAG(debug, "-g");
CBREW_CFG_FLAG(debug, "-O0");
CbrewConfig* release = CBREW_CFG_NEW(project, "Release", "bin/Lunox-Release-" CBREW_PLATFORM_NAME, "bin-int/Lunox-Release-" CBREW_PLATFORM_NAME);
CBREW_CFG_DEFINE(release, "LNX_RELEASE");
CBREW_CFG_FLAG(release, "-g");
CBREW_CFG_FLAG(release, "-O2");
CbrewConfig* dist = CBREW_CFG_NEW(project, "Dist", "bin/Lunox-Dist-" CBREW_PLATFORM_NAME, "bin-int/Lunox-Dist-" CBREW_PLATFORM_NAME);
CBREW_CFG_DEFINE(dist, "LNX_DIST");
CBREW_CFG_FLAG(dist, "-O3");
}
int main(void)
{
create_lunox_core();
create_lunox_engine();
cbrew_build();
return EXIT_SUCCESS;
}