This commit is contained in:
2025-05-25 23:37:40 +03:00
commit 7f054e2904
79 changed files with 4850 additions and 0 deletions

63
engine/__build.c Normal file
View File

@@ -0,0 +1,63 @@
#include "god/c.h"
#include "god/ld.h"
#include "god/utils.h"
void engine_build(struct build_data b)
{
char* files[] = {
"engine/console.cpp",
"engine/filesystem.cpp",
"engine/server.cpp",
"engine/engine.cpp",
/* rendering */
"engine/vk_videolinux.cpp",
"engine/vk_video.cpp",
"engine/vk_brush.cpp",
/* entities */
"engine/baseentity.cpp",
"engine/level.cpp",
"engine/brush.cpp",
/* server */
"engine/sv_worldspawn.cpp",
"engine/sv_light.cpp",
/* client */
"engine/cl_worldspawn.cpp",
"engine/cl_light.cpp",
NULL,
};
char *rustFiles[] = {
"engine/rust/physics.rs"
};
struct project p = {
.b = &b,
.files = files,
.name = "engine",
};
struct project o = C_compile(p, (struct C_settings){
.generation_flags = C_GENERATION_FLAGS_PIC,
.compile_flags = C_COMPILE_FLAGS_WALL,
.include_dirs = include_dirs,
});
add_item(&o.files, tier1_lib);
char* libs[] = {
"c",
"vulkan",
"X11",
NULL,
};
char* dll = ld_link_project(o, (struct link_settings){
.type = LINK_TYPE_DYNAMIC,
.libs = libs,
});
mv("build/"GAME_NAME"/game/bin",dll);
}