minor build changes

This commit is contained in:
IonutParau 2025-07-28 22:41:12 +02:00
parent 255df4d352
commit bf473f5c4c
2 changed files with 4 additions and 4 deletions

View File

@ -52,7 +52,7 @@ fn addEngineSources(b: *std.Build, opts: LibBuildOpts) *std.Build.Module {
if(strict) "-Werror" else "", if(strict) "-Werror" else "",
"-std=gnu23", "-std=gnu23",
"-Wno-keyword-macro", // cuz bools "-Wno-keyword-macro", // cuz bools
"-fPIC", "-fPIE",
}, },
}); });
@ -63,7 +63,7 @@ fn addEngineSources(b: *std.Build, opts: LibBuildOpts) *std.Build.Module {
"src/tinycthread.c", "src/tinycthread.c",
}, },
.flags = &.{ .flags = &.{
"-fPIC", "-fPIE",
}, },
}); });
} }
@ -153,12 +153,14 @@ pub fn build(b: *std.Build) !void {
.name = "neonucleus", .name = "neonucleus",
.root_module = engineMod, .root_module = engineMod,
.pic = true, .pic = true,
.code_model = .default,
}); });
const engineShared = b.addSharedLibrary(.{ const engineShared = b.addSharedLibrary(.{
.name = if(os == .windows) "neonucleusdll" else "neonucleus", .name = if(os == .windows) "neonucleusdll" else "neonucleus",
.root_module = engineMod, .root_module = engineMod,
.pic = true, .pic = true,
.code_model = .default,
}); });
const engineStep = b.step("engine", "Builds the engine as a static library"); const engineStep = b.step("engine", "Builds the engine as a static library");

View File

@ -811,8 +811,6 @@ int main(int argc, char **argv) {
double interval = 1.0/tps; double interval = 1.0/tps;
double totalTime = 0; double totalTime = 0;
SetTargetFPS(144);
while(true) { while(true) {
if(WindowShouldClose()) break; if(WindowShouldClose()) break;
nn_setEnergyInfo(computer, 5000, 5000); nn_setEnergyInfo(computer, 5000, 5000);