update for minimal build env
authorhgn <hgodden00@gmail.com>
Sun, 15 May 2022 21:07:19 +0000 (22:07 +0100)
committerhgn <hgodden00@gmail.com>
Sun, 15 May 2022 21:07:19 +0000 (22:07 +0100)
dep/glfw/libglfw3.a [new file with mode: 0644]
vg_compiler.sh

diff --git a/dep/glfw/libglfw3.a b/dep/glfw/libglfw3.a
new file mode 100644 (file)
index 0000000..e36b29e
Binary files /dev/null and b/dep/glfw/libglfw3.a differ
index 899a04a641f72e10a3d85247f9ed7d372f13d6b3..7cf968e803a581515c9dacd439dad68f7f9e94cc 100755 (executable)
@@ -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