64 lines
1.2 KiB
C
64 lines
1.2 KiB
C
#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);
|
|
}
|