add raddbug files
This commit is contained in:
21
nob.c
21
nob.c
@@ -58,9 +58,9 @@ static bool build_imgui_lib(bool debug) {
|
||||
nob_cmd_append(&cmd, "/Ivendor/imgui", "/Ivendor/imgui/backends");
|
||||
|
||||
if (debug) {
|
||||
nob_cmd_append(&cmd, "/Zi", "/Od", "/D_DEBUG");
|
||||
nob_cmd_append(&cmd, "/MTd", "/Zi", "/Od", "/D_DEBUG");
|
||||
} else {
|
||||
nob_cmd_append(&cmd, "/O2", "/DNDEBUG");
|
||||
nob_cmd_append(&cmd, "/MT", "/O2", "/DNDEBUG");
|
||||
}
|
||||
|
||||
nob_cmd_append(&cmd, nob_temp_sprintf("/Fo:%s/", BUILD_DIR));
|
||||
@@ -73,7 +73,7 @@ static bool build_imgui_lib(bool debug) {
|
||||
|
||||
// Archive .obj files into a .lib
|
||||
cmd.count = 0;
|
||||
nob_cmd_append(&cmd, "lib.exe", "/nologo");
|
||||
nob_cmd_append(&cmd, "lib.exe", "/nologo", "/MACHINE:X64");
|
||||
nob_cmd_append(&cmd, nob_temp_sprintf("/OUT:%s", lib_path));
|
||||
|
||||
for (size_t i = 0; i < NOB_ARRAY_LEN(imgui_files); i++)
|
||||
@@ -92,8 +92,18 @@ int main(int argc, char **argv) {
|
||||
NOB_GO_REBUILD_URSELF(argc, argv);
|
||||
|
||||
bool debug = false;
|
||||
bool clean = false;
|
||||
for (int i = 1; i < argc; i++) {
|
||||
if (strcmp(argv[i], "debug") == 0) debug = true;
|
||||
else if (strcmp(argv[i], "clean") == 0) clean = true;
|
||||
}
|
||||
|
||||
if (clean) {
|
||||
nob_log(NOB_INFO, "Cleaning %s/", BUILD_DIR);
|
||||
Nob_Cmd cmd = {0};
|
||||
nob_cmd_append(&cmd, "cmd.exe", "/c", "if exist " BUILD_DIR " rmdir /s /q " BUILD_DIR);
|
||||
if (!nob_cmd_run(&cmd)) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!nob_mkdir_if_not_exists(BUILD_DIR)) return 1;
|
||||
@@ -109,9 +119,9 @@ int main(int argc, char **argv) {
|
||||
nob_cmd_append(&cmd, "/Isrc", "/Ivendor/imgui", "/Ivendor/imgui/backends");
|
||||
|
||||
if (debug) {
|
||||
nob_cmd_append(&cmd, "/Zi", "/Od", "/D_DEBUG");
|
||||
nob_cmd_append(&cmd, "/MTd", "/Zi", "/Od", "/D_DEBUG");
|
||||
} else {
|
||||
nob_cmd_append(&cmd, "/Zi", "/O2", "/DNDEBUG");
|
||||
nob_cmd_append(&cmd, "/MT", "/Zi", "/O2", "/DNDEBUG");
|
||||
}
|
||||
|
||||
nob_cmd_append(&cmd, nob_temp_sprintf("/Fe:%s/autosample.exe", BUILD_DIR));
|
||||
@@ -122,6 +132,7 @@ int main(int argc, char **argv) {
|
||||
nob_cmd_append(&cmd, src_files[i]);
|
||||
|
||||
nob_cmd_append(&cmd, "/link");
|
||||
nob_cmd_append(&cmd, "/MACHINE:X64");
|
||||
nob_cmd_append(&cmd, "/SUBSYSTEM:CONSOLE");
|
||||
nob_cmd_append(&cmd, nob_temp_sprintf("/PDB:%s/autosample.pdb", BUILD_DIR));
|
||||
nob_cmd_append(&cmd, "/DEBUG");
|
||||
|
||||
Reference in New Issue
Block a user