From: hgn Date: Sun, 15 May 2022 21:07:19 +0000 (+0100) Subject: update for minimal build env X-Git-Url: https://harrygodden.com/git/?p=vg.git;a=commitdiff_plain;h=54fc6ea045b89be67b673a2f0cd1208de1284b43 update for minimal build env --- diff --git a/dep/glfw/libglfw3.a b/dep/glfw/libglfw3.a new file mode 100644 index 0000000..e36b29e Binary files /dev/null and b/dep/glfw/libglfw3.a differ diff --git a/vg_compiler.sh b/vg_compiler.sh index 899a04a..7cf968e 100755 --- a/vg_compiler.sh +++ b/vg_compiler.sh @@ -74,7 +74,7 @@ target_os_windows(){ target_os_linux(){ target_ext="" target_compiler="gcc" - target_libs="-lGL -lglfw -lX11 -lXxf86vm -lXrandr -lm -pthread -lXi -ldl" + target_libs="-lGL -lglfw3 -lX11 -lXxf86vm -lXrandr -lm -pthread -lXi -ldl" target_libs_steam="-lsteam_api" #target_platform_include="-include $vg_root/platformutils/force_link_glibc_2.23.h" target_platform_include="" @@ -89,6 +89,10 @@ target_os_linux(){ } precompile_x(){ + if ! [ -x "$(command -v $target_compiler)" ]; then + warning "Compiler $target_compiler is not installed. Skipping item" + return 0 + fi sources="$1" output="-o $2" cmd="$target_compiler -D_REENTRANT $target_standard $target_opts $target_platform_include @@ -103,6 +107,11 @@ precompile_x(){ } compile_x(){ + if ! [ -x "$(command -v $target_compiler)" ]; then + warning "Compiler $target_compiler is not installed. Skipping item" + return 0 + fi + include="-I. -I$vg_root/dep -I$vg_root/src" libs="-L./ -L$vg_root/dep/glfw -L$vg_root/dep/steam" @@ -324,6 +333,8 @@ logit " miniaudio: $opt_recompile_mini_audio" # Main build steps +if [ $opt_tools = true ]; then detect_os; compile_tools; fi +if [ $opt_assets = true ]; then compile_assets; fi if [ $opt_linux = true ]; then target_os_linux; compile_main; fi if [ $opt_windows = true ]; then target_os_windows @@ -331,8 +342,8 @@ if [ $opt_windows = true ]; then cp $vg_root/dep/glfw/glfw3.dll $target_dir/glfw3.dll fi -if [ $opt_tools = true ]; then detect_os; compile_tools; fi -if [ $opt_assets = true ]; then compile_assets; fi + +success "Build completed (check compiler results)" if [ $opt_play = true ]; then