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=""
}
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
}
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"
# 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
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