diff options
| author | Andre Weissflog <floooh@gmail.com> | 2024-05-09 15:26:25 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2024-05-09 15:26:25 +0200 |
| commit | 7b7c31d96dcee2e5d1a5dbf11ba70137ba4f9adf (patch) | |
| tree | 0578d95521acb4d085e92d00f055086af0c0994e /bindgen | |
| parent | 5cb19c7720a8d7085de27a4d6c0d3023ce287ef1 (diff) | |
| parent | 55bc9cf3fa4051d485d10412c75c893c3135e885 (diff) | |
Merge branch 'master' into storage-buffers
Diffstat (limited to 'bindgen')
| -rw-r--r-- | bindgen/gen_odin.py | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/bindgen/gen_odin.py b/bindgen/gen_odin.py index dc1a2c37..d2bc55df 100644 --- a/bindgen/gen_odin.py +++ b/bindgen/gen_odin.py @@ -372,21 +372,32 @@ def gen_c_imports(inp, c_prefix, prefix): l( ' }') l( ' }') l( '} else when ODIN_OS == .Darwin {') - l( ' when USE_GL {') - l( ' when ODIN_ARCH == .arm64 {') - l(f' when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_macos_arm64_gl_debug.a"{macos_gl_libs} }} }}') - l(f' else {{ foreign import {clib_import} {{ "{clib_prefix}_macos_arm64_gl_release.a"{macos_gl_libs} }} }}') - l( ' } else {') - l(f' when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_macos_x64_gl_debug.a"{macos_gl_libs} }} }}') - l(f' else {{ foreign import {clib_import} {{ "{clib_prefix}_macos_x64_gl_release.a"{macos_gl_libs} }} }}') - l( ' }') + l( ' when USE_DLL {') + l(f' when USE_GL && ODIN_ARCH == .arm64 && DEBUG {{ foreign import {clib_import} {{ "../dylib/sokol_dylib_macos_arm64_gl_debug.dylib" }} }}') + l(f' else when USE_GL && ODIN_ARCH == .arm64 && !DEBUG {{ foreign import {clib_import} {{ "../dylib/sokol_dylib_macos_arm64_gl_release.dylib" }} }}') + l(f' else when USE_GL && ODIN_ARCH == .amd64 && DEBUG {{ foreign import {clib_import} {{ "../dylib/sokol_dylib_macos_x64_gl_debug.dylib" }} }}') + l(f' else when USE_GL && ODIN_ARCH == .amd64 && !DEBUG {{ foreign import {clib_import} {{ "../dylib/sokol_dylib_macos_x64_gl_release.dylib" }} }}') + l(f' else when !USE_GL && ODIN_ARCH == .arm64 && DEBUG {{ foreign import {clib_import} {{ "../dylib/sokol_dylib_macos_arm64_metal_debug.dylib" }} }}') + l(f' else when !USE_GL && ODIN_ARCH == .arm64 && !DEBUG {{ foreign import {clib_import} {{ "../dylib/sokol_dylib_macos_arm64_metal_release.dylib" }} }}') + l(f' else when !USE_GL && ODIN_ARCH == .amd64 && DEBUG {{ foreign import {clib_import} {{ "../dylib/sokol_dylib_macos_x64_metal_debug.dylib" }} }}') + l(f' else when !USE_GL && ODIN_ARCH == .amd64 && !DEBUG {{ foreign import {clib_import} {{ "../dylib/sokol_dylib_macos_x64_metal_release.dylib" }} }}') l( ' } else {') - l( ' when ODIN_ARCH == .arm64 {') - l(f' when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_macos_arm64_metal_debug.a"{macos_metal_libs} }} }}') - l(f' else {{ foreign import {clib_import} {{ "{clib_prefix}_macos_arm64_metal_release.a"{macos_metal_libs} }} }}') + l( ' when USE_GL {') + l( ' when ODIN_ARCH == .arm64 {') + l(f' when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_macos_arm64_gl_debug.a"{macos_gl_libs} }} }}') + l(f' else {{ foreign import {clib_import} {{ "{clib_prefix}_macos_arm64_gl_release.a"{macos_gl_libs} }} }}') + l( ' } else {') + l(f' when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_macos_x64_gl_debug.a"{macos_gl_libs} }} }}') + l(f' else {{ foreign import {clib_import} {{ "{clib_prefix}_macos_x64_gl_release.a"{macos_gl_libs} }} }}') + l( ' }') l( ' } else {') - l(f' when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_macos_x64_metal_debug.a"{macos_metal_libs} }} }}') - l(f' else {{ foreign import {clib_import} {{ "{clib_prefix}_macos_x64_metal_release.a"{macos_metal_libs} }} }}') + l( ' when ODIN_ARCH == .arm64 {') + l(f' when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_macos_arm64_metal_debug.a"{macos_metal_libs} }} }}') + l(f' else {{ foreign import {clib_import} {{ "{clib_prefix}_macos_arm64_metal_release.a"{macos_metal_libs} }} }}') + l( ' } else {') + l(f' when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_macos_x64_metal_debug.a"{macos_metal_libs} }} }}') + l(f' else {{ foreign import {clib_import} {{ "{clib_prefix}_macos_x64_metal_release.a"{macos_metal_libs} }} }}') + l( ' }') l( ' }') l( ' }') l( '} else when ODIN_OS == .Linux {') |