X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=build.c;h=94869b4874606405bdc715fbb3078875c2baedd5;hb=b440efbe5785d114d08bb3f5ec0e09cad943006d;hp=68e485a80a8376aab728044ece7e3c05fd69ee42;hpb=81099ee81c1a09ead474333101408b7b8a4a94fc;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/build.c b/build.c index 68e485a..94869b4 100644 --- a/build.c +++ b/build.c @@ -205,11 +205,25 @@ void compile_server( struct vg_project *proj ) vg_compile_project( proj ); } +void compile_tools( struct vg_env *env, struct vg_project *proj ) +{ + struct vg_env backup = *env; + env->optimization = 3; /* force optimization always */ + env->debug_asan = 0; + + vg_project_new_target( proj, "tools/qoi", k_obj_type_shared ); + vg_add_source( proj, "qoi_lib.c " ); + vg_compile_project( proj ); + + *env = backup; +} + /* * Scripts * -------------------------------------------------------------------------- */ -void s_release_all(void){ +void s_release_all(void) +{ vg_info( "running script: s_release_all(void)\n" ); struct vg_project content_proj, windows_proj, linux_proj; @@ -224,12 +238,14 @@ void s_release_all(void){ env.platform = k_platform_windows; vg_project_init( &windows_proj, &env, "skaterift" ); build_game_bin( &windows_proj ); + compile_tools( &env, &windows_proj ); /* binaries for linux */ env = vg_release_env; env.platform = k_platform_linux; vg_project_init( &linux_proj, &env, "skaterift" ); build_game_bin( &linux_proj ); + compile_tools( &env, &linux_proj ); /* package them up for storage */ vg_tarball_project( &content_proj ); @@ -250,6 +266,7 @@ void s_testing_build(void) vg_project_init( &test_proj, &vg_test_env, "skaterift-test" ); build_game_bin( &test_proj ); + compile_tools( &vg_test_env, &test_proj ); build_game_content( &test_proj ); vg_add_blob( &test_proj, "steam_appid.txt", "" ); }