2023-04-15 00:07:29 +02:00
|
|
|
import os, gen_nim, gen_zig, gen_odin, gen_rust
|
2021-11-11 21:22:24 +01:00
|
|
|
|
|
|
|
tasks = [
|
2023-04-15 00:07:29 +02:00
|
|
|
[ '../sokol_log.h', 'slog_', [] ],
|
2021-11-11 21:22:24 +01:00
|
|
|
[ '../sokol_gfx.h', 'sg_', [] ],
|
|
|
|
[ '../sokol_app.h', 'sapp_', [] ],
|
2023-04-15 00:07:29 +02:00
|
|
|
[ '../sokol_glue.h', 'sapp_sg', ['sg_'] ],
|
2021-11-11 21:22:24 +01:00
|
|
|
[ '../sokol_time.h', 'stm_', [] ],
|
|
|
|
[ '../sokol_audio.h', 'saudio_', [] ],
|
|
|
|
[ '../util/sokol_gl.h', 'sgl_', ['sg_'] ],
|
|
|
|
[ '../util/sokol_debugtext.h', 'sdtx_', ['sg_'] ],
|
|
|
|
[ '../util/sokol_shape.h', 'sshape_', ['sg_'] ],
|
|
|
|
]
|
|
|
|
|
2023-04-15 00:07:29 +02:00
|
|
|
# Odin
|
|
|
|
gen_odin.prepare()
|
|
|
|
for task in tasks:
|
|
|
|
[c_header_path, main_prefix, dep_prefixes] = task
|
|
|
|
gen_odin.gen(c_header_path, main_prefix, dep_prefixes)
|
|
|
|
|
2021-11-11 21:22:24 +01:00
|
|
|
# Nim
|
|
|
|
gen_nim.prepare()
|
|
|
|
for task in tasks:
|
2023-04-15 00:07:29 +02:00
|
|
|
[c_header_path, main_prefix, dep_prefixes] = task
|
2021-11-11 21:22:24 +01:00
|
|
|
gen_nim.gen(c_header_path, main_prefix, dep_prefixes)
|
|
|
|
|
|
|
|
# Zig
|
|
|
|
gen_zig.prepare()
|
|
|
|
for task in tasks:
|
2023-04-15 00:07:29 +02:00
|
|
|
[c_header_path, main_prefix, dep_prefixes] = task
|
2021-11-11 21:22:24 +01:00
|
|
|
gen_zig.gen(c_header_path, main_prefix, dep_prefixes)
|
2023-04-15 00:07:29 +02:00
|
|
|
|
|
|
|
# Rust
|
|
|
|
gen_rust.prepare()
|
|
|
|
for task in tasks:
|
|
|
|
[c_header_path, main_prefix, dep_prefixes] = task
|
|
|
|
gen_rust.gen(c_header_path, main_prefix, dep_prefixes)
|