diff --git a/build.sh b/build.sh index 65962a3..dcb346c 100755 --- a/build.sh +++ b/build.sh @@ -19,18 +19,30 @@ elif [ -x "$(command -v ld)" ]; then linker_cmd="-fuse-ld=ld"; else echo "Unable to find c/c++ linker"; exit -1; fi; # Build VMA -src="${script_dir}/vma/vma.cpp" +src="${script_dir}/external/vma/vma.cpp" flags="-std=c++20 -D_USE_MATH_DEFINES -Iexternal/vma -c -Wno-everything -static" out="-o" obj="${build}/vma.o" lib="${build}/libvma.a" -if ! [ -f "${build}/libvma.a" ]; then +if ! [ -f $lib ]; then $cpp_compiler $flags $src $out $obj ar rcs $lib $obj rm $obj fi +# Build SPIRV Reflect +src="${script_dir}/external/spirv_reflect/spirv_reflect.c" +flags="-std=c99 -D_USE_MATH_DEFINES -Iexternal/spirv_reflect -c -Wno-everything -static" +obj="${build}/spirv_reflect.o" +lib="${build}/libspirv_reflect.a" + +if ! [ -f $lib ]; then + $c_compiler $flags $src $out $obj + ar rcs $lib $obj + rm $obj +fi + # Convert Shader shader="${script_dir}/convert.comp.glsl" shader_compiler="glslc"