reinit repo after broken git
This commit is contained in:
65
build_file.c
Normal file
65
build_file.c
Normal file
@@ -0,0 +1,65 @@
|
||||
#include "src/core/core.h"
|
||||
#include "src/core/core.c"
|
||||
|
||||
#define BUILD_TOOL_LIB
|
||||
#define S8_String s8_t
|
||||
#include "src/meta/build_tool.c"
|
||||
#include "src/meta/parser.c"
|
||||
#include "src/meta/serialize.c"
|
||||
|
||||
#include "src/app/app.meta.c"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int ok = 0;
|
||||
|
||||
ma_arena_t *arena = ma_create(ma_default_reserve_size);
|
||||
meta_app(arena);
|
||||
|
||||
bool run_server = false;
|
||||
bool core_test_target = false;
|
||||
bool wasm_target = true;
|
||||
bool win32_target = false;
|
||||
|
||||
if (run_server) {
|
||||
os_systemf("start /D ..\\package ..\\package\\run_server.bat");
|
||||
}
|
||||
|
||||
if (win32_target) {
|
||||
os_delete_file(s8_lit("win32_app.pdb"));
|
||||
ok = os_systemf(
|
||||
"cl ../src/app/app_win32.c -Fe:win32_app.exe -Fd:win32_app.pdb"
|
||||
" -I ../src"
|
||||
" /Zi /FC /nologo /Oi"
|
||||
" /WX /W3 /wd4200 /diagnostics:column"
|
||||
" /link /incremental:no"
|
||||
);
|
||||
if (ok != 0) return ok;
|
||||
}
|
||||
|
||||
if (core_test_target) {
|
||||
os_delete_file(s8_lit("core_test.pdb"));
|
||||
ok = os_systemf(
|
||||
"cl ../src/core_test/core_test_entry.c -Fe:core_test.exe -Fd:core_test.pdb"
|
||||
" -I ../src"
|
||||
" /Zi /FC /nologo /Oi"
|
||||
" /WX /W3 /wd4200 /diagnostics:column"
|
||||
" /link /incremental:no"
|
||||
);
|
||||
if (ok != 0) return ok;
|
||||
}
|
||||
|
||||
|
||||
if (wasm_target) {
|
||||
ok = os_systemf(
|
||||
"clang.exe ../src/wasm_app/main.c -o main.wasm"
|
||||
" -Oz -g -I../src"
|
||||
" -Wall -Wno-missing-braces"
|
||||
" -fdiagnostics-absolute-paths -fdiagnostics-format=msvc"
|
||||
" --target=wasm32 -nostdlib -mbulk-memory -msimd128"
|
||||
" -Wl,-export-dynamic,--allow-undefined,--import-memory,--no-entry,--initial-memory=131072000,--max-memory=4294967296"
|
||||
);
|
||||
os_copy("main.wasm", "../package/main.wasm", os_copy_overwrite);
|
||||
if (ok != 0) return ok;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
Reference in New Issue
Block a user