medfall

A super great game engine
Log | Files | Refs

commit 3051a551af356dbed945ef5efbe980c7c61b349b
parent d90002161cf78dad5a18241456774e59f5039a41
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sun May  7 22:51:16 +0300

Only build medfall and launch for release builds

Diffstat:
make.lua | 44++++++++++++++++++++++++++------------------
scripts/gen_makefile.lua | 4++--
2 files changed, 28 insertions(+), 20 deletions(-)
diff --git a/make.lua b/make.lua @@ -1,16 +1,35 @@ require( "scripts.gen_makefile" ) local common_objs = { "memory_arena", "log", "ggformat", "strlcpy", "strlcat", "strtonum", "profiler", "stats", "rng/well512" } -local game_objs = { "main", "work_queue", "renderer", "gl", "glad", "immediate", "text_renderer", "stb_truetype", common_objs } -local game_libs = { "glfw", "squish", "tinyobjloader" } +local game_objs = { "work_queue", "renderer", "gl", "glad", "immediate", "text_renderer", "stb_truetype", common_objs } +local game_libs = { "glfw", "tinyobjloader" } -bin( "medfall", { "hm", "heightmap", "terrain_manager", "lz4", "btt", "gpubtt", "skybox", "http", game_objs }, { game_libs } ) -bin( "bsp", { "bsp", "bsp_renderer", game_objs }, { game_libs } ) +bin( "medfall", { "main", "hm", "heightmap", "terrain_manager", "lz4", "btt", "gpubtt", "skybox", "http", game_objs }, { game_libs } ) +bin_ldflags( "medfall", "-lX11 -lXrandr -lXinerama -lXcursor" ) + +bin( "launch", { "launcher/main", "http", "sha2", game_objs }, { "imgui", "monocypher", game_libs } ) +bin_ldflags( "launch", "-lX11 -lXrandr -lXinerama -lXcursor" ) + +require( "libs/imgui" ) +require( "libs/glfw" ) +require( "libs/monocypher" ) +require( "libs/squish" ) +require( "libs/tinyobjloader" ) + +obj( "stb_image", "stb_image.h", "-DSTB_IMAGE_IMPLEMENTATION -Wno-shift-negative-value" ) +-- obj( "stb_image_write", "stb_image_write.h", "-DSTB_IMAGE_WRITE_IMPLEMENTATION" ) +-- obj( "stb_perlin", "stb_perlin.h", "-DSTB_PERLIN_IMPLEMENTATION" ) +obj( "stb_truetype", "stb_truetype.h", "-DSTB_TRUETYPE_IMPLEMENTATION" ) + +if config == "release" then + return +end + +bin( "bsp", { "main", "bsp", "bsp_renderer", game_objs }, { game_libs } ) -- TODO: fix btt build --- bin( "btt", { "mod_btt", "btt", "heightmap", "skybox", "stb_image", "lz4", game_objs }, { game_libs } ) -bin( "sm", { "shadow_map", game_objs }, { game_libs } ) +-- bin( "btt", { "main", "mod_btt", "btt", "heightmap", "skybox", "stb_image", "lz4", game_objs }, { game_libs } ) +bin( "sm", { "main", "shadow_map", game_objs }, { game_libs } ) -bin_ldflags( "medfall", "-lX11 -lXrandr -lXinerama -lXcursor" ) bin_ldflags( "bsp", "-lX11 -lXrandr -lXinerama -lXcursor" ) bin_ldflags( "btt", "-lX11 -lXrandr -lXinerama -lXcursor" ) bin_ldflags( "sm", "-lX11 -lXrandr -lXinerama -lXcursor" ) @@ -24,19 +43,8 @@ bin( "pp", { "pp", "lz4", "lz4hc", "heightmap", "stb_image", common_objs }, { "s bin( "utils/genkeys/genkeys", { "utils/genkeys/genkeys", common_objs }, { "monocypher" } ) bin( "utils/genkeys/sign", { "utils/genkeys/sign", common_objs }, { "monocypher" } ) -obj( "stb_image", "stb_image.h", "-DSTB_IMAGE_IMPLEMENTATION -Wno-shift-negative-value" ) -obj( "stb_image_write", "stb_image_write.h", "-DSTB_IMAGE_WRITE_IMPLEMENTATION" ) -obj( "stb_perlin", "stb_perlin.h", "-DSTB_PERLIN_IMPLEMENTATION" ) -obj( "stb_truetype", "stb_truetype.h", "-DSTB_TRUETYPE_IMPLEMENTATION" ) - obj_cxxflags( "lz4", "-O3 -g0" ) obj_cxxflags( "lz4hc", "-O3 -g0" ) bin( "test_lockfree", { "relacy" } ) obj_cxxflags( "relacy", "-std=c++98 -fexceptions -frtti -Wno-shadow -Wno-missing-field-initializers" ) - -require( "libs/imgui" ) -require( "libs/glfw" ) -require( "libs/monocypher" ) -require( "libs/squish" ) -require( "libs/tinyobjloader" ) diff --git a/scripts/gen_makefile.lua b/scripts/gen_makefile.lua @@ -64,8 +64,8 @@ local function identify_host() end end -local OS, arch = identify_host() -local config = arg[ 1 ] or "debug" +OS, arch = identify_host() +config = arg[ 1 ] or "debug" local double_arch = OS .. "-" .. arch local double_config = OS .. "-" .. config