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