Files
funnygame/game/__build.c
2025-05-25 23:37:40 +03:00

42 lines
772 B
C

#include "god/c.h"
#include "god/ld.h"
char* server_dll = 0;
void server_build(struct build_data b)
{
char* files[] = {
"game/game.cpp",
"game/baseplayer.cpp",
NULL,
};
struct C_Macro macros[] = {
(struct C_Macro){"TIER0_IMPLEMENTATION","1"},
NULL,
};
struct project p = {
.b = &b,
.files = files,
.name = "server",
};
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,
.macros = macros,
});
char* libs[] = {
"c",
NULL,
};
server_dll = ld_link_project(o, (struct link_settings){
.type = LINK_TYPE_DYNAMIC,
.libs = libs,
});
mv("build/"GAME_NAME"/game/"GAME_NAME"/bin/libserver.so",server_dll);
}