Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #1 from tsirysndr/build-with-zig

try to compile the project with zig

authored by

Tsiry Sandratraina and committed by
GitHub
4619b2e3 14200332

+3345 -6
+13
.gitignore
··· 10 10 *~ 11 11 __pycache__ 12 12 13 + # Don't exclude zig files 14 + !build.zig 15 + !build.zig.zon 16 + 17 + !*/build.zig 18 + !*/build.zig.zon 19 + 20 + # Zig build artifacts 21 + .zig-cache 22 + zig-out 23 + 13 24 # Intermediate language files 14 25 /apps/lang/*.update 15 26 /apps/lang/*.new ··· 302 313 /utils/regtools/regtool 303 314 /utils/regtools/swiss_knife 304 315 /utils/regtools/tester_v1 316 + 317 + .vscode
+20
README.md
··· 1 + ![Rockbox Zig](https://www.rockbox.org/rockbox400.png) 2 + 3 + # Rockbox Zig 🎵 ⚡ 4 + 5 + Rockbox Zig is an incremental enhancement of the [Rockbox](https://www.rockbox.org) firmware for portable audio players in the Zig programming language. 6 + 7 + > [!NOTE] 8 + **🐲 It is a work in progress and is not yet ready for use. 🏗️🚧** 9 + 10 + ## 🚀 Quickstart 11 + 12 + Run the following commands to build the project: 13 + 14 + ```sh 15 + . ./bin/activate-hermit 16 + mkdir -p build && \ 17 + cd build && \ 18 + ../tools/configure && \ 19 + make zig 20 + ```
+1
bin/.make-4.4.pkg
··· 1 + hermit
+1
bin/.zig-0.13.0.pkg
··· 1 + hermit
+7
bin/README.hermit.md
··· 1 + # Hermit environment 2 + 3 + This is a [Hermit](https://github.com/cashapp/hermit) bin directory. 4 + 5 + The symlinks in this directory are managed by Hermit and will automatically 6 + download and install Hermit itself as well as packages. These packages are 7 + local to this environment.
+36
bin/activate-hermit
··· 1 + #!/bin/bash 2 + # This file must be used with "source bin/activate-hermit" from bash or zsh. 3 + # You cannot run it directly 4 + # 5 + # THIS FILE IS GENERATED; DO NOT MODIFY 6 + 7 + readonly YELLOW="$(tput setaf 3 2>/dev/null || echo '')" 8 + readonly NO_COLOR="$(tput sgr0 2>/dev/null || echo '')" 9 + 10 + if [ "${BASH_SOURCE-}" = "$0" ]; then 11 + echo "You must source this script: \$ source $0" >&2 12 + exit 33 13 + fi 14 + 15 + BIN_DIR="$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}")" 16 + if "${BIN_DIR}/hermit" noop > /dev/null; then 17 + eval "$("${BIN_DIR}/hermit" activate "${BIN_DIR}/..")" 18 + 19 + if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ]; then 20 + hash -r 2>/dev/null 21 + fi 22 + 23 + cat <<EOF 24 + ${YELLOW} 25 + __________ __ ___. 26 + Open \______ \ ____ ____ | | _\_ |__ _______ ___ 27 + Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 28 + Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 29 + Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \\ 30 + \/ \/ \/ \/ \/ 31 + ${NO_COLOR} 32 + EOF 33 + echo Zig $(zig version) 34 + echo $(which zig) 35 + echo "Hermit environment $("${HERMIT_ENV}"/bin/hermit env HERMIT_ENV) activated" 36 + fi
+43
bin/hermit
··· 1 + #!/bin/bash 2 + # 3 + # THIS FILE IS GENERATED; DO NOT MODIFY 4 + 5 + set -eo pipefail 6 + 7 + export HERMIT_USER_HOME=~ 8 + 9 + if [ -z "${HERMIT_STATE_DIR}" ]; then 10 + case "$(uname -s)" in 11 + Darwin) 12 + export HERMIT_STATE_DIR="${HERMIT_USER_HOME}/Library/Caches/hermit" 13 + ;; 14 + Linux) 15 + export HERMIT_STATE_DIR="${XDG_CACHE_HOME:-${HERMIT_USER_HOME}/.cache}/hermit" 16 + ;; 17 + esac 18 + fi 19 + 20 + export HERMIT_DIST_URL="${HERMIT_DIST_URL:-https://github.com/cashapp/hermit/releases/download/stable}" 21 + HERMIT_CHANNEL="$(basename "${HERMIT_DIST_URL}")" 22 + export HERMIT_CHANNEL 23 + export HERMIT_EXE=${HERMIT_EXE:-${HERMIT_STATE_DIR}/pkg/hermit@${HERMIT_CHANNEL}/hermit} 24 + 25 + if [ ! -x "${HERMIT_EXE}" ]; then 26 + echo "Bootstrapping ${HERMIT_EXE} from ${HERMIT_DIST_URL}" 1>&2 27 + INSTALL_SCRIPT="$(mktemp)" 28 + # This value must match that of the install script 29 + INSTALL_SCRIPT_SHA256="180e997dd837f839a3072a5e2f558619b6d12555cd5452d3ab19d87720704e38" 30 + if [ "${INSTALL_SCRIPT_SHA256}" = "BYPASS" ]; then 31 + curl -fsSL "${HERMIT_DIST_URL}/install.sh" -o "${INSTALL_SCRIPT}" 32 + else 33 + # Install script is versioned by its sha256sum value 34 + curl -fsSL "${HERMIT_DIST_URL}/install-${INSTALL_SCRIPT_SHA256}.sh" -o "${INSTALL_SCRIPT}" 35 + # Verify install script's sha256sum 36 + openssl dgst -sha256 "${INSTALL_SCRIPT}" | \ 37 + awk -v EXPECTED="$INSTALL_SCRIPT_SHA256" \ 38 + '$2!=EXPECTED {print "Install script sha256 " $2 " does not match " EXPECTED; exit 1}' 39 + fi 40 + /bin/bash "${INSTALL_SCRIPT}" 1>&2 41 + fi 42 + 43 + exec "${HERMIT_EXE}" --level=fatal exec "$0" -- "$@"
bin/hermit.hcl

This is a binary file and will not be displayed.

+1
bin/make
··· 1 + .make-4.4.pkg
+1
bin/zig
··· 1 + .zig-0.13.0.pkg
+2836
build.zig
··· 1 + const std = @import("std"); 2 + 3 + pub const BuildOptions = struct { 4 + name: []const u8, 5 + sources: []const []const u8, 6 + link_libraries: []const *std.Build.Step.Compile, 7 + target: std.Build.ResolvedTarget, 8 + optimize: std.builtin.OptimizeMode, 9 + macros: []const []const u8 = &[_][]const u8{"CODEC"}, 10 + cflags: []const []const u8 = &cflags, 11 + is_fft_plugin: bool = false, 12 + is_mikmod_plugin: bool = false, 13 + }; 14 + 15 + // Although this function looks imperative, note that its job is to 16 + // declaratively construct a build graph that will be executed by an external 17 + // runner. 18 + pub fn build(b: *std.Build) void { 19 + // Standard target options allows the person running `zig build` to choose 20 + // what target to build for. Here we do not override the defaults, which 21 + // means any target is allowed, and the default is native. Other options 22 + // for restricting supported target set are available. 23 + const target = b.standardTargetOptions(.{}); 24 + //const target = b.resolveTargetQuery(.{ 25 + // .cpu_arch = .x86_64, 26 + // .os_tag = .linux, 27 + // .abi = .gnu, 28 + //}); 29 + 30 + // Standard optimization options allow the person running `zig build` to select 31 + // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we do not 32 + // set a preferred release mode, allowing the user to decide how to optimize. 33 + const optimize = b.standardOptimizeOption(.{}); 34 + 35 + const lib = b.addStaticLibrary(.{ 36 + .name = "rockbox", 37 + // In this case the main source file is merely a path, however, in more 38 + // complicated build scripts, this could be a generated file. 39 + .root_source_file = b.path("src/root.zig"), 40 + .target = target, 41 + .optimize = optimize, 42 + }); 43 + 44 + // This declares intent for the library to be installed into the standard 45 + // location when the user invokes the "install" step (the default step when 46 + // running `zig build`). 47 + b.installArtifact(lib); 48 + 49 + const exe = b.addExecutable(.{ 50 + .name = "rockbox", 51 + // .root_source_file = b.path("src/main.zig"), 52 + .target = target, 53 + .optimize = optimize, 54 + }); 55 + 56 + // This declares intent for the executable to be installed into the 57 + // standard location when the user invokes the "install" step (the default 58 + // step when running `zig build`). 59 + b.installArtifact(exe); 60 + 61 + // This *creates* a Run step in the build graph, to be executed when another 62 + // step is evaluated that depends on it. The next line below will establish 63 + // such a dependency. 64 + const run_cmd = b.addRunArtifact(exe); 65 + 66 + // By making the run step depend on the install step, it will be run from the 67 + // installation directory rather than directly from within the cache directory. 68 + // This is not necessary, however, if the application depends on other installed 69 + // files, this ensures they will be present and in the expected location. 70 + run_cmd.step.dependOn(b.getInstallStep()); 71 + 72 + // This allows the user to pass arguments to the application in the build 73 + // command itself, like this: `zig build run -- arg1 arg2 etc` 74 + if (b.args) |args| { 75 + run_cmd.addArgs(args); 76 + } 77 + 78 + // This creates a build step. It will be visible in the `zig build --help` menu, 79 + // and can be selected like this: `zig build run` 80 + // This will evaluate the `run` step rather than the default, which is "install". 81 + const run_step = b.step("run", "Run the app"); 82 + run_step.dependOn(&run_cmd.step); 83 + 84 + // Creates a step for unit testing. This only builds the test executable 85 + // but does not run it. 86 + const lib_unit_tests = b.addTest(.{ 87 + .root_source_file = b.path("src/root.zig"), 88 + .target = target, 89 + .optimize = optimize, 90 + }); 91 + 92 + const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests); 93 + 94 + const exe_unit_tests = b.addTest(.{ 95 + .root_source_file = b.path("src/main.zig"), 96 + .target = target, 97 + .optimize = optimize, 98 + }); 99 + 100 + const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests); 101 + 102 + // Similar to creating the run step earlier, this exposes a `test` step to 103 + // the `zig build --help` menu, providing a way for the user to request 104 + // running the unit tests. 105 + const test_step = b.step("test", "Run unit tests"); 106 + test_step.dependOn(&run_lib_unit_tests.step); 107 + test_step.dependOn(&run_exe_unit_tests.step); 108 + 109 + build_tools(b, target, optimize); 110 + 111 + exe.addCSourceFiles(.{ 112 + // .files = &[_][]const u8{}, 113 + .files = &all_sources, 114 + .flags = &cflags, 115 + }); 116 + 117 + lib.addCSourceFiles(.{ 118 + //.files = &all_sources, 119 + .files = &[_][]const u8{}, 120 + .flags = &cflags, 121 + }); 122 + 123 + const libfirmware = b.addStaticLibrary(.{ 124 + .name = "firmware", 125 + .target = target, 126 + .optimize = optimize, 127 + }); 128 + b.installArtifact(libfirmware); 129 + 130 + libfirmware.addCSourceFiles(.{ 131 + .files = &libfirmware_sources, 132 + .flags = &cflags, 133 + }); 134 + 135 + defineCMacros(libfirmware); 136 + addIncludePaths(libfirmware); 137 + 138 + libfirmware.linkSystemLibrary("usb"); 139 + 140 + const libspeex_voice = b.addStaticLibrary(.{ 141 + .name = "speex-voice", 142 + .target = target, 143 + .optimize = optimize, 144 + }); 145 + b.installArtifact(libspeex_voice); 146 + 147 + libspeex_voice.addCSourceFiles(.{ 148 + .files = &libspeex_voice_sources, 149 + .flags = &[_][]const u8{ 150 + "-W", 151 + "-Wall", 152 + "-Wextra", 153 + "-Os", 154 + "-Wstrict-prototypes", 155 + "-pipe", 156 + "-std=gnu11", 157 + "-Wno-gnu", 158 + "-fPIC", 159 + "-fvisibility=hidden", 160 + "-Wno-pointer-to-int-cast", 161 + "-fno-delete-null-pointer-checks", 162 + "-fno-strict-overflow", 163 + "-fno-builtin", 164 + "-g", 165 + "-Wno-unused-result", 166 + "-Wno-pointer-sign", 167 + "-Wno-override-init", 168 + "-Wno-shift-negative-value", 169 + "-Wno-unused-const-variable", 170 + "-Wno-unused-variable", 171 + "-Wno-unused-but-set-variable", 172 + "-O2", 173 + "-Wno-tautological-compare", 174 + "-Wno-expansion-to-defined", 175 + "-I./lib/rbcodec/codecs/libspeex", 176 + }, 177 + }); 178 + 179 + libspeex_voice.defineCMacro("HAVE_CONFIG_H", null); 180 + libspeex_voice.defineCMacro("ROCKBOX_VOICE_CODEC", null); 181 + libspeex_voice.defineCMacro("SPEEX_DISABLE_ENCODER", null); 182 + defineCMacros(libspeex_voice); 183 + addIncludePaths(libspeex_voice); 184 + 185 + const librbcodec = b.addStaticLibrary(.{ 186 + .name = "rbcodec", 187 + .target = target, 188 + .optimize = optimize, 189 + }); 190 + b.installArtifact(librbcodec); 191 + 192 + librbcodec.addCSourceFiles(.{ 193 + .files = &librbcodec_sources, 194 + .flags = &cflags, 195 + }); 196 + 197 + defineCMacros(librbcodec); 198 + addIncludePaths(librbcodec); 199 + 200 + const libskinparser = b.addStaticLibrary(.{ 201 + .name = "skinparser", 202 + .target = target, 203 + .optimize = optimize, 204 + }); 205 + b.installArtifact(libskinparser); 206 + 207 + libskinparser.addCSourceFiles(.{ 208 + .files = &libskinparser_sources, 209 + .flags = &cflags, 210 + }); 211 + 212 + defineCMacros(libskinparser); 213 + addIncludePaths(libskinparser); 214 + 215 + const libfixedpoint = b.addStaticLibrary(.{ 216 + .name = "fixedpoint", 217 + .target = target, 218 + .optimize = optimize, 219 + }); 220 + 221 + b.installArtifact(libfixedpoint); 222 + 223 + libfixedpoint.addCSourceFiles(.{ 224 + .files = &libfixedpoint_sources, 225 + .flags = &cflags, 226 + }); 227 + 228 + defineCMacros(libfixedpoint); 229 + addIncludePaths(libfixedpoint); 230 + 231 + const libuisimulator = b.addStaticLibrary(.{ 232 + .name = "uisimulator", 233 + .target = target, 234 + .optimize = optimize, 235 + }); 236 + 237 + b.installArtifact(libuisimulator); 238 + 239 + libuisimulator.addCSourceFiles(.{ 240 + .files = &libuisimulator_sources, 241 + .flags = &cflags, 242 + }); 243 + 244 + libuisimulator.defineCMacro("HAVE_CONFIG_H", null); 245 + defineCMacros(libuisimulator); 246 + addIncludePaths(libuisimulator); 247 + 248 + const libcodec = b.addStaticLibrary(.{ 249 + .name = "codec", 250 + .target = target, 251 + .optimize = optimize, 252 + }); 253 + 254 + b.installArtifact(libcodec); 255 + 256 + libcodec.addCSourceFiles(.{ 257 + .files = &libcodec_sources, 258 + .flags = &cflags, 259 + }); 260 + 261 + defineCMacros(libcodec); 262 + addIncludePaths(libcodec); 263 + 264 + const libtlsf = b.addStaticLibrary(.{ 265 + .name = "tlsf", 266 + .target = target, 267 + .optimize = optimize, 268 + }); 269 + 270 + b.installArtifact(libtlsf); 271 + 272 + libtlsf.addCSourceFiles(.{ 273 + .files = &[_][]const u8{ 274 + "lib/tlsf/src/tlsf.c", 275 + }, 276 + .flags = &cflags, 277 + }); 278 + 279 + defineCMacros(libtlsf); 280 + addIncludePaths(libtlsf); 281 + 282 + build_codec(b, .{ 283 + .name = "opus", 284 + .target = target, 285 + .optimize = optimize, 286 + .sources = &libopus_sources, 287 + .link_libraries = &[_]*std.Build.Step.Compile{ 288 + libcodec, 289 + libfixedpoint, 290 + }, 291 + .macros = &[_][]const u8{ 292 + "CODEC", 293 + "HAVE_CONFIG_H", 294 + }, 295 + .cflags = &[_][]const u8{ 296 + "-W", 297 + "-Wall", 298 + "-Wextra", 299 + "-Os", 300 + "-Wstrict-prototypes", 301 + "-pipe", 302 + "-std=gnu11", 303 + "-Wno-gnu", 304 + "-fPIC", 305 + "-fvisibility=hidden", 306 + "-Wno-pointer-to-int-cast", 307 + "-fno-delete-null-pointer-checks", 308 + "-fno-strict-overflow", 309 + "-fno-builtin", 310 + "-g", 311 + "-Wno-unused-result", 312 + "-Wno-pointer-sign", 313 + "-Wno-override-init", 314 + "-Wno-shift-negative-value", 315 + "-Wno-unused-const-variable", 316 + "-Wno-unused-variable", 317 + "-Wno-unused-but-set-variable", 318 + "-O2", 319 + "-Wno-tautological-compare", 320 + "-Wno-expansion-to-defined", 321 + "-I./lib/rbcodec/codecs/libopus/celt", 322 + "-I./lib/rbcodec/codecs/libopus/silk", 323 + "-include", 324 + "./lib/rbcodec/codecs/libopus/config.h", 325 + }, 326 + }); 327 + 328 + build_codec(b, .{ 329 + .name = "vorbis", 330 + .target = target, 331 + .optimize = optimize, 332 + .sources = &[_][]const u8{ 333 + "lib/rbcodec/codecs/vorbis.c", 334 + "lib/rbcodec/codecs/libtremor/bitwise.c", 335 + "lib/rbcodec/codecs/libtremor/block.c", 336 + "lib/rbcodec/codecs/libtremor/codebook.c", 337 + "lib/rbcodec/codecs/libtremor/floor0.c", 338 + "lib/rbcodec/codecs/libtremor/floor1.c", 339 + "lib/rbcodec/codecs/libtremor/framing.c", 340 + "lib/rbcodec/codecs/libtremor/info.c", 341 + "lib/rbcodec/codecs/libtremor/mapping0.c", 342 + "lib/rbcodec/codecs/libtremor/registry.c", 343 + "lib/rbcodec/codecs/libtremor/res012.c", 344 + "lib/rbcodec/codecs/libtremor/sharedbook.c", 345 + "lib/rbcodec/codecs/libtremor/synthesis.c", 346 + "lib/rbcodec/codecs/libtremor/vorbisfile.c", 347 + "lib/rbcodec/codecs/libtremor/window.c", 348 + "lib/rbcodec/codecs/libtremor/ctype.c", 349 + "lib/rbcodec/codecs/libtremor/oggmalloc.c", 350 + }, 351 + .link_libraries = &[_]*std.Build.Step.Compile{ 352 + libcodec, 353 + libfixedpoint, 354 + }, 355 + }); 356 + 357 + const libmad = b.addStaticLibrary(.{ 358 + .name = "mad", 359 + .target = target, 360 + .optimize = optimize, 361 + }); 362 + 363 + b.installArtifact(libmad); 364 + 365 + libmad.addCSourceFiles(.{ 366 + .files = &libmad_sources, 367 + .flags = &cflags, 368 + }); 369 + 370 + libmad.defineCMacro("CODEC", null); 371 + defineCMacros(libmad); 372 + addIncludePaths(libmad); 373 + 374 + const libasf = b.addStaticLibrary(.{ 375 + .name = "asf", 376 + .target = target, 377 + .optimize = optimize, 378 + }); 379 + 380 + b.installArtifact(libasf); 381 + 382 + libasf.addCSourceFiles(.{ 383 + .files = &[_][]const u8{ 384 + "lib/rbcodec/codecs/libasf/asf.c", 385 + }, 386 + .flags = &cflags, 387 + }); 388 + 389 + libasf.defineCMacro("CODEC", null); 390 + libasf.defineCMacro("HAVE_CONFIG_H", null); 391 + defineCMacros(libasf); 392 + addIncludePaths(libasf); 393 + 394 + build_codec(b, .{ 395 + .name = "mpa", 396 + .target = target, 397 + .optimize = optimize, 398 + .sources = &[_][]const u8{ 399 + "lib/rbcodec/codecs/mpa.c", 400 + }, 401 + .link_libraries = &[_]*std.Build.Step.Compile{ 402 + libcodec, 403 + libfixedpoint, 404 + libmad, 405 + libasf, 406 + }, 407 + }); 408 + 409 + const libffmpegFLAC = b.addStaticLibrary(.{ 410 + .name = "ffmpegFLAC", 411 + .target = target, 412 + .optimize = optimize, 413 + }); 414 + 415 + b.installArtifact(libffmpegFLAC); 416 + 417 + libffmpegFLAC.addCSourceFiles(.{ 418 + .files = &[_][]const u8{ 419 + "lib/rbcodec/codecs/libffmpegFLAC/decoder.c", 420 + "lib/rbcodec/codecs/libffmpegFLAC/shndec.c", 421 + }, 422 + .flags = &cflags, 423 + }); 424 + 425 + libffmpegFLAC.defineCMacro("CODEC", null); 426 + defineCMacros(libffmpegFLAC); 427 + addIncludePaths(libffmpegFLAC); 428 + 429 + build_codec(b, .{ 430 + .name = "flac", 431 + .target = target, 432 + .optimize = optimize, 433 + .sources = &[_][]const u8{ 434 + "lib/rbcodec/codecs/flac.c", 435 + }, 436 + .link_libraries = &[_]*std.Build.Step.Compile{ 437 + libcodec, 438 + libfixedpoint, 439 + libffmpegFLAC, 440 + }, 441 + }); 442 + 443 + const libpcm = b.addStaticLibrary(.{ 444 + .name = "pcm", 445 + .target = target, 446 + .optimize = optimize, 447 + }); 448 + 449 + b.installArtifact(libpcm); 450 + 451 + libpcm.addCSourceFiles(.{ 452 + .files = &[_][]const u8{ 453 + "lib/rbcodec/codecs/libpcm/linear_pcm.c", 454 + "lib/rbcodec/codecs/libpcm/itut_g711.c", 455 + "lib/rbcodec/codecs/libpcm/dvi_adpcm.c", 456 + "lib/rbcodec/codecs/libpcm/ieee_float.c", 457 + "lib/rbcodec/codecs/libpcm/adpcm_seek.c", 458 + "lib/rbcodec/codecs/libpcm/dialogic_oki_adpcm.c", 459 + "lib/rbcodec/codecs/libpcm/ms_adpcm.c", 460 + "lib/rbcodec/codecs/libpcm/yamaha_adpcm.c", 461 + "lib/rbcodec/codecs/libpcm/ima_adpcm_common.c", 462 + "lib/rbcodec/codecs/libpcm/qt_ima_adpcm.c", 463 + "lib/rbcodec/codecs/libpcm/swf_adpcm.c", 464 + }, 465 + .flags = &cflags, 466 + }); 467 + 468 + libpcm.defineCMacro("CODEC", null); 469 + defineCMacros(libpcm); 470 + addIncludePaths(libpcm); 471 + 472 + build_codec(b, .{ 473 + .name = "wav", 474 + .target = target, 475 + .optimize = optimize, 476 + .sources = &[_][]const u8{ 477 + "lib/rbcodec/codecs/wav.c", 478 + }, 479 + .link_libraries = &[_]*std.Build.Step.Compile{ 480 + libcodec, 481 + libfixedpoint, 482 + libpcm, 483 + }, 484 + }); 485 + 486 + const librm = b.addStaticLibrary(.{ 487 + .name = "rm", 488 + .target = target, 489 + .optimize = optimize, 490 + }); 491 + 492 + b.installArtifact(librm); 493 + 494 + librm.addCSourceFiles(.{ .files = &[_][]const u8{ 495 + "lib/rbcodec/codecs/librm/rm.c", 496 + }, .flags = &cflags }); 497 + 498 + librm.defineCMacro("CODEC", null); 499 + defineCMacros(librm); 500 + addIncludePaths(librm); 501 + 502 + build_codec(b, .{ 503 + .name = "a52", 504 + .target = target, 505 + .optimize = optimize, 506 + .sources = &[_][]const u8{ 507 + "lib/rbcodec/codecs/a52.c", 508 + "lib/rbcodec/codecs/liba52/bit_allocate.c", 509 + "lib/rbcodec/codecs/liba52/bitstream.c", 510 + "lib/rbcodec/codecs/liba52/downmix.c", 511 + "lib/rbcodec/codecs/liba52/imdct.c", 512 + "lib/rbcodec/codecs/liba52/parse.c", 513 + }, 514 + .link_libraries = &[_]*std.Build.Step.Compile{ 515 + libcodec, 516 + libfixedpoint, 517 + librm, 518 + }, 519 + }); 520 + 521 + build_codec(b, .{ 522 + .name = "wavpack", 523 + .target = target, 524 + .optimize = optimize, 525 + .sources = &[_][]const u8{ 526 + "lib/rbcodec/codecs/wavpack.c", 527 + "lib/rbcodec/codecs/libwavpack/bits.c", 528 + "lib/rbcodec/codecs/libwavpack/float.c", 529 + "lib/rbcodec/codecs/libwavpack/metadata.c", 530 + "lib/rbcodec/codecs/libwavpack/unpack.c", 531 + "lib/rbcodec/codecs/libwavpack/pack.c", 532 + "lib/rbcodec/codecs/libwavpack/words.c", 533 + "lib/rbcodec/codecs/libwavpack/wputils.c", 534 + }, 535 + .link_libraries = &[_]*std.Build.Step.Compile{ 536 + libcodec, 537 + libfixedpoint, 538 + }, 539 + }); 540 + 541 + build_codec(b, .{ 542 + .name = "alac", 543 + .target = target, 544 + .optimize = optimize, 545 + .sources = &[_][]const u8{ 546 + "lib/rbcodec/codecs/alac.c", 547 + "lib/rbcodec/codecs/libalac/alac.c", 548 + }, 549 + .link_libraries = &[_]*std.Build.Step.Compile{ 550 + libcodec, 551 + libfixedpoint, 552 + }, 553 + }); 554 + 555 + build_codec(b, .{ 556 + .name = "m4a", 557 + .target = target, 558 + .optimize = optimize, 559 + .sources = &[_][]const u8{ 560 + "lib/rbcodec/codecs/libm4a/m4a.c", 561 + "lib/rbcodec/codecs/libm4a/demux.c", 562 + }, 563 + .link_libraries = &[_]*std.Build.Step.Compile{ 564 + libcodec, 565 + libfixedpoint, 566 + }, 567 + }); 568 + 569 + build_codec(b, .{ 570 + .name = "cook", 571 + .target = target, 572 + .optimize = optimize, 573 + .sources = &[_][]const u8{ 574 + "lib/rbcodec/codecs/cook.c", 575 + "lib/rbcodec/codecs/libcook/cook.c", 576 + }, 577 + .link_libraries = &[_]*std.Build.Step.Compile{ 578 + libcodec, 579 + libfixedpoint, 580 + librm, 581 + }, 582 + }); 583 + 584 + const libfaad = b.addStaticLibrary(.{ 585 + .name = "faad", 586 + .target = target, 587 + .optimize = optimize, 588 + }); 589 + 590 + b.installArtifact(libfaad); 591 + 592 + libfaad.addCSourceFiles(.{ 593 + .files = &[_][]const u8{ 594 + "lib/rbcodec/codecs/raac.c", 595 + "lib/rbcodec/codecs/libfaad/bits.c", 596 + "lib/rbcodec/codecs/libfaad/common.c", 597 + "lib/rbcodec/codecs/libfaad/decoder.c", 598 + "lib/rbcodec/codecs/libfaad/drc.c", 599 + "lib/rbcodec/codecs/libfaad/error.c", 600 + "lib/rbcodec/codecs/libfaad/filtbank.c", 601 + "lib/rbcodec/codecs/libfaad/huffman.c", 602 + "lib/rbcodec/codecs/libfaad/is.c", 603 + "lib/rbcodec/codecs/libfaad/mp4.c", 604 + "lib/rbcodec/codecs/libfaad/ms.c", 605 + "lib/rbcodec/codecs/libfaad/pns.c", 606 + "lib/rbcodec/codecs/libfaad/ps_dec.c", 607 + "lib/rbcodec/codecs/libfaad/ps_syntax.c", 608 + "lib/rbcodec/codecs/libfaad/pulse.c", 609 + "lib/rbcodec/codecs/libfaad/sbr_dct.c", 610 + "lib/rbcodec/codecs/libfaad/sbr_dec.c", 611 + "lib/rbcodec/codecs/libfaad/sbr_e_nf.c", 612 + "lib/rbcodec/codecs/libfaad/sbr_fbt.c", 613 + "lib/rbcodec/codecs/libfaad/sbr_hfadj.c", 614 + "lib/rbcodec/codecs/libfaad/sbr_hfgen.c", 615 + "lib/rbcodec/codecs/libfaad/sbr_huff.c", 616 + "lib/rbcodec/codecs/libfaad/sbr_qmf.c", 617 + "lib/rbcodec/codecs/libfaad/sbr_syntax.c", 618 + "lib/rbcodec/codecs/libfaad/sbr_tf_grid.c", 619 + "lib/rbcodec/codecs/libfaad/specrec.c", 620 + "lib/rbcodec/codecs/libfaad/syntax.c", 621 + "lib/rbcodec/codecs/libfaad/tns.c", 622 + }, 623 + .flags = &[_][]const u8{ 624 + "-W", 625 + "-Wall", 626 + "-Wextra", 627 + "-Os", 628 + "-Wstrict-prototypes", 629 + "-pipe", 630 + "-std=gnu11", 631 + "-Wno-gnu", 632 + "-fPIC", 633 + "-fvisibility=hidden", 634 + "-Wno-pointer-to-int-cast", 635 + "-fno-delete-null-pointer-checks", 636 + "-fno-strict-overflow", 637 + "-fno-builtin", 638 + "-g", 639 + "-Wno-unused-result", 640 + "-Wno-pointer-sign", 641 + "-Wno-override-init", 642 + "-Wno-shift-negative-value", 643 + "-Wno-unused-const-variable", 644 + "-Wno-unused-variable", 645 + "-Wno-unused-but-set-variable", 646 + "-O2", 647 + "-Wno-tautological-compare", 648 + "-Wno-expansion-to-defined", 649 + "-I./lib/rbcodec/codecs/libfaad", 650 + }, 651 + }); 652 + 653 + libfaad.defineCMacro("CODEC", null); 654 + defineCMacros(libfaad); 655 + addIncludePaths(libfaad); 656 + 657 + build_codec(b, .{ 658 + .name = "faad", 659 + .target = target, 660 + .optimize = optimize, 661 + .sources = &[_][]const u8{ 662 + "lib/rbcodec/codecs/raac.c", 663 + "lib/rbcodec/codecs/libfaad/bits.c", 664 + "lib/rbcodec/codecs/libfaad/common.c", 665 + "lib/rbcodec/codecs/libfaad/decoder.c", 666 + "lib/rbcodec/codecs/libfaad/drc.c", 667 + "lib/rbcodec/codecs/libfaad/error.c", 668 + "lib/rbcodec/codecs/libfaad/filtbank.c", 669 + "lib/rbcodec/codecs/libfaad/huffman.c", 670 + "lib/rbcodec/codecs/libfaad/is.c", 671 + "lib/rbcodec/codecs/libfaad/mp4.c", 672 + "lib/rbcodec/codecs/libfaad/ms.c", 673 + "lib/rbcodec/codecs/libfaad/pns.c", 674 + "lib/rbcodec/codecs/libfaad/ps_dec.c", 675 + "lib/rbcodec/codecs/libfaad/ps_syntax.c", 676 + "lib/rbcodec/codecs/libfaad/pulse.c", 677 + "lib/rbcodec/codecs/libfaad/sbr_dct.c", 678 + "lib/rbcodec/codecs/libfaad/sbr_dec.c", 679 + "lib/rbcodec/codecs/libfaad/sbr_e_nf.c", 680 + "lib/rbcodec/codecs/libfaad/sbr_fbt.c", 681 + "lib/rbcodec/codecs/libfaad/sbr_hfadj.c", 682 + "lib/rbcodec/codecs/libfaad/sbr_hfgen.c", 683 + "lib/rbcodec/codecs/libfaad/sbr_huff.c", 684 + "lib/rbcodec/codecs/libfaad/sbr_qmf.c", 685 + "lib/rbcodec/codecs/libfaad/sbr_syntax.c", 686 + "lib/rbcodec/codecs/libfaad/sbr_tf_grid.c", 687 + "lib/rbcodec/codecs/libfaad/specrec.c", 688 + "lib/rbcodec/codecs/libfaad/syntax.c", 689 + "lib/rbcodec/codecs/libfaad/tns.c", 690 + }, 691 + .link_libraries = &[_]*std.Build.Step.Compile{ 692 + libcodec, 693 + libfixedpoint, 694 + librm, 695 + }, 696 + .cflags = &[_][]const u8{ 697 + "-W", 698 + "-Wall", 699 + "-Wextra", 700 + "-Os", 701 + "-Wstrict-prototypes", 702 + "-pipe", 703 + "-std=gnu11", 704 + "-Wno-gnu", 705 + "-fPIC", 706 + "-fvisibility=hidden", 707 + "-Wno-pointer-to-int-cast", 708 + "-fno-delete-null-pointer-checks", 709 + "-fno-strict-overflow", 710 + "-fno-builtin", 711 + "-g", 712 + "-Wno-unused-result", 713 + "-Wno-pointer-sign", 714 + "-Wno-override-init", 715 + "-Wno-shift-negative-value", 716 + "-Wno-unused-const-variable", 717 + "-Wno-unused-variable", 718 + "-Wno-unused-but-set-variable", 719 + "-O2", 720 + "-Wno-tautological-compare", 721 + "-Wno-expansion-to-defined", 722 + "-I./lib/rbcodec/codecs/libfaad", 723 + }, 724 + }); 725 + 726 + build_codec(b, .{ 727 + .name = "raac", 728 + .target = target, 729 + .optimize = optimize, 730 + .sources = &[_][]const u8{ 731 + "lib/rbcodec/codecs/raac.c", 732 + }, 733 + .link_libraries = &[_]*std.Build.Step.Compile{ 734 + libcodec, 735 + libfixedpoint, 736 + libfaad, 737 + librm, 738 + }, 739 + .cflags = &[_][]const u8{ 740 + "-W", 741 + "-Wall", 742 + "-Wextra", 743 + "-Os", 744 + "-Wstrict-prototypes", 745 + "-pipe", 746 + "-std=gnu11", 747 + "-Wno-gnu", 748 + "-fPIC", 749 + "-fvisibility=hidden", 750 + "-Wno-pointer-to-int-cast", 751 + "-fno-delete-null-pointer-checks", 752 + "-fno-strict-overflow", 753 + "-fno-builtin", 754 + "-g", 755 + "-Wno-unused-result", 756 + "-Wno-pointer-sign", 757 + "-Wno-override-init", 758 + "-Wno-shift-negative-value", 759 + "-Wno-unused-const-variable", 760 + "-Wno-unused-variable", 761 + "-Wno-unused-but-set-variable", 762 + "-O2", 763 + "-Wno-tautological-compare", 764 + "-Wno-expansion-to-defined", 765 + "-I./lib/rbcodec/codecs/libfaad", 766 + }, 767 + }); 768 + 769 + build_codec(b, .{ 770 + .name = "a52_rm", 771 + .target = target, 772 + .optimize = optimize, 773 + .sources = &[_][]const u8{ 774 + "lib/rbcodec/codecs/a52_rm.c", 775 + }, 776 + .link_libraries = &[_]*std.Build.Step.Compile{ 777 + libcodec, 778 + libfixedpoint, 779 + librm, 780 + }, 781 + }); 782 + 783 + build_codec(b, .{ 784 + .name = "atrac3_rm", 785 + .target = target, 786 + .optimize = optimize, 787 + .sources = &[_][]const u8{ 788 + "lib/rbcodec/codecs/atrac3_rm.c", 789 + "lib/rbcodec/codecs/libatrac/atrac3.c", 790 + }, 791 + .link_libraries = &[_]*std.Build.Step.Compile{ 792 + libcodec, 793 + libfixedpoint, 794 + librm, 795 + }, 796 + }); 797 + 798 + build_codec(b, .{ 799 + .name = "atrac3_oma", 800 + .target = target, 801 + .optimize = optimize, 802 + .sources = &[_][]const u8{ 803 + "lib/rbcodec/codecs/atrac3_oma.c", 804 + }, 805 + .link_libraries = &[_]*std.Build.Step.Compile{ 806 + libcodec, 807 + libfixedpoint, 808 + }, 809 + }); 810 + 811 + build_codec(b, .{ 812 + .name = "mpc", 813 + .target = target, 814 + .optimize = optimize, 815 + .sources = &[_][]const u8{ 816 + "lib/rbcodec/codecs/mpc.c", 817 + "lib/rbcodec/codecs/libmusepack/crc32.c", 818 + "lib/rbcodec/codecs/libmusepack/huffman.c", 819 + "lib/rbcodec/codecs/libmusepack/mpc_bits_reader.c", 820 + "lib/rbcodec/codecs/libmusepack/mpc_decoder.c", 821 + "lib/rbcodec/codecs/libmusepack/mpc_demux.c", 822 + "lib/rbcodec/codecs/libmusepack/requant.c", 823 + "lib/rbcodec/codecs/libmusepack/streaminfo.c", 824 + "lib/rbcodec/codecs/libmusepack/synth_filter.c", 825 + }, 826 + .link_libraries = &[_]*std.Build.Step.Compile{ 827 + libcodec, 828 + libfixedpoint, 829 + }, 830 + }); 831 + 832 + build_codec(b, .{ 833 + .name = "wma", 834 + .target = target, 835 + .optimize = optimize, 836 + .sources = &[_][]const u8{ 837 + "lib/rbcodec/codecs/wma.c", 838 + "lib/rbcodec/codecs/libwma/wmadeci.c", 839 + "lib/rbcodec/codecs/libwma/wmafixed.c", 840 + }, 841 + .link_libraries = &[_]*std.Build.Step.Compile{ 842 + libcodec, 843 + libfixedpoint, 844 + }, 845 + }); 846 + 847 + const libdemac = b.addStaticLibrary(.{ 848 + .name = "demac", 849 + .target = target, 850 + .optimize = optimize, 851 + }); 852 + 853 + b.installArtifact(libdemac); 854 + 855 + libdemac.addCSourceFiles(.{ .files = &[_][]const u8{ 856 + "lib/rbcodec/codecs/ape.c", 857 + "lib/rbcodec/codecs/demac/libdemac/predictor.c", 858 + "lib/rbcodec/codecs/demac/libdemac/entropy.c", 859 + "lib/rbcodec/codecs/demac/libdemac/decoder.c", 860 + "lib/rbcodec/codecs/demac/libdemac/parser.c", 861 + "lib/rbcodec/codecs/demac/libdemac/filter_1280_15.c", 862 + "lib/rbcodec/codecs/demac/libdemac/filter_16_11.c", 863 + "lib/rbcodec/codecs/demac/libdemac/filter_256_13.c", 864 + "lib/rbcodec/codecs/demac/libdemac/filter_32_10.c", 865 + "lib/rbcodec/codecs/demac/libdemac/filter_64_11.c", 866 + }, .flags = &cflags }); 867 + 868 + libdemac.defineCMacro("CODEC", null); 869 + defineCMacros(libdemac); 870 + addIncludePaths(libdemac); 871 + 872 + build_codec(b, .{ 873 + .name = "ape", 874 + .target = target, 875 + .optimize = optimize, 876 + .sources = &[_][]const u8{ 877 + "lib/rbcodec/codecs/ape.c", 878 + }, 879 + .link_libraries = &[_]*std.Build.Step.Compile{ 880 + libcodec, 881 + libfixedpoint, 882 + }, 883 + }); 884 + 885 + build_codec(b, .{ 886 + .name = "asap", 887 + .target = target, 888 + .optimize = optimize, 889 + .sources = &[_][]const u8{ 890 + "lib/rbcodec/codecs/asap.c", 891 + "lib/rbcodec/codecs/libasap/acpu.c", 892 + "lib/rbcodec/codecs/libasap/asap.c", 893 + "lib/rbcodec/codecs/libasap/apokeysnd.c", 894 + }, 895 + .link_libraries = &[_]*std.Build.Step.Compile{ 896 + libcodec, 897 + libfixedpoint, 898 + }, 899 + }); 900 + 901 + build_codec(b, .{ 902 + .name = "aac", 903 + .target = target, 904 + .optimize = optimize, 905 + .sources = &[_][]const u8{ 906 + "lib/rbcodec/codecs/aac.c", 907 + }, 908 + .link_libraries = &[_]*std.Build.Step.Compile{ 909 + libcodec, 910 + libfixedpoint, 911 + }, 912 + }); 913 + 914 + build_codec(b, .{ 915 + .name = "spc", 916 + .target = target, 917 + .optimize = optimize, 918 + .sources = &[_][]const u8{ 919 + "lib/rbcodec/codecs/spc.c", 920 + "lib/rbcodec/codecs/libspc/spc_cpu.c", 921 + "lib/rbcodec/codecs/libspc/spc_dsp.c", 922 + "lib/rbcodec/codecs/libspc/spc_emu.c", 923 + "lib/rbcodec/codecs/libspc/spc_profiler.c", 924 + }, 925 + .link_libraries = &[_]*std.Build.Step.Compile{ 926 + libcodec, 927 + libfixedpoint, 928 + }, 929 + }); 930 + 931 + build_codec(b, .{ 932 + .name = "mod", 933 + .target = target, 934 + .optimize = optimize, 935 + .sources = &[_][]const u8{ 936 + "lib/rbcodec/codecs/mod.c", 937 + }, 938 + .link_libraries = &[_]*std.Build.Step.Compile{ 939 + libcodec, 940 + libfixedpoint, 941 + }, 942 + }); 943 + 944 + build_codec(b, .{ 945 + .name = "shorten", 946 + .target = target, 947 + .optimize = optimize, 948 + .sources = &[_][]const u8{ 949 + "lib/rbcodec/codecs/shorten.c", 950 + }, 951 + .link_libraries = &[_]*std.Build.Step.Compile{ 952 + libcodec, 953 + libfixedpoint, 954 + libffmpegFLAC, 955 + }, 956 + }); 957 + 958 + build_codec(b, .{ 959 + .name = "aiff", 960 + .target = target, 961 + .optimize = optimize, 962 + .sources = &[_][]const u8{ 963 + "lib/rbcodec/codecs/aiff.c", 964 + }, 965 + .link_libraries = &[_]*std.Build.Step.Compile{ 966 + libcodec, 967 + libfixedpoint, 968 + libpcm, 969 + }, 970 + }); 971 + 972 + build_codec(b, .{ 973 + .name = "speex", 974 + .target = target, 975 + .optimize = optimize, 976 + .sources = &libspeex_sources, 977 + .link_libraries = &[_]*std.Build.Step.Compile{ 978 + libcodec, 979 + libfixedpoint, 980 + }, 981 + .macros = &[_][]const u8{ 982 + "CODEC", 983 + "HAVE_CONFIG_H", 984 + "SPEEX_DISABLE_ENCODER", 985 + }, 986 + .cflags = &[_][]const u8{ 987 + "-W", 988 + "-Wall", 989 + "-Wextra", 990 + "-Os", 991 + "-Wstrict-prototypes", 992 + "-pipe", 993 + "-std=gnu11", 994 + "-Wno-gnu", 995 + "-fPIC", 996 + "-fvisibility=hidden", 997 + "-Wno-pointer-to-int-cast", 998 + "-fno-delete-null-pointer-checks", 999 + "-fno-strict-overflow", 1000 + "-fno-builtin", 1001 + "-g", 1002 + "-Wno-unused-result", 1003 + "-Wno-pointer-sign", 1004 + "-Wno-override-init", 1005 + "-Wno-shift-negative-value", 1006 + "-Wno-unused-const-variable", 1007 + "-Wno-unused-variable", 1008 + "-Wno-unused-but-set-variable", 1009 + "-O2", 1010 + "-Wno-tautological-compare", 1011 + "-Wno-expansion-to-defined", 1012 + "-I./lib/rbcodec/codecs/libspeex", 1013 + }, 1014 + }); 1015 + 1016 + build_codec(b, .{ 1017 + .name = "adx", 1018 + .target = target, 1019 + .optimize = optimize, 1020 + .sources = &[_][]const u8{ 1021 + "lib/rbcodec/codecs/adx.c", 1022 + }, 1023 + .link_libraries = &[_]*std.Build.Step.Compile{ 1024 + libcodec, 1025 + libfixedpoint, 1026 + }, 1027 + }); 1028 + 1029 + build_codec(b, .{ 1030 + .name = "smaf", 1031 + .target = target, 1032 + .optimize = optimize, 1033 + .sources = &[_][]const u8{ 1034 + "lib/rbcodec/codecs/smaf.c", 1035 + }, 1036 + .link_libraries = &[_]*std.Build.Step.Compile{ 1037 + libcodec, 1038 + libfixedpoint, 1039 + libpcm, 1040 + }, 1041 + }); 1042 + 1043 + build_codec(b, .{ 1044 + .name = "au", 1045 + .target = target, 1046 + .optimize = optimize, 1047 + .sources = &[_][]const u8{ 1048 + "lib/rbcodec/codecs/au.c", 1049 + }, 1050 + .link_libraries = &[_]*std.Build.Step.Compile{ 1051 + libcodec, 1052 + libfixedpoint, 1053 + libpcm, 1054 + }, 1055 + }); 1056 + 1057 + build_codec(b, .{ 1058 + .name = "vox", 1059 + .target = target, 1060 + .optimize = optimize, 1061 + .sources = &[_][]const u8{ 1062 + "lib/rbcodec/codecs/vox.c", 1063 + }, 1064 + .link_libraries = &[_]*std.Build.Step.Compile{ 1065 + libcodec, 1066 + libfixedpoint, 1067 + libpcm, 1068 + }, 1069 + }); 1070 + 1071 + build_codec(b, .{ 1072 + .name = "wav64", 1073 + .target = target, 1074 + .optimize = optimize, 1075 + .sources = &[_][]const u8{ 1076 + "lib/rbcodec/codecs/wav64.c", 1077 + }, 1078 + .link_libraries = &[_]*std.Build.Step.Compile{ 1079 + libcodec, 1080 + libfixedpoint, 1081 + libpcm, 1082 + }, 1083 + }); 1084 + 1085 + build_codec(b, .{ 1086 + .name = "tta", 1087 + .target = target, 1088 + .optimize = optimize, 1089 + .sources = &[_][]const u8{ 1090 + "lib/rbcodec/codecs/tta.c", 1091 + "lib/rbcodec/codecs/libtta/ttadec.c", 1092 + }, 1093 + .link_libraries = &[_]*std.Build.Step.Compile{ 1094 + libcodec, 1095 + libfixedpoint, 1096 + }, 1097 + }); 1098 + 1099 + build_codec(b, .{ 1100 + .name = "wmapro", 1101 + .target = target, 1102 + .optimize = optimize, 1103 + .sources = &[_][]const u8{ 1104 + "lib/rbcodec/codecs/wmapro.c", 1105 + "lib/rbcodec/codecs/libwmapro/wmaprodec.c", 1106 + "lib/rbcodec/codecs/libwmapro/wma.c", 1107 + "lib/rbcodec/codecs/libwmapro/mdct_tables.c", 1108 + }, 1109 + .link_libraries = &[_]*std.Build.Step.Compile{ 1110 + libcodec, 1111 + libfixedpoint, 1112 + }, 1113 + }); 1114 + 1115 + build_codec(b, .{ 1116 + .name = "ay", 1117 + .target = target, 1118 + .optimize = optimize, 1119 + .sources = &[_][]const u8{ 1120 + "lib/rbcodec/codecs/ay.c", 1121 + "lib/rbcodec/codecs/libgme/ay_apu.c", 1122 + "lib/rbcodec/codecs/libgme/ay_cpu.c", 1123 + "lib/rbcodec/codecs/libgme/ay_emu.c", 1124 + "lib/rbcodec/codecs/libgme/blip_buffer.c", 1125 + "lib/rbcodec/codecs/libgme/multi_buffer.c", 1126 + "lib/rbcodec/codecs/libgme/track_filter.c", 1127 + "lib/rbcodec/codecs/libgme/z80_cpu.c", 1128 + }, 1129 + .link_libraries = &[_]*std.Build.Step.Compile{ 1130 + libcodec, 1131 + libfixedpoint, 1132 + }, 1133 + }); 1134 + 1135 + build_codec(b, .{ 1136 + .name = "vtx", 1137 + .target = target, 1138 + .optimize = optimize, 1139 + .sources = &[_][]const u8{ 1140 + "lib/rbcodec/codecs/vtx.c", 1141 + "lib/rbcodec/codecs/libayumi/ayumi_render.c", 1142 + "lib/rbcodec/codecs/libayumi/ayumi.c", 1143 + "lib/rbcodec/codecs/libayumi/lzh.c", 1144 + }, 1145 + .link_libraries = &[_]*std.Build.Step.Compile{ 1146 + libcodec, 1147 + libfixedpoint, 1148 + }, 1149 + }); 1150 + 1151 + build_codec(b, .{ 1152 + .name = "gbs", 1153 + .target = target, 1154 + .optimize = optimize, 1155 + .sources = &[_][]const u8{ 1156 + "lib/rbcodec/codecs/gbs.c", 1157 + "lib/rbcodec/codecs/libgme/gb_apu.c", 1158 + "lib/rbcodec/codecs/libgme/gb_cpu.c", 1159 + "lib/rbcodec/codecs/libgme/gbs_cpu.c", 1160 + "lib/rbcodec/codecs/libgme/gb_oscs.c", 1161 + "lib/rbcodec/codecs/libgme/gbs_emu.c", 1162 + "lib/rbcodec/codecs/libgme/rom_data.c", 1163 + }, 1164 + .link_libraries = &[_]*std.Build.Step.Compile{ 1165 + libcodec, 1166 + libfixedpoint, 1167 + }, 1168 + }); 1169 + 1170 + build_codec(b, .{ 1171 + .name = "hes", 1172 + .target = target, 1173 + .optimize = optimize, 1174 + .sources = &[_][]const u8{ 1175 + "lib/rbcodec/codecs/hes.c", 1176 + "lib/rbcodec/codecs/libgme/hes_apu.c", 1177 + "lib/rbcodec/codecs/libgme/hes_apu_adpcm.c", 1178 + "lib/rbcodec/codecs/libgme/hes_cpu.c", 1179 + "lib/rbcodec/codecs/libgme/hes_emu.c", 1180 + }, 1181 + .link_libraries = &[_]*std.Build.Step.Compile{ 1182 + libcodec, 1183 + libfixedpoint, 1184 + }, 1185 + }); 1186 + 1187 + const libemu2413 = b.addStaticLibrary(.{ 1188 + .name = "emu2413", 1189 + .target = target, 1190 + .optimize = optimize, 1191 + }); 1192 + 1193 + b.installArtifact(libemu2413); 1194 + 1195 + libemu2413.addCSourceFiles(.{ 1196 + .files = &[_][]const u8{ 1197 + "lib/rbcodec/codecs/libgme/sms_apu.c", 1198 + "lib/rbcodec/codecs/libgme/sms_fm_apu.c", 1199 + "lib/rbcodec/codecs/libgme/emu2413.c", 1200 + "lib/rbcodec/codecs/libgme/ym2413_emu.c", 1201 + }, 1202 + .flags = &cflags, 1203 + }); 1204 + 1205 + libemu2413.defineCMacro("CODEC", null); 1206 + defineCMacros(libemu2413); 1207 + addIncludePaths(libemu2413); 1208 + 1209 + build_codec(b, .{ 1210 + .name = "nsf", 1211 + .target = target, 1212 + .optimize = optimize, 1213 + .sources = &[_][]const u8{ 1214 + "lib/rbcodec/codecs/nsf.c", 1215 + "lib/rbcodec/codecs/libgme/nes_apu.c", 1216 + "lib/rbcodec/codecs/libgme/nes_cpu.c", 1217 + "lib/rbcodec/codecs/libgme/nes_fds_apu.c", 1218 + "lib/rbcodec/codecs/libgme/nes_fme7_apu.c", 1219 + "lib/rbcodec/codecs/libgme/nes_namco_apu.c", 1220 + "lib/rbcodec/codecs/libgme/nes_oscs.c", 1221 + "lib/rbcodec/codecs/libgme/nes_vrc6_apu.c", 1222 + "lib/rbcodec/codecs/libgme/nes_vrc7_apu.c", 1223 + "lib/rbcodec/codecs/libgme/nsf_cpu.c", 1224 + "lib/rbcodec/codecs/libgme/nsf_emu.c", 1225 + "lib/rbcodec/codecs/libgme/nsfe_info.c", 1226 + "lib/rbcodec/codecs/libgme/sms_apu.c", 1227 + "lib/rbcodec/codecs/libgme/sms_fm_apu.c", 1228 + "lib/rbcodec/codecs/libgme/emu2413.c", 1229 + "lib/rbcodec/codecs/libgme/ym2413_emu.c", 1230 + }, 1231 + .link_libraries = &[_]*std.Build.Step.Compile{ 1232 + libcodec, 1233 + libfixedpoint, 1234 + libemu2413, 1235 + }, 1236 + }); 1237 + 1238 + build_codec(b, .{ 1239 + .name = "sgc", 1240 + .target = target, 1241 + .optimize = optimize, 1242 + .sources = &[_][]const u8{ 1243 + "lib/rbcodec/codecs/sgc.c", 1244 + "lib/rbcodec/codecs/libgme/sgc_cpu.c", 1245 + "lib/rbcodec/codecs/libgme/sgc_emu.c", 1246 + }, 1247 + .link_libraries = &[_]*std.Build.Step.Compile{ 1248 + libcodec, 1249 + libfixedpoint, 1250 + }, 1251 + }); 1252 + 1253 + build_codec(b, .{ 1254 + .name = "vgm", 1255 + .target = target, 1256 + .optimize = optimize, 1257 + .sources = &[_][]const u8{ 1258 + "lib/rbcodec/codecs/vgm.c", 1259 + "lib/rbcodec/codecs/libgme/resampler.c", 1260 + "lib/rbcodec/codecs/libgme/vgm_emu.c", 1261 + "lib/rbcodec/codecs/libgme/ym2612_emu.c", 1262 + "lib/rbcodec/codecs/libgme/inflate/bbfuncs.c", 1263 + "lib/rbcodec/codecs/libgme/inflate/inflate.c", 1264 + "lib/rbcodec/codecs/libgme/inflate/mallocer.c", 1265 + "lib/rbcodec/codecs/libgme/inflate/mbreader.c", 1266 + }, 1267 + .link_libraries = &[_]*std.Build.Step.Compile{ 1268 + libcodec, 1269 + libfixedpoint, 1270 + }, 1271 + }); 1272 + 1273 + //const sid = b.addStaticLibrary(.{ 1274 + // .name = "cRSID", 1275 + // .target = target, 1276 + // .optimize = optimize, 1277 + // }); 1278 + 1279 + // b.installArtifact(sid); 1280 + 1281 + // sid.addCSourceFiles(.{ 1282 + // .files = &[_][]const u8{ 1283 + // "lib/rbcodec/codecs/sid.c", 1284 + // "lib/rbcodec/codecs/cRSID/libcRSID.c", 1285 + // }, 1286 + // .flags = &cflags, 1287 + //}); 1288 + 1289 + // sid.defineCMacro("CODEC", null); 1290 + // defineCMacros(sid); 1291 + // addIncludePaths(sid); 1292 + 1293 + build_codec(b, .{ 1294 + .name = "kss", 1295 + .target = target, 1296 + .optimize = optimize, 1297 + .sources = &[_][]const u8{ 1298 + "lib/rbcodec/codecs/kss.c", 1299 + "lib/rbcodec/codecs/libgme/kss_cpu.c", 1300 + "lib/rbcodec/codecs/libgme/kss_emu.c", 1301 + "lib/rbcodec/codecs/libgme/kss_scc_apu.c", 1302 + "lib/rbcodec/codecs/libgme/opl_apu.c", 1303 + "lib/rbcodec/codecs/libgme/emu8950.c", 1304 + "lib/rbcodec/codecs/libgme/emuadpcm.c", 1305 + }, 1306 + .link_libraries = &[_]*std.Build.Step.Compile{ 1307 + libcodec, 1308 + libfixedpoint, 1309 + }, 1310 + }); 1311 + 1312 + build_codec(b, .{ 1313 + .name = "aac_bsf", 1314 + .target = target, 1315 + .optimize = optimize, 1316 + .sources = &[_][]const u8{ 1317 + "lib/rbcodec/codecs/aac_bsf.c", 1318 + }, 1319 + .link_libraries = &[_]*std.Build.Step.Compile{ 1320 + libcodec, 1321 + libfixedpoint, 1322 + }, 1323 + }); 1324 + 1325 + const libplugin = b.addStaticLibrary(.{ 1326 + .name = "plugin", 1327 + .target = target, 1328 + .optimize = optimize, 1329 + }); 1330 + 1331 + b.installArtifact(libplugin); 1332 + 1333 + libplugin.addCSourceFiles(.{ 1334 + .files = &[_][]const u8{ 1335 + "apps/plugins/lib/sha1.c", 1336 + "apps/plugins/lib/gcc-support.c", 1337 + "apps/plugins/lib/pluginlib_actions.c", 1338 + "apps/plugins/lib/helper.c", 1339 + "apps/plugins/lib/icon_helper.c", 1340 + "apps/plugins/lib/arg_helper.c", 1341 + "apps/plugins/lib/md5.c", 1342 + "apps/plugins/lib/jhash.c", 1343 + "apps/plugins/lib/configfile.c", 1344 + "apps/plugins/lib/playback_control.c", 1345 + "apps/plugins/lib/rgb_hsv.c", 1346 + "apps/plugins/lib/highscore.c", 1347 + "apps/plugins/lib/simple_viewer.c", 1348 + "apps/plugins/lib/display_text.c", 1349 + "apps/plugins/lib/printcell_helper.c", 1350 + "apps/plugins/lib/strncpy.c", 1351 + "apps/plugins/lib/stdio_compat.c", 1352 + "apps/plugins/lib/overlay.c", 1353 + "apps/plugins/lib/pluginlib_jpeg_mem.c", 1354 + "apps/plugins/lib/pluginlib_resize.c", 1355 + "apps/plugins/lib/checkbox.c", 1356 + "apps/plugins/lib/osd.c", 1357 + "apps/plugins/lib/picture.c", 1358 + "apps/plugins/lib/xlcd_core.c", 1359 + "apps/plugins/lib/xlcd_draw.c", 1360 + "apps/plugins/lib/xlcd_scroll.c", 1361 + "apps/plugins/lib/pluginlib_bmp.c", 1362 + "apps/plugins/lib/read_image.c", 1363 + "apps/plugins/lib/bmp_smooth_scale.c", 1364 + "apps/plugins/lib/kbd_helper.c", 1365 + "apps/plugins/lib/pluginlib_touchscreen.c", 1366 + "apps/plugins/lib/id3.c", 1367 + "apps/plugins/lib/mul_id3.c", 1368 + }, 1369 + .flags = &cflags, 1370 + }); 1371 + 1372 + libplugin.defineCMacro("PLUGIN", null); 1373 + defineCMacros(libplugin); 1374 + addPluginIncludePaths(libplugin); 1375 + 1376 + const libpluginbitmaps = b.addStaticLibrary(.{ 1377 + .name = "pluginbitmaps", 1378 + .target = target, 1379 + .optimize = optimize, 1380 + }); 1381 + 1382 + b.installArtifact(libpluginbitmaps); 1383 + 1384 + libpluginbitmaps.addCSourceFiles(.{ 1385 + .files = &[_][]const u8{ 1386 + "build/apps/plugins/bitmaps/mono/invadrox_fire.8x8x1.c", 1387 + "build/apps/plugins/bitmaps/mono/mpegplayer_status_icons_8x8x1.c", 1388 + "build/apps/plugins/bitmaps/mono/mpegplayer_status_icons_12x12x1.c", 1389 + "build/apps/plugins/bitmaps/mono/mpegplayer_status_icons_16x16x1.c", 1390 + "build/apps/plugins/bitmaps/native/_2048_tiles.48x48x24.c", 1391 + "build/apps/plugins/bitmaps/native/_2048_background.224x224x24.c", 1392 + "build/apps/plugins/bitmaps/native/amaze_tiles_9.9x9x16.c", 1393 + "build/apps/plugins/bitmaps/native/amaze_tiles_7.7x7x16.c", 1394 + "build/apps/plugins/bitmaps/native/brickmania_gameover.112x54x16.c", 1395 + "build/apps/plugins/bitmaps/native/brickmania_ball.5x5x16.c", 1396 + "build/apps/plugins/bitmaps/native/brickmania_bricks.320x240x16.c", 1397 + "build/apps/plugins/bitmaps/native/brickmania_pads.320x240x16.c", 1398 + "build/apps/plugins/bitmaps/native/brickmania_short_pads.320x240x16.c", 1399 + "build/apps/plugins/bitmaps/native/brickmania_long_pads.320x240x16.c", 1400 + "build/apps/plugins/bitmaps/native/brickmania_break.320x240x16.c", 1401 + "build/apps/plugins/bitmaps/native/brickmania_powerups.320x240x16.c", 1402 + "build/apps/plugins/bitmaps/native/jackpot_slots.30x420x1.c", 1403 + "build/apps/plugins/bitmaps/native/bubbles_emblem.320x240x16.c", 1404 + "build/apps/plugins/bitmaps/native/bubbles_background.320x240x16.c", 1405 + "build/apps/plugins/bitmaps/native/chessbox_pieces.240x240x16.c", 1406 + "build/apps/plugins/bitmaps/native/clock_binary.320x240x16.c", 1407 + "build/apps/plugins/bitmaps/native/clock_digits.320x240x16.c", 1408 + "build/apps/plugins/bitmaps/native/clock_smalldigits.320x240x16.c", 1409 + "build/apps/plugins/bitmaps/native/clock_segments.320x240x16.c", 1410 + "build/apps/plugins/bitmaps/native/clock_smallsegments.320x240x16.c", 1411 + "build/apps/plugins/bitmaps/native/clock_logo.320x240x16.c", 1412 + "build/apps/plugins/bitmaps/native/clock_messages.320x240x16.c", 1413 + "build/apps/plugins/bitmaps/native/fft_colors.16.c", 1414 + "build/apps/plugins/bitmaps/native/flipit_cursor.56x56x16.c", 1415 + "build/apps/plugins/bitmaps/native/flipit_tokens.56x112x16.c", 1416 + "build/apps/plugins/bitmaps/native/invadrox_aliens.24x24x16.c", 1417 + "build/apps/plugins/bitmaps/native/invadrox_alien_explode.13x7x16.c", 1418 + "build/apps/plugins/bitmaps/native/invadrox_ships.16x24x16.c", 1419 + "build/apps/plugins/bitmaps/native/invadrox_bombs.9x42x16.c", 1420 + "build/apps/plugins/bitmaps/native/invadrox_shield.22x16x16.c", 1421 + "build/apps/plugins/bitmaps/native/invadrox_ufo.16x7x16.c", 1422 + "build/apps/plugins/bitmaps/native/invadrox_ufo_explode.21x8x16.c", 1423 + "build/apps/plugins/bitmaps/native/invadrox_numbers.50x7x16.c", 1424 + "build/apps/plugins/bitmaps/native/invadrox_background.320x240x16.c", 1425 + "build/apps/plugins/bitmaps/native/minesweeper_tiles.16x16x24.c", 1426 + "build/apps/plugins/bitmaps/native/pegbox_pieces.24x24x16.c", 1427 + "build/apps/plugins/bitmaps/native/pegbox_header.320x40x16.c", 1428 + "build/apps/plugins/bitmaps/native/puzzles_cursor.11x16x24.c", 1429 + "build/apps/plugins/bitmaps/native/rockblox_background.320x240x16.c", 1430 + "build/apps/plugins/bitmaps/native/rockpaint.8x8x24.c", 1431 + "build/apps/plugins/bitmaps/native/rockpaint_hsvrgb.8x10x24.c", 1432 + "build/apps/plugins/bitmaps/native/snake2_header1.320x240x16.c", 1433 + "build/apps/plugins/bitmaps/native/snake2_header2.320x240x16.c", 1434 + "build/apps/plugins/bitmaps/native/snake2_left.320x240x16.c", 1435 + "build/apps/plugins/bitmaps/native/snake2_right.320x240x16.c", 1436 + "build/apps/plugins/bitmaps/native/snake2_bottom.320x240x16.c", 1437 + "build/apps/plugins/bitmaps/native/sokoban_tiles.14x14x16.c", 1438 + "build/apps/plugins/bitmaps/native/card_back.37x49x16.c", 1439 + "build/apps/plugins/bitmaps/native/card_deck.481x196x16.c", 1440 + "build/apps/plugins/bitmaps/native/solitaire_suitsi.37x196x16.c", 1441 + "build/apps/plugins/bitmaps/native/star_tiles.20x20.c", 1442 + "build/apps/plugins/bitmaps/native/sudoku_start.320x240x16.c", 1443 + "build/apps/plugins/bitmaps/native/sudoku_normal.320x240x16.c", 1444 + "build/apps/plugins/bitmaps/native/sudoku_inverse.320x240x16.c", 1445 + "build/apps/plugins/bitmaps/native/matrix_bold.c", 1446 + "build/apps/plugins/bitmaps/native/matrix_normal.c", 1447 + "build/apps/plugins/bitmaps/native/sliding_puzzle.360x360x16.c", 1448 + "build/apps/plugins/bitmaps/native/rockboxlogo.220x68x16.c", 1449 + "build/apps/plugins/bitmaps/native/creditslogo.320x98x16.c", 1450 + "build/apps/plugins/bitmaps/native/resistor.320x240x16.c", 1451 + }, 1452 + .flags = &cflags, 1453 + }); 1454 + 1455 + libpluginbitmaps.defineCMacro("PLUGIN", null); 1456 + defineCMacros(libpluginbitmaps); 1457 + addPluginIncludePaths(libpluginbitmaps); 1458 + 1459 + build_plugin(b, .{ 1460 + .name = "chopper", 1461 + .target = target, 1462 + .optimize = optimize, 1463 + .sources = &[_][]const u8{ 1464 + "apps/plugins/chopper.c", 1465 + "apps/plugins/plugin_crt0.c", 1466 + }, 1467 + .link_libraries = &[_]*std.Build.Step.Compile{ 1468 + libplugin, 1469 + libpluginbitmaps, 1470 + libfixedpoint, 1471 + }, 1472 + }); 1473 + 1474 + build_plugin(b, .{ 1475 + .name = "clix", 1476 + .target = target, 1477 + .optimize = optimize, 1478 + .sources = &[_][]const u8{ 1479 + "apps/plugins/clix.c", 1480 + "apps/plugins/plugin_crt0.c", 1481 + }, 1482 + .link_libraries = &[_]*std.Build.Step.Compile{ 1483 + libplugin, 1484 + libpluginbitmaps, 1485 + libfixedpoint, 1486 + }, 1487 + }); 1488 + 1489 + build_plugin(b, .{ 1490 + .name = "credits", 1491 + .target = target, 1492 + .optimize = optimize, 1493 + .sources = &[_][]const u8{ 1494 + "apps/plugins/credits.c", 1495 + "apps/plugins/plugin_crt0.c", 1496 + }, 1497 + .link_libraries = &[_]*std.Build.Step.Compile{ 1498 + libplugin, 1499 + libpluginbitmaps, 1500 + libfixedpoint, 1501 + }, 1502 + }); 1503 + 1504 + build_plugin(b, .{ 1505 + .name = "properties", 1506 + .target = target, 1507 + .optimize = optimize, 1508 + .sources = &[_][]const u8{ 1509 + "apps/plugins/properties.c", 1510 + "apps/plugins/plugin_crt0.c", 1511 + }, 1512 + .link_libraries = &[_]*std.Build.Step.Compile{ 1513 + libplugin, 1514 + libpluginbitmaps, 1515 + libfixedpoint, 1516 + }, 1517 + }); 1518 + 1519 + build_plugin(b, .{ 1520 + .name = "random_folder_advance_config", 1521 + .target = target, 1522 + .optimize = optimize, 1523 + .sources = &[_][]const u8{ 1524 + "apps/plugins/random_folder_advance_config.c", 1525 + "apps/plugins/plugin_crt0.c", 1526 + }, 1527 + .link_libraries = &[_]*std.Build.Step.Compile{ 1528 + libplugin, 1529 + libpluginbitmaps, 1530 + libfixedpoint, 1531 + }, 1532 + }); 1533 + 1534 + build_plugin(b, .{ 1535 + .name = "search", 1536 + .target = target, 1537 + .optimize = optimize, 1538 + .sources = &[_][]const u8{ 1539 + "apps/plugins/search.c", 1540 + "apps/plugins/plugin_crt0.c", 1541 + }, 1542 + .link_libraries = &[_]*std.Build.Step.Compile{ 1543 + libplugin, 1544 + libpluginbitmaps, 1545 + libfixedpoint, 1546 + }, 1547 + }); 1548 + 1549 + build_plugin(b, .{ 1550 + .name = "sort", 1551 + .target = target, 1552 + .optimize = optimize, 1553 + .sources = &[_][]const u8{ 1554 + "apps/plugins/sort.c", 1555 + "apps/plugins/plugin_crt0.c", 1556 + }, 1557 + .link_libraries = &[_]*std.Build.Step.Compile{ 1558 + libplugin, 1559 + libpluginbitmaps, 1560 + libfixedpoint, 1561 + }, 1562 + }); 1563 + 1564 + build_plugin(b, .{ 1565 + .name = "theme_remove", 1566 + .target = target, 1567 + .optimize = optimize, 1568 + .sources = &[_][]const u8{ 1569 + "apps/plugins/theme_remove.c", 1570 + "apps/plugins/plugin_crt0.c", 1571 + }, 1572 + .link_libraries = &[_]*std.Build.Step.Compile{ 1573 + libplugin, 1574 + libpluginbitmaps, 1575 + libfixedpoint, 1576 + }, 1577 + }); 1578 + 1579 + build_plugin(b, .{ 1580 + .name = "vbrfix", 1581 + .target = target, 1582 + .optimize = optimize, 1583 + .sources = &[_][]const u8{ 1584 + "apps/plugins/vbrfix.c", 1585 + "apps/plugins/plugin_crt0.c", 1586 + }, 1587 + .link_libraries = &[_]*std.Build.Step.Compile{ 1588 + libplugin, 1589 + libpluginbitmaps, 1590 + libfixedpoint, 1591 + }, 1592 + }); 1593 + 1594 + build_plugin(b, .{ 1595 + .name = "lua", 1596 + .target = target, 1597 + .optimize = optimize, 1598 + .sources = &[_][]const u8{ 1599 + "apps/plugins/lua/lauxlib.c", 1600 + "apps/plugins/lua/lapi.c", 1601 + "apps/plugins/lua/lbaselib.c", 1602 + "apps/plugins/lua/lbitlib.c", 1603 + "apps/plugins/lua/lcode.c", 1604 + "apps/plugins/lua/ldebug.c", 1605 + "apps/plugins/lua/ldo.c", 1606 + "apps/plugins/lua/ldump.c", 1607 + "apps/plugins/lua/lfunc.c", 1608 + "apps/plugins/lua/lgc.c", 1609 + "apps/plugins/lua/liolib.c", 1610 + "apps/plugins/lua/llex.c", 1611 + "apps/plugins/lua/lmathlib.c", 1612 + "apps/plugins/lua/lmem.c", 1613 + "apps/plugins/lua/loadlib.c", 1614 + "apps/plugins/lua/lobject.c", 1615 + "apps/plugins/lua/lopcodes.c", 1616 + "apps/plugins/lua/loslib.c", 1617 + "apps/plugins/lua/lparser.c", 1618 + "apps/plugins/lua/lstate.c", 1619 + "apps/plugins/lua/lstring.c", 1620 + "apps/plugins/lua/lstrlib.c", 1621 + "apps/plugins/lua/ltable.c", 1622 + "apps/plugins/lua/ltablib.c", 1623 + "apps/plugins/lua/ltm.c", 1624 + "apps/plugins/lua/lundump.c", 1625 + "apps/plugins/lua/lua_user.c", 1626 + "apps/plugins/lua/lvm.c", 1627 + "apps/plugins/lua/lzio.c", 1628 + "apps/plugins/lua/rockaux.c", 1629 + "apps/plugins/lua/rocklib.c", 1630 + "apps/plugins/lua/rocklib_img.c", 1631 + "apps/plugins/lua/tlsf_helper.c", 1632 + "apps/plugins/lua/strftime.c", 1633 + "apps/plugins/lua/strpbrk.c", 1634 + "apps/plugins/lua/strtoul.c", 1635 + "apps/plugins/lua/strtol.c", 1636 + "apps/plugins/lua/strstr.c", 1637 + "apps/plugins/lua/rocklua.c", 1638 + "apps/plugins/lua/luadir.c", 1639 + "apps/plugins/lua/rocklib_events.c", 1640 + "build/apps/plugins/lua/rocklib_aux.c", 1641 + }, 1642 + .link_libraries = &[_]*std.Build.Step.Compile{ 1643 + libplugin, 1644 + libpluginbitmaps, 1645 + libfixedpoint, 1646 + libtlsf, 1647 + }, 1648 + }); 1649 + 1650 + build_plugin(b, .{ 1651 + .name = "fft", 1652 + .target = target, 1653 + .optimize = optimize, 1654 + .sources = &[_][]const u8{ 1655 + "apps/plugins/fft/const.c", 1656 + "apps/plugins/fft/kiss_fft.c", 1657 + "apps/plugins/fft/kiss_fftr.c", 1658 + "apps/plugins/fft/fft.c", 1659 + "apps/plugins/plugin_crt0.c", 1660 + }, 1661 + .link_libraries = &[_]*std.Build.Step.Compile{ 1662 + libplugin, 1663 + libpluginbitmaps, 1664 + libfixedpoint, 1665 + }, 1666 + .is_fft_plugin = true, 1667 + }); 1668 + 1669 + build_plugin(b, .{ 1670 + .name = "reversi", 1671 + .target = target, 1672 + .optimize = optimize, 1673 + .sources = &[_][]const u8{ 1674 + "apps/plugins/reversi/reversi-game.c", 1675 + "apps/plugins/reversi/reversi-gui.c", 1676 + "apps/plugins/reversi/reversi-strategy.c", 1677 + "apps/plugins/reversi/reversi-strategy-naive.c", 1678 + "apps/plugins/reversi/reversi-strategy-simple.c", 1679 + "apps/plugins/plugin_crt0.c", 1680 + }, 1681 + .link_libraries = &[_]*std.Build.Step.Compile{ 1682 + libplugin, 1683 + libpluginbitmaps, 1684 + libfixedpoint, 1685 + }, 1686 + }); 1687 + 1688 + build_plugin(b, .{ 1689 + .name = "pictureflow", 1690 + .target = target, 1691 + .optimize = optimize, 1692 + .sources = &[_][]const u8{ 1693 + "apps/plugins/pictureflow/pictureflow.c", 1694 + "apps/plugins/plugin_crt0.c", 1695 + }, 1696 + .link_libraries = &[_]*std.Build.Step.Compile{ 1697 + libplugin, 1698 + libpluginbitmaps, 1699 + libfixedpoint, 1700 + }, 1701 + }); 1702 + 1703 + build_plugin(b, .{ 1704 + .name = "db_commit", 1705 + .target = target, 1706 + .optimize = optimize, 1707 + .sources = &[_][]const u8{ 1708 + "apps/plugins/tagcache/tagcache.c", 1709 + "apps/plugins/plugin_crt0.c", 1710 + }, 1711 + .link_libraries = &[_]*std.Build.Step.Compile{ 1712 + libplugin, 1713 + libpluginbitmaps, 1714 + libfixedpoint, 1715 + }, 1716 + }); 1717 + 1718 + build_plugin(b, .{ 1719 + .name = "mikmod", 1720 + .target = target, 1721 + .optimize = optimize, 1722 + .sources = &[_][]const u8{ 1723 + "apps/plugins/mikmod/drv_nos.c", 1724 + "apps/plugins/mikmod/load_669.c", 1725 + "apps/plugins/mikmod/load_amf.c", 1726 + "apps/plugins/mikmod/load_asy.c", 1727 + "apps/plugins/mikmod/load_dsm.c", 1728 + "apps/plugins/mikmod/load_far.c", 1729 + "apps/plugins/mikmod/load_gdm.c", 1730 + "apps/plugins/mikmod/load_imf.c", 1731 + "apps/plugins/mikmod/load_it.c", 1732 + "apps/plugins/mikmod/load_m15.c", 1733 + "apps/plugins/mikmod/load_med.c", 1734 + "apps/plugins/mikmod/load_mod.c", 1735 + "apps/plugins/mikmod/load_mtm.c", 1736 + "apps/plugins/mikmod/load_okt.c", 1737 + "apps/plugins/mikmod/load_s3m.c", 1738 + "apps/plugins/mikmod/load_stm.c", 1739 + "apps/plugins/mikmod/load_stx.c", 1740 + "apps/plugins/mikmod/load_ult.c", 1741 + "apps/plugins/mikmod/load_umx.c", 1742 + "apps/plugins/mikmod/load_uni.c", 1743 + "apps/plugins/mikmod/load_xm.c", 1744 + "apps/plugins/mikmod/mdreg.c", 1745 + "apps/plugins/mikmod/mdriver.c", 1746 + "apps/plugins/mikmod/mloader.c", 1747 + "apps/plugins/mikmod/mlreg.c", 1748 + "apps/plugins/mikmod/mlutil.c", 1749 + "apps/plugins/mikmod/mmalloc.c", 1750 + "apps/plugins/mikmod/mmerror.c", 1751 + "apps/plugins/mikmod/mmio.c", 1752 + "apps/plugins/mikmod/mplayer.c", 1753 + "apps/plugins/mikmod/munitrk.c", 1754 + "apps/plugins/mikmod/npertab.c", 1755 + "apps/plugins/mikmod/sloader.c", 1756 + "apps/plugins/mikmod/strdup.c", 1757 + "apps/plugins/mikmod/strstr.c", 1758 + "apps/plugins/mikmod/virtch.c", 1759 + "apps/plugins/mikmod/virtch2.c", 1760 + "apps/plugins/mikmod/virtch_common.c", 1761 + "apps/plugins/mikmod/mikmod.c", 1762 + "apps/plugins/plugin_crt0.c", 1763 + }, 1764 + .link_libraries = &[_]*std.Build.Step.Compile{ 1765 + libplugin, 1766 + libpluginbitmaps, 1767 + libfixedpoint, 1768 + }, 1769 + .is_mikmod_plugin = true, 1770 + }); 1771 + 1772 + defineCMacros(exe); 1773 + addIncludePaths(exe); 1774 + 1775 + exe.linkLibrary(libfirmware); 1776 + exe.linkLibrary(libspeex_voice); 1777 + exe.linkLibrary(librbcodec); 1778 + exe.linkLibrary(libskinparser); 1779 + exe.linkLibrary(libfixedpoint); 1780 + exe.linkLibrary(libuisimulator); 1781 + exe.linkSystemLibrary("SDL"); 1782 + exe.linkLibC(); 1783 + } 1784 + 1785 + fn build_tools(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) void { 1786 + build_scramble(b, target, optimize); 1787 + build_descramble(b, target, optimize); 1788 + build_bmp2rb(b, target, optimize); 1789 + build_rdf2binary(b, target, optimize); 1790 + build_mkboot(b, target, optimize); 1791 + build_mkzenboot(b, target, optimize); 1792 + build_convbdf(b, target, optimize); 1793 + build_codepages(b, target, optimize); 1794 + build_voicefont(b, target, optimize); 1795 + build_usb_benchmark(b, target, optimize); 1796 + build_convttf(b, target, optimize); 1797 + build_mk500boot(b, target, optimize); 1798 + } 1799 + 1800 + fn build_scramble(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) void { 1801 + const flags = [_][]const u8{ 1802 + "-O", 1803 + "-g", 1804 + "-W", 1805 + "-Wall", 1806 + "-Wshadow", 1807 + "-pedantic", 1808 + "-I./tools", 1809 + "-I./build", 1810 + "-I/usr/include", 1811 + "-I/usr/include/x86_64-linux-gnu", 1812 + "-DAPPLICATION_NAME", 1813 + }; 1814 + 1815 + const scramble = b.addExecutable(.{ 1816 + .name = "scramble", 1817 + .target = target, 1818 + .optimize = optimize, 1819 + }); 1820 + 1821 + b.installArtifact(scramble); 1822 + 1823 + scramble.addCSourceFiles(.{ 1824 + .files = &[_][]const u8{ 1825 + "tools/scramble.c", 1826 + "tools/iriver.c", 1827 + "tools/mi4.c", 1828 + "tools/gigabeat.c", 1829 + "tools/gigabeats.c", 1830 + "tools/telechips.c", 1831 + "tools/iaudio_bl_flash.c", 1832 + "tools/creative.c", 1833 + "tools/hmac-sha1.c", 1834 + "tools/rkw.c", 1835 + }, 1836 + .flags = &flags, 1837 + }); 1838 + scramble.linkLibC(); 1839 + } 1840 + 1841 + fn build_descramble(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) void { 1842 + const flags = [_][]const u8{ 1843 + "-O", 1844 + "-g", 1845 + "-W", 1846 + "-Wall", 1847 + "-Wshadow", 1848 + "-pedantic", 1849 + "-I./tools", 1850 + "-I./build", 1851 + "-I/usr/include", 1852 + "-I/usr/include/x86_64-linux-gnu", 1853 + "-DAPPLICATION_NAME", 1854 + }; 1855 + 1856 + const descramble = b.addExecutable(.{ 1857 + .name = "decsramble", 1858 + .target = target, 1859 + .optimize = optimize, 1860 + }); 1861 + 1862 + b.installArtifact(descramble); 1863 + 1864 + descramble.addCSourceFiles(.{ 1865 + .files = &[_][]const u8{ 1866 + "tools/descramble.c", 1867 + "tools/iriver.c", 1868 + "tools/gigabeat.c", 1869 + }, 1870 + .flags = &flags, 1871 + }); 1872 + 1873 + descramble.linkLibC(); 1874 + } 1875 + 1876 + fn build_bmp2rb(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) void { 1877 + const flags = [_][]const u8{ 1878 + "-O", 1879 + "-g", 1880 + "-W", 1881 + "-Wall", 1882 + "-Wshadow", 1883 + "-pedantic", 1884 + "-I./tools", 1885 + "-I./build", 1886 + "-I/usr/include", 1887 + "-I/usr/include/x86_64-linux-gnu", 1888 + "-DAPPLICATION_NAME", 1889 + }; 1890 + 1891 + const bmp2rb = b.addExecutable(.{ 1892 + .name = "bmp2rb", 1893 + .target = target, 1894 + .optimize = optimize, 1895 + }); 1896 + 1897 + b.installArtifact(bmp2rb); 1898 + 1899 + bmp2rb.addCSourceFiles(.{ 1900 + .files = &[_][]const u8{ 1901 + "tools/bmp2rb.c", 1902 + }, 1903 + .flags = &flags, 1904 + }); 1905 + 1906 + bmp2rb.linkLibC(); 1907 + } 1908 + 1909 + fn build_rdf2binary(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) void { 1910 + const flags = [_][]const u8{ 1911 + "-O", 1912 + "-g", 1913 + "-W", 1914 + "-Wall", 1915 + "-Wshadow", 1916 + "-pedantic", 1917 + "-I./tools", 1918 + "-I./build", 1919 + "-I/usr/include", 1920 + "-I/usr/include/x86_64-linux-gnu", 1921 + "-DAPPLICATION_NAME", 1922 + }; 1923 + 1924 + const rdf2binary = b.addExecutable(.{ 1925 + .name = "rdf2binary", 1926 + .target = target, 1927 + .optimize = optimize, 1928 + }); 1929 + 1930 + b.installArtifact(rdf2binary); 1931 + 1932 + rdf2binary.addCSourceFiles(.{ 1933 + .files = &[_][]const u8{ 1934 + "tools/rdf2binary.c", 1935 + }, 1936 + .flags = &flags, 1937 + }); 1938 + 1939 + rdf2binary.linkLibC(); 1940 + } 1941 + 1942 + fn build_mkboot(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) void { 1943 + const flags = [_][]const u8{ 1944 + "-O", 1945 + "-g", 1946 + "-W", 1947 + "-Wall", 1948 + "-Wshadow", 1949 + "-pedantic", 1950 + "-I./tools", 1951 + "-I./build", 1952 + "-I/usr/include", 1953 + "-I/usr/include/x86_64-linux-gnu", 1954 + "-DAPPLICATION_NAME", 1955 + }; 1956 + 1957 + const mkboot = b.addExecutable(.{ 1958 + .name = "mkboot", 1959 + .target = target, 1960 + .optimize = optimize, 1961 + }); 1962 + 1963 + b.installArtifact(mkboot); 1964 + 1965 + mkboot.addCSourceFiles(.{ 1966 + .files = &[_][]const u8{ 1967 + "tools/mkboot.c", 1968 + }, 1969 + .flags = &flags, 1970 + }); 1971 + 1972 + mkboot.linkLibC(); 1973 + } 1974 + 1975 + fn build_mkzenboot(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) void { 1976 + const mkzenboot = b.addExecutable(.{ 1977 + .name = "mkzenboot", 1978 + .target = target, 1979 + .optimize = optimize, 1980 + }); 1981 + 1982 + b.installArtifact(mkzenboot); 1983 + 1984 + mkzenboot.addCSourceFiles(.{ 1985 + .files = &[_][]const u8{ 1986 + "tools/mkzenboot.c", 1987 + "tools/hmac-sha1.c", 1988 + }, 1989 + .flags = &[_][]const u8{ 1990 + "-O", 1991 + "-g", 1992 + "-W", 1993 + "-Wall", 1994 + "-Wshadow", 1995 + "-pedantic", 1996 + "-I./tools", 1997 + "-I./build", 1998 + "-I/usr/include", 1999 + "-I/usr/include/x86_64-linux-gnu", 2000 + "-DSTANDALONE", 2001 + }, 2002 + }); 2003 + 2004 + mkzenboot.linkLibC(); 2005 + mkzenboot.linkSystemLibrary("z"); 2006 + } 2007 + 2008 + fn build_convbdf(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) void { 2009 + const flags = [_][]const u8{ 2010 + "-O", 2011 + "-g", 2012 + "-W", 2013 + "-Wall", 2014 + "-Wshadow", 2015 + "-pedantic", 2016 + "-I./tools", 2017 + "-I./build", 2018 + "-I/usr/include", 2019 + "-I/usr/include/x86_64-linux-gnu", 2020 + "-DAPPLICATION_NAME", 2021 + }; 2022 + 2023 + const convbdf = b.addExecutable(.{ 2024 + .name = "convbdf", 2025 + .target = target, 2026 + .optimize = optimize, 2027 + }); 2028 + 2029 + b.installArtifact(convbdf); 2030 + 2031 + convbdf.addCSourceFiles(.{ 2032 + .files = &[_][]const u8{ 2033 + "tools/convbdf.c", 2034 + }, 2035 + .flags = &flags, 2036 + }); 2037 + 2038 + convbdf.linkLibC(); 2039 + } 2040 + 2041 + fn build_codepages(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) void { 2042 + const flags = [_][]const u8{ 2043 + "-O", 2044 + "-g", 2045 + "-W", 2046 + "-Wall", 2047 + "-Wshadow", 2048 + "-pedantic", 2049 + "-I./tools", 2050 + "-I./build", 2051 + "-I/usr/include", 2052 + "-I/usr/include/x86_64-linux-gnu", 2053 + "-DAPPLICATION_NAME", 2054 + }; 2055 + 2056 + const codepages = b.addExecutable(.{ 2057 + .name = "codepages", 2058 + .target = target, 2059 + .optimize = optimize, 2060 + }); 2061 + 2062 + b.installArtifact(codepages); 2063 + 2064 + codepages.addCSourceFiles(.{ 2065 + .files = &[_][]const u8{ 2066 + "tools/codepages.c", 2067 + "tools/codepage_tables.c", 2068 + }, 2069 + .flags = &flags, 2070 + }); 2071 + 2072 + codepages.linkLibC(); 2073 + } 2074 + 2075 + fn build_voicefont(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) void { 2076 + const flags = [_][]const u8{ 2077 + "-O", 2078 + "-g", 2079 + "-W", 2080 + "-Wall", 2081 + "-Wshadow", 2082 + "-pedantic", 2083 + "-I./tools", 2084 + "-I./build", 2085 + "-I/usr/include", 2086 + "-I/usr/include/x86_64-linux-gnu", 2087 + "-DAPPLICATION_NAME", 2088 + }; 2089 + 2090 + const voicefont = b.addExecutable(.{ 2091 + .name = "voicefont", 2092 + .target = target, 2093 + .optimize = optimize, 2094 + }); 2095 + 2096 + b.installArtifact(voicefont); 2097 + 2098 + voicefont.addCSourceFiles(.{ 2099 + .files = &[_][]const u8{ 2100 + "tools/voicefont.c", 2101 + }, 2102 + .flags = &flags, 2103 + }); 2104 + 2105 + voicefont.linkLibC(); 2106 + } 2107 + 2108 + fn build_usb_benchmark(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) void { 2109 + const flags = [_][]const u8{ 2110 + "-O", 2111 + "-g", 2112 + "-W", 2113 + "-Wall", 2114 + "-Wshadow", 2115 + "-pedantic", 2116 + "-I./tools", 2117 + "-I./build", 2118 + "-I/usr/include", 2119 + "-I/usr/include/x86_64-linux-gnu", 2120 + "-DAPPLICATION_NAME", 2121 + }; 2122 + 2123 + const usb_benchmark = b.addExecutable(.{ 2124 + .name = "usb_benchmark", 2125 + .target = target, 2126 + .optimize = optimize, 2127 + }); 2128 + 2129 + b.installArtifact(usb_benchmark); 2130 + 2131 + usb_benchmark.addCSourceFiles(.{ 2132 + .files = &[_][]const u8{ 2133 + "tools/usb_benchmark.c", 2134 + }, 2135 + .flags = &flags, 2136 + }); 2137 + 2138 + usb_benchmark.linkSystemLibrary("usb"); 2139 + usb_benchmark.linkLibC(); 2140 + } 2141 + 2142 + fn build_convttf(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) void { 2143 + const convttf = b.addExecutable(.{ 2144 + .name = "convttf", 2145 + .target = target, 2146 + .optimize = optimize, 2147 + }); 2148 + 2149 + b.installArtifact(convttf); 2150 + 2151 + convttf.addCSourceFiles(.{ .files = &[_][]const u8{ 2152 + "tools/convttf.c", 2153 + }, .flags = &[_][]const u8{ 2154 + "-O", 2155 + "-g", 2156 + "-W", 2157 + "-Wall", 2158 + "-Wshadow", 2159 + "-pedantic", 2160 + "-std=c99", 2161 + "-I./tools", 2162 + "-I./build", 2163 + "-I/usr/include", 2164 + "-I/usr/include/x86_64-linux-gnu", 2165 + "-I/usr/include/freetype2", 2166 + "-I/usr/include/libpng16", 2167 + } }); 2168 + 2169 + convttf.linkSystemLibrary("m"); 2170 + convttf.linkSystemLibrary("freetype"); 2171 + convttf.linkLibC(); 2172 + } 2173 + 2174 + fn build_mk500boot(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) void { 2175 + const flags = [_][]const u8{ 2176 + "-O", 2177 + "-g", 2178 + "-W", 2179 + "-Wall", 2180 + "-Wshadow", 2181 + "-pedantic", 2182 + "-I./tools", 2183 + "-I./build", 2184 + "-I/usr/include", 2185 + "-I/usr/include/x86_64-linux-gnu", 2186 + "-DAPPLICATION_NAME", 2187 + }; 2188 + 2189 + const mk500boot = b.addExecutable(.{ 2190 + .name = "mk500boot", 2191 + .target = target, 2192 + .optimize = optimize, 2193 + }); 2194 + 2195 + b.installArtifact(mk500boot); 2196 + 2197 + mk500boot.addCSourceFiles(.{ 2198 + .files = &[_][]const u8{ 2199 + "tools/mk500boot.c", 2200 + "tools/mr500.c", 2201 + }, 2202 + .flags = &flags, 2203 + }); 2204 + 2205 + mk500boot.linkLibC(); 2206 + } 2207 + 2208 + fn build_codec(b: *std.Build, options: BuildOptions) void { 2209 + const codec_lib = b.addStaticLibrary(.{ 2210 + .name = options.name, 2211 + .target = options.target, 2212 + .optimize = options.optimize, 2213 + }); 2214 + 2215 + b.installArtifact(codec_lib); 2216 + 2217 + codec_lib.addCSourceFiles(.{ 2218 + .files = options.sources, 2219 + .flags = options.cflags, 2220 + }); 2221 + 2222 + for (options.macros) |macro| { 2223 + codec_lib.defineCMacro(macro, null); 2224 + } 2225 + 2226 + defineCMacros(codec_lib); 2227 + addIncludePaths(codec_lib); 2228 + 2229 + const codec = b.addSharedLibrary(.{ 2230 + .name = options.name, 2231 + .target = options.target, 2232 + .optimize = options.optimize, 2233 + }); 2234 + 2235 + b.installArtifact(codec); 2236 + 2237 + codec.addCSourceFiles(.{ 2238 + .files = &[_][]const u8{ 2239 + "lib/rbcodec/codecs/codec_crt0.c", 2240 + }, 2241 + .flags = options.cflags, 2242 + }); 2243 + 2244 + for (options.macros) |macro| { 2245 + codec.defineCMacro(macro, null); 2246 + } 2247 + defineCMacros(codec); 2248 + addIncludePaths(codec); 2249 + 2250 + for (options.link_libraries) |lib| { 2251 + codec.linkLibrary(lib); 2252 + } 2253 + codec.linkLibrary(codec_lib); 2254 + } 2255 + 2256 + fn build_plugin(b: *std.Build, options: BuildOptions) void { 2257 + const plugin = b.addSharedLibrary(.{ 2258 + .name = options.name, 2259 + .target = options.target, 2260 + .optimize = options.optimize, 2261 + .strip = true, 2262 + }); 2263 + 2264 + b.installArtifact(plugin); 2265 + 2266 + plugin.addCSourceFiles(.{ 2267 + .files = options.sources, 2268 + .flags = &cflags, 2269 + }); 2270 + 2271 + plugin.defineCMacro("PLUGIN", null); 2272 + 2273 + if (options.is_fft_plugin) { 2274 + plugin.defineCMacro("FIXED_POINT", "16"); 2275 + } 2276 + 2277 + if (options.is_mikmod_plugin) { 2278 + plugin.defineCMacro("MIKMOD_STATIC", null); 2279 + } 2280 + 2281 + defineCMacros(plugin); 2282 + addPluginIncludePaths(plugin); 2283 + 2284 + for (options.link_libraries) |lib| { 2285 + plugin.linkLibrary(lib); 2286 + } 2287 + } 2288 + 2289 + fn defineCMacros(c: *std.Build.Step.Compile) void { 2290 + c.defineCMacro("_USE_MISC", null); 2291 + c.defineCMacro("ROCKBOX", null); 2292 + c.defineCMacro("MEMORYSIZE", "8"); 2293 + c.defineCMacro("SDLAPP", null); 2294 + c.defineCMacro("TARGET_ID", "73"); 2295 + c.defineCMacro("TARGET_NAME", "\"sdlapp\""); 2296 + c.defineCMacro("YEAR", "2024"); 2297 + c.defineCMacro("MONTH", "09"); 2298 + c.defineCMacro("DAY", "01"); 2299 + c.defineCMacro("OS_USE_BYTESWAP_H", null); 2300 + c.defineCMacro("APPLICATION", null); 2301 + c.defineCMacro("_GNU_SOURCE", "1"); 2302 + c.defineCMacro("_REENTRANT", null); 2303 + } 2304 + 2305 + fn addIncludePaths(c: *std.Build.Step.Compile) void { 2306 + c.addIncludePath(.{ .cwd_relative = "/usr/include" }); 2307 + c.addIncludePath(.{ .cwd_relative = "/usr/include/x86_64-linux-gnu" }); 2308 + c.addIncludePath(.{ .cwd_relative = "/usr/include/SDL" }); 2309 + c.addIncludePath(.{ .cwd_relative = "./firmware/export" }); 2310 + c.addIncludePath(.{ .cwd_relative = "./firmware/drivers" }); 2311 + c.addIncludePath(.{ .cwd_relative = "./build" }); 2312 + c.addIncludePath(.{ .cwd_relative = "./firmware/include" }); 2313 + c.addIncludePath(.{ .cwd_relative = "./firmware/target/hosted/sdl" }); 2314 + c.addIncludePath(.{ .cwd_relative = "./firmware/target/hosted" }); 2315 + c.addIncludePath(.{ .cwd_relative = "./firmware/target/hosted/sdl/app" }); 2316 + c.addIncludePath(.{ .cwd_relative = "./apps" }); 2317 + c.addIncludePath(.{ .cwd_relative = "./apps/gui" }); 2318 + c.addIncludePath(.{ .cwd_relative = "./apps/recorder" }); 2319 + c.addIncludePath(.{ .cwd_relative = "./lib/rbcodec" }); 2320 + c.addIncludePath(.{ .cwd_relative = "./lib/rbcodec/metadata" }); 2321 + c.addIncludePath(.{ .cwd_relative = "./firmware/kernel/include" }); 2322 + c.addIncludePath(.{ .cwd_relative = "./firmware" }); 2323 + c.addIncludePath(.{ .cwd_relative = "./firmware/asm" }); 2324 + c.addIncludePath(.{ .cwd_relative = "./lib/rbcodec/dsp" }); 2325 + c.addIncludePath(.{ .cwd_relative = "./lib/rbcodec/codecs" }); 2326 + c.addIncludePath(.{ .cwd_relative = "./lib/skin_parser" }); 2327 + c.addIncludePath(.{ .cwd_relative = "./build/lang" }); 2328 + c.addIncludePath(.{ .cwd_relative = "./lib/skin_parser" }); 2329 + c.addIncludePath(.{ .cwd_relative = "./apps/gui/skin_engine" }); 2330 + c.addIncludePath(.{ .cwd_relative = "./lib/fixedpoint" }); 2331 + c.addIncludePath(.{ .cwd_relative = "./lib/rbcodec/codecs/lib" }); 2332 + c.addIncludePath(.{ .cwd_relative = "./lib/tlsf/src" }); 2333 + c.addIncludePath(.{ .cwd_relative = "./apps/plugins" }); 2334 + c.addIncludePath(.{ .cwd_relative = "./uisimulator/common" }); 2335 + c.addIncludePath(.{ .cwd_relative = "./lib/rbcodec/codecs/libopus" }); 2336 + c.addIncludePath(.{ .cwd_relative = "./lib/rbcodec/codecs/libtremor" }); 2337 + c.addIncludePath(.{ .cwd_relative = "./lib/rbcodec/codecs/libm4a" }); 2338 + c.addIncludePath(.{ .cwd_relative = "./lib/rbcodec/codecs/libcook" }); 2339 + c.addIncludePath(.{ .cwd_relative = "./lib/rbcodec/codecs/libatrac" }); 2340 + c.addIncludePath(.{ .cwd_relative = "./lib/rbcodec/codecs/libmusepack" }); 2341 + c.addIncludePath(.{ .cwd_relative = "./lib/rbcodec/codecs/libtta" }); 2342 + c.addIncludePath(.{ .cwd_relative = "./lib/rbcodec/codecs/libwmapro" }); 2343 + } 2344 + 2345 + fn addPluginIncludePaths(c: *std.Build.Step.Compile) void { 2346 + c.addIncludePath(.{ .cwd_relative = "/usr/include" }); 2347 + c.addIncludePath(.{ .cwd_relative = "/usr/include/x86_64-linux-gnu" }); 2348 + c.addIncludePath(.{ .cwd_relative = "./apps/plugins/lib" }); 2349 + c.addIncludePath(.{ .cwd_relative = "./apps/plugins" }); 2350 + c.addIncludePath(.{ .cwd_relative = "./apps/plugins/lua" }); 2351 + c.addIncludePath(.{ .cwd_relative = "./build" }); 2352 + c.addIncludePath(.{ .cwd_relative = "./build/lang" }); 2353 + c.addIncludePath(.{ .cwd_relative = "./firmware/target/hosted/sdl/app" }); 2354 + c.addIncludePath(.{ .cwd_relative = "./firmware/target/hosted/sdl" }); 2355 + c.addIncludePath(.{ .cwd_relative = "./firmware/target/hosted" }); 2356 + c.addIncludePath(.{ .cwd_relative = "./firmware" }); 2357 + c.addIncludePath(.{ .cwd_relative = "./firmware/export" }); 2358 + c.addIncludePath(.{ .cwd_relative = "./firmware/drivers" }); 2359 + c.addIncludePath(.{ .cwd_relative = "./firmware/include" }); 2360 + c.addIncludePath(.{ .cwd_relative = "./firmware/kernel/include" }); 2361 + c.addIncludePath(.{ .cwd_relative = "./lib/skin_parser" }); 2362 + c.addIncludePath(.{ .cwd_relative = "./lib/tlsf/src" }); 2363 + c.addIncludePath(.{ .cwd_relative = "./lib/fixedpoint" }); 2364 + c.addIncludePath(.{ .cwd_relative = "./apps" }); 2365 + c.addIncludePath(.{ .cwd_relative = "./apps/recorder" }); 2366 + c.addIncludePath(.{ .cwd_relative = "./apps/gui" }); 2367 + c.addIncludePath(.{ .cwd_relative = "./apps/radio" }); 2368 + c.addIncludePath(.{ .cwd_relative = "./lib/rbcodec" }); 2369 + c.addIncludePath(.{ .cwd_relative = "./lib/rbcodec/codecs" }); 2370 + c.addIncludePath(.{ .cwd_relative = "./lib/rbcodec/dsp" }); 2371 + c.addIncludePath(.{ .cwd_relative = "./lib/rbcodec/metadata" }); 2372 + c.addIncludePath(.{ .cwd_relative = "./uisimulator/bitmaps" }); 2373 + c.addIncludePath(.{ .cwd_relative = "./uisimulator/common" }); 2374 + c.addIncludePath(.{ .cwd_relative = "./uisimulator/buttonmap" }); 2375 + c.addIncludePath(.{ .cwd_relative = "./firmware/include" }); 2376 + c.addIncludePath(.{ .cwd_relative = "./firmware/export" }); 2377 + c.addIncludePath(.{ .cwd_relative = "./firmware/target/hosted/sdl/app" }); 2378 + c.addIncludePath(.{ .cwd_relative = "./firmware/target/hosted/sdl" }); 2379 + c.addIncludePath(.{ .cwd_relative = "./firmware/target/hosted" }); 2380 + c.addIncludePath(.{ .cwd_relative = "./build" }); 2381 + c.addIncludePath(.{ .cwd_relative = "./apps" }); 2382 + } 2383 + 2384 + const libfirmware_sources = [_][]const u8{ 2385 + "firmware/asm/ffs.c", 2386 + "firmware/asm/memset16.c", 2387 + "firmware/asm/mempcpy.c", 2388 + "firmware/ata_idle_notify.c", 2389 + "firmware/events.c", 2390 + "firmware/backlight.c", 2391 + "firmware/buflib_mempool.c", 2392 + "firmware/core_alloc.c", 2393 + "firmware/general.c", 2394 + "firmware/powermgmt.c", 2395 + "firmware/target/hosted/cpuinfo-linux.c", 2396 + "firmware/target/hosted/cpufreq-linux.c", 2397 + "firmware/target/hosted/rtc.c", 2398 + "firmware/system.c", 2399 + "firmware/usb.c", 2400 + "firmware/logf.c", 2401 + "firmware/panic.c", 2402 + "firmware/target/hosted/sdl/button-sdl.c", 2403 + "firmware/target/hosted/sdl/kernel-sdl.c", 2404 + "firmware/target/hosted/sdl/lcd-bitmap.c", 2405 + "firmware/target/hosted/sdl/lcd-sdl.c", 2406 + "firmware/target/hosted/sdl/system-sdl.c", 2407 + "firmware/target/hosted/sdl/load_code-sdl.c", 2408 + "firmware/target/hosted/sdl/timer-sdl.c", 2409 + "firmware/target/hosted/sdl/key_to_touch-sdl.c", 2410 + "firmware/target/hosted/sdl/app/load_code-sdl-app.c", 2411 + "firmware/target/hosted/sdl/app/button-application.c", 2412 + "firmware/target/hosted/filesystem-unix.c", 2413 + "firmware/target/hosted/filesystem-app.c", 2414 + "firmware/chunk_alloc.c", 2415 + "firmware/common/strptokspn.c", 2416 + "firmware/common/ap_int.c", 2417 + "firmware/common/version.c", 2418 + "firmware/common/crc32.c", 2419 + "firmware/common/loader_strerror.c", 2420 + "firmware/common/pathfuncs.c", 2421 + "firmware/common/fdprintf.c", 2422 + "firmware/common/linked_list.c", 2423 + "firmware/common/rectangle.c", 2424 + "firmware/common/strcasecmp.c", 2425 + "firmware/common/strcasestr.c", 2426 + "firmware/common/strnatcmp.c", 2427 + "firmware/common/strlcat.c", 2428 + "firmware/common/strlcpy.c", 2429 + "firmware/common/strmemccpy.c", 2430 + "firmware/common/timefuncs.c", 2431 + "firmware/common/unicode.c", 2432 + "firmware/common/vuprintf.c", 2433 + "firmware/common/zip.c", 2434 + "firmware/common/adler32.c", 2435 + "firmware/common/inflate.c", 2436 + "firmware/scroll_engine.c", 2437 + "firmware/arabjoin.c", 2438 + "firmware/bidi.c", 2439 + "firmware/font_cache.c", 2440 + "firmware/font.c", 2441 + "firmware/hangul.c", 2442 + "firmware/lru.c", 2443 + "firmware/screendump.c", 2444 + "firmware/drivers/lcd-24bit.c", 2445 + "firmware/common/diacritic.c", 2446 + "firmware/drivers/led.c", 2447 + "firmware/drivers/button.c", 2448 + "firmware/drivers/touchscreen.c", 2449 + "firmware/sound.c", 2450 + "firmware/pcm_sampr.c", 2451 + "firmware/pcm.c", 2452 + "firmware/pcm_mixer.c", 2453 + "firmware/pcm_sw_volume.c", 2454 + "firmware/drivers/audio/audiohw-swcodec.c", 2455 + "firmware/drivers/audio/sdl.c", 2456 + "firmware/target/hosted/sdl/pcm-sdl.c", 2457 + "firmware/kernel/mrsw_lock.c", 2458 + "firmware/kernel/mutex.c", 2459 + "firmware/kernel/queue.c", 2460 + "firmware/kernel/semaphore.c", 2461 + "firmware/kernel/thread.c", 2462 + "firmware/kernel/thread-common.c", 2463 + "firmware/kernel/tick.c", 2464 + "firmware/kernel/timeout.c", 2465 + "build/sysfont.c", 2466 + }; 2467 + 2468 + const libspeex_voice_sources = [_][]const u8{ 2469 + "lib/rbcodec/codecs/libspeex/bits.c", 2470 + "lib/rbcodec/codecs/libspeex/cb_search.c", 2471 + "lib/rbcodec/codecs/libspeex/exc_10_16_table.c", 2472 + "lib/rbcodec/codecs/libspeex/exc_10_32_table.c", 2473 + "lib/rbcodec/codecs/libspeex/exc_20_32_table.c", 2474 + "lib/rbcodec/codecs/libspeex/exc_5_256_table.c", 2475 + "lib/rbcodec/codecs/libspeex/exc_5_64_table.c", 2476 + "lib/rbcodec/codecs/libspeex/exc_8_128_table.c", 2477 + "lib/rbcodec/codecs/libspeex/filters.c", 2478 + "lib/rbcodec/codecs/libspeex/gain_table.c", 2479 + "lib/rbcodec/codecs/libspeex/gain_table_lbr.c", 2480 + "lib/rbcodec/codecs/libspeex/hexc_10_32_table.c", 2481 + "lib/rbcodec/codecs/libspeex/hexc_table.c", 2482 + "lib/rbcodec/codecs/libspeex/high_lsp_tables.c", 2483 + "lib/rbcodec/codecs/libspeex/lsp.c", 2484 + "lib/rbcodec/codecs/libspeex/lsp_tables_nb.c", 2485 + "lib/rbcodec/codecs/libspeex/ltp.c", 2486 + "lib/rbcodec/codecs/libspeex/modes.c", 2487 + "lib/rbcodec/codecs/libspeex/modes_wb.c", 2488 + "lib/rbcodec/codecs/libspeex/nb_celp.c", 2489 + "lib/rbcodec/codecs/libspeex/quant_lsp.c", 2490 + "lib/rbcodec/codecs/libspeex/sb_celp.c", 2491 + "lib/rbcodec/codecs/libspeex/speex.c", 2492 + "lib/rbcodec/codecs/libspeex/speex_callbacks.c", 2493 + "lib/rbcodec/codecs/libspeex/oggframing.c", 2494 + "lib/rbcodec/codecs/libspeex/stereo.c", 2495 + "lib/rbcodec/codecs/libspeex/speex_header.c", 2496 + "lib/rbcodec/codecs/libspeex/lpc.c", 2497 + "lib/rbcodec/codecs/libspeex/vbr.c", 2498 + "lib/rbcodec/codecs/libspeex/vq.c", 2499 + "lib/rbcodec/codecs/libspeex/window.c", 2500 + "lib/rbcodec/codecs/libspeex/resample.c", 2501 + }; 2502 + 2503 + const librbcodec_sources = [_][]const u8{ 2504 + "lib/rbcodec/metadata/metadata.c", 2505 + "lib/rbcodec/metadata/id3tags.c", 2506 + "lib/rbcodec/metadata/mp3.c", 2507 + "lib/rbcodec/metadata/mp3data.c", 2508 + "lib/rbcodec/dsp/channel_mode.c", 2509 + "lib/rbcodec/dsp/compressor.c", 2510 + "lib/rbcodec/dsp/crossfeed.c", 2511 + "lib/rbcodec/dsp/dsp_core.c", 2512 + "lib/rbcodec/dsp/pbe.c", 2513 + "lib/rbcodec/dsp/afr.c", 2514 + "lib/rbcodec/dsp/surround.c", 2515 + "lib/rbcodec/dsp/dsp_filter.c", 2516 + "lib/rbcodec/dsp/dsp_misc.c", 2517 + "lib/rbcodec/dsp/dsp_sample_io.c", 2518 + "lib/rbcodec/dsp/dsp_sample_input.c", 2519 + "lib/rbcodec/dsp/dsp_sample_output.c", 2520 + "lib/rbcodec/dsp/eq.c", 2521 + "lib/rbcodec/dsp/resample.c", 2522 + "lib/rbcodec/dsp/pga.c", 2523 + "lib/rbcodec/dsp/tdspeed.c", 2524 + "lib/rbcodec/dsp/tone_controls.c", 2525 + "lib/rbcodec/metadata/replaygain.c", 2526 + "lib/rbcodec/metadata/metadata_common.c", 2527 + "lib/rbcodec/metadata/a52.c", 2528 + "lib/rbcodec/metadata/adx.c", 2529 + "lib/rbcodec/metadata/aiff.c", 2530 + "lib/rbcodec/metadata/ape.c", 2531 + "lib/rbcodec/metadata/asap.c", 2532 + "lib/rbcodec/metadata/asf.c", 2533 + "lib/rbcodec/metadata/au.c", 2534 + "lib/rbcodec/metadata/ay.c", 2535 + "lib/rbcodec/metadata/vtx.c", 2536 + "lib/rbcodec/metadata/flac.c", 2537 + "lib/rbcodec/metadata/gbs.c", 2538 + "lib/rbcodec/metadata/hes.c", 2539 + "lib/rbcodec/metadata/kss.c", 2540 + "lib/rbcodec/metadata/mod.c", 2541 + "lib/rbcodec/metadata/monkeys.c", 2542 + "lib/rbcodec/metadata/mp4.c", 2543 + "lib/rbcodec/metadata/mpc.c", 2544 + "lib/rbcodec/metadata/nsf.c", 2545 + "lib/rbcodec/metadata/ogg.c", 2546 + "lib/rbcodec/metadata/oma.c", 2547 + "lib/rbcodec/metadata/rm.c", 2548 + "lib/rbcodec/metadata/sgc.c", 2549 + "lib/rbcodec/metadata/sid.c", 2550 + "lib/rbcodec/metadata/smaf.c", 2551 + "lib/rbcodec/metadata/spc.c", 2552 + "lib/rbcodec/metadata/tta.c", 2553 + "lib/rbcodec/metadata/vgm.c", 2554 + "lib/rbcodec/metadata/vorbis.c", 2555 + "lib/rbcodec/metadata/vox.c", 2556 + "lib/rbcodec/metadata/wave.c", 2557 + "lib/rbcodec/metadata/wavpack.c", 2558 + "lib/rbcodec/metadata/aac.c", 2559 + }; 2560 + 2561 + const libskinparser_sources = [_][]const u8{ 2562 + "lib/skin_parser/skin_buffer.c", 2563 + "lib/skin_parser/skin_parser.c", 2564 + "lib/skin_parser/skin_scan.c", 2565 + "lib/skin_parser/tag_table.c", 2566 + }; 2567 + 2568 + const libfixedpoint_sources = [_][]const u8{ 2569 + "lib/fixedpoint/fixedpoint.c", 2570 + }; 2571 + 2572 + const libuisimulator_sources = [_][]const u8{ 2573 + "uisimulator/common/dummylib.c", 2574 + }; 2575 + 2576 + const libcodec_sources = [_][]const u8{ 2577 + "lib/rbcodec/codecs/lib/codeclib.c", 2578 + "lib/rbcodec/codecs/lib/ffmpeg_bitstream.c", 2579 + "lib/rbcodec/codecs/lib/mdct_lookup.c", 2580 + "lib/rbcodec/codecs/lib/fft-ffmpeg.c", 2581 + "lib/rbcodec/codecs/lib/mdct.c", 2582 + }; 2583 + 2584 + const libopus_sources = [_][]const u8{ 2585 + "lib/rbcodec/codecs/opus.c", 2586 + "lib/rbcodec/codecs/codec_crt0.c", 2587 + "lib/rbcodec/codecs/libopus/celt/bands.c", 2588 + "lib/rbcodec/codecs/libopus/celt/celt.c", 2589 + "lib/rbcodec/codecs/libopus/celt/celt_decoder.c", 2590 + "lib/rbcodec/codecs/libopus/celt/celt_lpc.c", 2591 + "lib/rbcodec/codecs/libopus/celt/cwrs.c", 2592 + "lib/rbcodec/codecs/libopus/celt/entcode.c", 2593 + "lib/rbcodec/codecs/libopus/celt/entdec.c", 2594 + "lib/rbcodec/codecs/libopus/celt/entenc.c", 2595 + "lib/rbcodec/codecs/libopus/celt/kiss_fft.c", 2596 + "lib/rbcodec/codecs/libopus/celt/laplace.c", 2597 + "lib/rbcodec/codecs/libopus/celt/mathops.c", 2598 + "lib/rbcodec/codecs/libopus/celt/mdct.c", 2599 + "lib/rbcodec/codecs/libopus/celt/modes.c", 2600 + "lib/rbcodec/codecs/libopus/celt/pitch.c", 2601 + "lib/rbcodec/codecs/libopus/celt/quant_bands.c", 2602 + "lib/rbcodec/codecs/libopus/celt/rate.c", 2603 + "lib/rbcodec/codecs/libopus/celt/vq.c", 2604 + "lib/rbcodec/codecs/libopus/silk/bwexpander_32.c", 2605 + "lib/rbcodec/codecs/libopus/silk/bwexpander.c", 2606 + "lib/rbcodec/codecs/libopus/silk/CNG.c", 2607 + "lib/rbcodec/codecs/libopus/silk/code_signs.c", 2608 + "lib/rbcodec/codecs/libopus/silk/dec_API.c", 2609 + "lib/rbcodec/codecs/libopus/silk/decode_core.c", 2610 + "lib/rbcodec/codecs/libopus/silk/decode_frame.c", 2611 + "lib/rbcodec/codecs/libopus/silk/decode_indices.c", 2612 + "lib/rbcodec/codecs/libopus/silk/decode_parameters.c", 2613 + "lib/rbcodec/codecs/libopus/silk/decode_pitch.c", 2614 + "lib/rbcodec/codecs/libopus/silk/decode_pulses.c", 2615 + "lib/rbcodec/codecs/libopus/silk/decoder_set_fs.c", 2616 + "lib/rbcodec/codecs/libopus/silk/gain_quant.c", 2617 + "lib/rbcodec/codecs/libopus/silk/init_decoder.c", 2618 + "lib/rbcodec/codecs/libopus/silk/lin2log.c", 2619 + "lib/rbcodec/codecs/libopus/silk/log2lin.c", 2620 + "lib/rbcodec/codecs/libopus/silk/LPC_analysis_filter.c", 2621 + "lib/rbcodec/codecs/libopus/silk/LPC_fit.c", 2622 + "lib/rbcodec/codecs/libopus/silk/LPC_inv_pred_gain.c", 2623 + "lib/rbcodec/codecs/libopus/silk/NLSF2A.c", 2624 + "lib/rbcodec/codecs/libopus/silk/NLSF_decode.c", 2625 + "lib/rbcodec/codecs/libopus/silk/NLSF_stabilize.c", 2626 + "lib/rbcodec/codecs/libopus/silk/NLSF_unpack.c", 2627 + "lib/rbcodec/codecs/libopus/silk/NLSF_VQ_weights_laroia.c", 2628 + "lib/rbcodec/codecs/libopus/silk/pitch_est_tables.c", 2629 + "lib/rbcodec/codecs/libopus/silk/PLC.c", 2630 + "lib/rbcodec/codecs/libopus/silk/resampler.c", 2631 + "lib/rbcodec/codecs/libopus/silk/resampler_private_AR2.c", 2632 + "lib/rbcodec/codecs/libopus/silk/resampler_private_down_FIR.c", 2633 + "lib/rbcodec/codecs/libopus/silk/resampler_private_IIR_FIR.c", 2634 + "lib/rbcodec/codecs/libopus/silk/resampler_private_up2_HQ.c", 2635 + "lib/rbcodec/codecs/libopus/silk/resampler_rom.c", 2636 + "lib/rbcodec/codecs/libopus/silk/shell_coder.c", 2637 + "lib/rbcodec/codecs/libopus/silk/sort.c", 2638 + "lib/rbcodec/codecs/libopus/silk/stereo_decode_pred.c", 2639 + "lib/rbcodec/codecs/libopus/silk/stereo_MS_to_LR.c", 2640 + "lib/rbcodec/codecs/libopus/silk/sum_sqr_shift.c", 2641 + "lib/rbcodec/codecs/libopus/silk/table_LSF_cos.c", 2642 + "lib/rbcodec/codecs/libopus/silk/tables_gain.c", 2643 + "lib/rbcodec/codecs/libopus/silk/tables_LTP.c", 2644 + "lib/rbcodec/codecs/libopus/silk/tables_NLSF_CB_NB_MB.c", 2645 + "lib/rbcodec/codecs/libopus/silk/tables_NLSF_CB_WB.c", 2646 + "lib/rbcodec/codecs/libopus/silk/tables_other.c", 2647 + "lib/rbcodec/codecs/libopus/silk/tables_pitch_lag.c", 2648 + "lib/rbcodec/codecs/libopus/silk/tables_pulses_per_block.c", 2649 + "lib/rbcodec/codecs/libopus/opus.c", 2650 + "lib/rbcodec/codecs/libopus/opus_decoder.c", 2651 + "lib/rbcodec/codecs/libopus/opus_header.c", 2652 + "lib/rbcodec/codecs/libopus/ogg/framing.c", 2653 + }; 2654 + 2655 + const vorbis_sources = [_][]const u8{ 2656 + "lib/rbcodec/codecs/vorbis.c", 2657 + "lib/rbcodec/codecs/libtremor/bitwise.c", 2658 + "lib/rbcodec/codecs/libtremor/block.c", 2659 + "lib/rbcodec/codecs/libtremor/codebook.c", 2660 + "lib/rbcodec/codecs/libtremor/floor0.c", 2661 + "lib/rbcodec/codecs/libtremor/floor1.c", 2662 + "lib/rbcodec/codecs/libtremor/framing.c", 2663 + "lib/rbcodec/codecs/libtremor/info.c", 2664 + "lib/rbcodec/codecs/libtremor/mapping0.c", 2665 + "lib/rbcodec/codecs/libtremor/registry.c", 2666 + "lib/rbcodec/codecs/libtremor/res012.c", 2667 + "lib/rbcodec/codecs/libtremor/sharedbook.c", 2668 + "lib/rbcodec/codecs/libtremor/synthesis.c", 2669 + "lib/rbcodec/codecs/libtremor/vorbisfile.c", 2670 + "lib/rbcodec/codecs/libtremor/window.c", 2671 + "lib/rbcodec/codecs/libtremor/ctype.c", 2672 + "lib/rbcodec/codecs/libtremor/oggmalloc.c", 2673 + }; 2674 + 2675 + const libmad_sources = [_][]const u8{ 2676 + "lib/rbcodec/codecs/mpa.c", 2677 + "lib/rbcodec/codecs/libmad/bit.c", 2678 + "lib/rbcodec/codecs/libmad/frame.c", 2679 + "lib/rbcodec/codecs/libmad/huffman.c", 2680 + "lib/rbcodec/codecs/libmad/layer12.c", 2681 + "lib/rbcodec/codecs/libmad/layer3.c", 2682 + "lib/rbcodec/codecs/libmad/stream.c", 2683 + "lib/rbcodec/codecs/libmad/synth.c", 2684 + }; 2685 + 2686 + const libspeex_sources = [_][]const u8{ 2687 + "lib/rbcodec/codecs/speex.c", 2688 + "lib/rbcodec/codecs/libspeex/bits.c", 2689 + "lib/rbcodec/codecs/libspeex/cb_search.c", 2690 + "lib/rbcodec/codecs/libspeex/exc_10_16_table.c", 2691 + "lib/rbcodec/codecs/libspeex/exc_10_32_table.c", 2692 + "lib/rbcodec/codecs/libspeex/exc_20_32_table.c", 2693 + "lib/rbcodec/codecs/libspeex/exc_5_256_table.c", 2694 + "lib/rbcodec/codecs/libspeex/exc_5_64_table.c", 2695 + "lib/rbcodec/codecs/libspeex/exc_8_128_table.c", 2696 + "lib/rbcodec/codecs/libspeex/filters.c", 2697 + "lib/rbcodec/codecs/libspeex/gain_table.c", 2698 + "lib/rbcodec/codecs/libspeex/gain_table_lbr.c", 2699 + "lib/rbcodec/codecs/libspeex/hexc_10_32_table.c", 2700 + "lib/rbcodec/codecs/libspeex/hexc_table.c", 2701 + "lib/rbcodec/codecs/libspeex/high_lsp_tables.c", 2702 + "lib/rbcodec/codecs/libspeex/lsp.c", 2703 + "lib/rbcodec/codecs/libspeex/lsp_tables_nb.c", 2704 + "lib/rbcodec/codecs/libspeex/ltp.c", 2705 + "lib/rbcodec/codecs/libspeex/modes.c", 2706 + "lib/rbcodec/codecs/libspeex/modes_wb.c", 2707 + "lib/rbcodec/codecs/libspeex/nb_celp.c", 2708 + "lib/rbcodec/codecs/libspeex/quant_lsp.c", 2709 + "lib/rbcodec/codecs/libspeex/sb_celp.c", 2710 + "lib/rbcodec/codecs/libspeex/speex.c", 2711 + "lib/rbcodec/codecs/libspeex/speex_callbacks.c", 2712 + "lib/rbcodec/codecs/libspeex/oggframing.c", 2713 + "lib/rbcodec/codecs/libspeex/stereo.c", 2714 + "lib/rbcodec/codecs/libspeex/speex_header.c", 2715 + }; 2716 + 2717 + const all_sources = [_][]const u8{ 2718 + "firmware/common/config.c", 2719 + "apps/action.c", 2720 + "apps/abrepeat.c", 2721 + "build/apps/bitmaps/mono/default_icons.c", 2722 + "build/apps/bitmaps/native/rockboxlogo.320x98x16.c", 2723 + "build/apps/bitmaps/native/usblogo.176x48x16.c", 2724 + "apps/bookmark.c", 2725 + "apps/core_keymap.c", 2726 + "apps/debug_menu.c", 2727 + "apps/filetypes.c", 2728 + "apps/fileop.c", 2729 + "apps/language.c", 2730 + "apps/main.c", 2731 + "apps/menu.c", 2732 + "apps/menus/menu_common.c", 2733 + "apps/menus/display_menu.c", 2734 + "apps/menus/theme_menu.c", 2735 + "apps/menus/plugin_menu.c", 2736 + "apps/menus/eq_menu.c", 2737 + "apps/buffering.c", 2738 + "apps/voice_thread.c", 2739 + "apps/rbcodec_helpers.c", 2740 + "apps/menus/main_menu.c", 2741 + "apps/menus/playback_menu.c", 2742 + "apps/menus/playlist_menu.c", 2743 + "apps/menus/settings_menu.c", 2744 + "apps/menus/sound_menu.c", 2745 + "apps/menus/time_menu.c", 2746 + "apps/misc.c", 2747 + "apps/open_plugin.c", 2748 + "apps/onplay.c", 2749 + "apps/playlist.c", 2750 + "apps/playlist_catalog.c", 2751 + "apps/playlist_viewer.c", 2752 + "apps/plugin.c", 2753 + "apps/root_menu.c", 2754 + "apps/screens.c", 2755 + "apps/settings.c", 2756 + "apps/settings_list.c", 2757 + "apps/shortcuts.c", 2758 + "apps/status.c", 2759 + "apps/cuesheet.c", 2760 + "apps/talk.c", 2761 + "apps/tree.c", 2762 + "apps/tagtree.c", 2763 + "apps/filetree.c", 2764 + "apps/screen_access.c", 2765 + "apps/gui/icon.c", 2766 + "apps/gui/list.c", 2767 + "apps/gui/line.c", 2768 + "apps/gui/bitmap/list.c", 2769 + "apps/gui/bitmap/list-skinned.c", 2770 + "apps/gui/option_select.c", 2771 + "apps/gui/pitchscreen.c", 2772 + "apps/gui/quickscreen.c", 2773 + "apps/gui/folder_select.c", 2774 + "apps/gui/mask_select.c", 2775 + "apps/gui/wps.c", 2776 + "apps/gui/scrollbar.c", 2777 + "apps/gui/splash.c", 2778 + "apps/gui/statusbar.c", 2779 + "apps/gui/statusbar-skinned.c", 2780 + "apps/gui/yesno.c", 2781 + "apps/gui/viewport.c", 2782 + "apps/gui/skin_engine/skin_backdrops.c", 2783 + "apps/gui/skin_engine/skin_display.c", 2784 + "apps/gui/skin_engine/skin_engine.c", 2785 + "apps/gui/skin_engine/skin_parser.c", 2786 + "apps/gui/skin_engine/skin_render.c", 2787 + "apps/gui/skin_engine/skin_tokens.c", 2788 + "apps/gui/skin_engine/skin_touchsupport.c", 2789 + "apps/gui/backdrop.c", 2790 + "apps/recorder/bmp.c", 2791 + "apps/recorder/icons.c", 2792 + "apps/recorder/keyboard.c", 2793 + "apps/recorder/peakmeter.c", 2794 + "apps/recorder/resize.c", 2795 + "apps/recorder/jpeg_load.c", 2796 + "apps/recorder/albumart.c", 2797 + "apps/gui/color_picker.c", 2798 + "apps/audio_thread.c", 2799 + "apps/pcmbuf.c", 2800 + "apps/codec_thread.c", 2801 + "apps/playback.c", 2802 + "apps/codecs.c", 2803 + "apps/beep.c", 2804 + "apps/tagcache.c", 2805 + "apps/keymaps/keymap-touchscreen.c", 2806 + "apps/keymaps/keymap-sdl.c", 2807 + "build/lang/lang_core.c", 2808 + }; 2809 + 2810 + const cflags = [_][]const u8{ 2811 + "-W", 2812 + "-Wall", 2813 + "-Wextra", 2814 + "-Os", 2815 + "-Wstrict-prototypes", 2816 + "-pipe", 2817 + "-std=gnu11", 2818 + "-Wno-gnu", 2819 + "-fPIC", 2820 + "-fvisibility=hidden", 2821 + "-Wno-pointer-to-int-cast", 2822 + "-fno-delete-null-pointer-checks", 2823 + "-fno-strict-overflow", 2824 + "-fno-builtin", 2825 + "-g", 2826 + "-Wno-unused-result", 2827 + "-Wno-pointer-sign", 2828 + "-Wno-override-init", 2829 + "-Wno-shift-negative-value", 2830 + "-Wno-unused-const-variable", 2831 + "-Wno-unused-variable", 2832 + "-Wno-unused-but-set-variable", 2833 + "-O2", 2834 + "-Wno-tautological-compare", 2835 + "-Wno-expansion-to-defined", 2836 + };
+72
build.zig.zon
··· 1 + .{ 2 + // This is the default name used by packages depending on this one. For 3 + // example, when a user runs `zig fetch --save <url>`, this field is used 4 + // as the key in the `dependencies` table. Although the user can choose a 5 + // different name, most users will stick with this provided value. 6 + // 7 + // It is redundant to include "zig" in this name because it is already 8 + // within the Zig package namespace. 9 + .name = "rockbox", 10 + 11 + // This is a [Semantic Version](https://semver.org/). 12 + // In a future version of Zig it will be used for package deduplication. 13 + .version = "0.0.0", 14 + 15 + // This field is optional. 16 + // This is currently advisory only; Zig does not yet do anything 17 + // with this value. 18 + //.minimum_zig_version = "0.11.0", 19 + 20 + // This field is optional. 21 + // Each dependency must either provide a `url` and `hash`, or a `path`. 22 + // `zig build --fetch` can be used to fetch all dependencies of a package, recursively. 23 + // Once all dependencies are fetched, `zig build` no longer requires 24 + // internet connectivity. 25 + .dependencies = .{ 26 + // See `zig fetch --save <url>` for a command-line interface for adding dependencies. 27 + //.example = .{ 28 + // // When updating this field to a new URL, be sure to delete the corresponding 29 + // // `hash`, otherwise you are communicating that you expect to find the old hash at 30 + // // the new URL. 31 + // .url = "https://example.com/foo.tar.gz", 32 + // 33 + // // This is computed from the file contents of the directory of files that is 34 + // // obtained after fetching `url` and applying the inclusion rules given by 35 + // // `paths`. 36 + // // 37 + // // This field is the source of truth; packages do not come from a `url`; they 38 + // // come from a `hash`. `url` is just one of many possible mirrors for how to 39 + // // obtain a package matching this `hash`. 40 + // // 41 + // // Uses the [multihash](https://multiformats.io/multihash/) format. 42 + // .hash = "...", 43 + // 44 + // // When this is provided, the package is found in a directory relative to the 45 + // // build root. In this case the package's hash is irrelevant and therefore not 46 + // // computed. This field and `url` are mutually exclusive. 47 + // .path = "foo", 48 + 49 + // // When this is set to `true`, a package is declared to be lazily 50 + // // fetched. This makes the dependency only get fetched if it is 51 + // // actually used. 52 + // .lazy = false, 53 + //}, 54 + }, 55 + 56 + // Specifies the set of files and directories that are included in this package. 57 + // Only files and directories listed here are included in the `hash` that 58 + // is computed for this package. Only files listed here will remain on disk 59 + // when using the zig package manager. As a rule of thumb, one should list 60 + // files required for compilation plus any license(s). 61 + // Paths are relative to the build root. Use the empty string (`""`) to refer to 62 + // the build root itself. 63 + // A directory listed here means that all files within, recursively, are included. 64 + .paths = .{ 65 + "build.zig", 66 + "build.zig.zon", 67 + "src", 68 + // For example... 69 + //"LICENSE", 70 + //"README.md", 71 + }, 72 + }
+129
flake.lock
··· 1 + { 2 + "nodes": { 3 + "flake-utils": { 4 + "inputs": { 5 + "systems": "systems" 6 + }, 7 + "locked": { 8 + "lastModified": 1710146030, 9 + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", 10 + "owner": "numtide", 11 + "repo": "flake-utils", 12 + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", 13 + "type": "github" 14 + }, 15 + "original": { 16 + "owner": "numtide", 17 + "repo": "flake-utils", 18 + "type": "github" 19 + } 20 + }, 21 + "flake-utils_2": { 22 + "inputs": { 23 + "systems": "systems_2" 24 + }, 25 + "locked": { 26 + "lastModified": 1710146030, 27 + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", 28 + "owner": "numtide", 29 + "repo": "flake-utils", 30 + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", 31 + "type": "github" 32 + }, 33 + "original": { 34 + "owner": "numtide", 35 + "repo": "flake-utils", 36 + "type": "github" 37 + } 38 + }, 39 + "nixpkgs": { 40 + "locked": { 41 + "lastModified": 1725103162, 42 + "narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=", 43 + "owner": "nixos", 44 + "repo": "nixpkgs", 45 + "rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b", 46 + "type": "github" 47 + }, 48 + "original": { 49 + "owner": "nixos", 50 + "ref": "nixos-unstable", 51 + "repo": "nixpkgs", 52 + "type": "github" 53 + } 54 + }, 55 + "nixpkgs_2": { 56 + "locked": { 57 + "lastModified": 1718622336, 58 + "narHash": "sha256-lywfxWRBn+lwdKaBy5x5uTkbCcEPUonCn6bK8OQPsw4=", 59 + "owner": "nixos", 60 + "repo": "nixpkgs", 61 + "rev": "d0fc4188d246ab953653f00e9ce0cf51d10d5eda", 62 + "type": "github" 63 + }, 64 + "original": { 65 + "owner": "nixos", 66 + "repo": "nixpkgs", 67 + "type": "github" 68 + } 69 + }, 70 + "root": { 71 + "inputs": { 72 + "flake-utils": "flake-utils", 73 + "nixpkgs": "nixpkgs", 74 + "zig2nix": "zig2nix" 75 + } 76 + }, 77 + "systems": { 78 + "locked": { 79 + "lastModified": 1681028828, 80 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 81 + "owner": "nix-systems", 82 + "repo": "default", 83 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 84 + "type": "github" 85 + }, 86 + "original": { 87 + "owner": "nix-systems", 88 + "repo": "default", 89 + "type": "github" 90 + } 91 + }, 92 + "systems_2": { 93 + "locked": { 94 + "lastModified": 1681028828, 95 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 96 + "owner": "nix-systems", 97 + "repo": "default", 98 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 99 + "type": "github" 100 + }, 101 + "original": { 102 + "owner": "nix-systems", 103 + "repo": "default", 104 + "type": "github" 105 + } 106 + }, 107 + "zig2nix": { 108 + "inputs": { 109 + "flake-utils": "flake-utils_2", 110 + "nixpkgs": "nixpkgs_2" 111 + }, 112 + "locked": { 113 + "lastModified": 1724289899, 114 + "narHash": "sha256-DC24naOhfxa4eVQObq7puTpYmklzgtUJLD2+Im17Sbg=", 115 + "owner": "Cloudef", 116 + "repo": "zig2nix", 117 + "rev": "7377653b6da83f907f5c3ed9299f12569c24bb13", 118 + "type": "github" 119 + }, 120 + "original": { 121 + "owner": "Cloudef", 122 + "repo": "zig2nix", 123 + "type": "github" 124 + } 125 + } 126 + }, 127 + "root": "root", 128 + "version": 7 129 + }
+108
flake.nix
··· 1 + { 2 + description = "A Nix-flake-based Zig development environment"; 3 + 4 + inputs = { 5 + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; 6 + flake-utils.url = "github:numtide/flake-utils"; 7 + zig2nix.url = "github:Cloudef/zig2nix"; 8 + }; 9 + 10 + outputs = { 11 + self, 12 + nixpkgs, 13 + flake-utils, 14 + zig2nix, 15 + }: 16 + flake-utils.lib.eachDefaultSystem 17 + (system: let 18 + pkgs = import nixpkgs { 19 + inherit system; 20 + }; 21 + env = zig2nix.outputs.zig-env.${system} { zig = pkgs.zig; }; 22 + system-triple = env.lib.zigTripleFromString system; 23 + in with builtins; with env.lib; with env.pkgs.lib; rec { 24 + packages.target = genAttrs allTargetTriples (target: env.packageForTarget target ({ 25 + src = cleanSource ./.; 26 + 27 + nativeBuildInputs = with env.pkgs; []; 28 + buildInputs = with env.pkgsForTarget target; []; 29 + 30 + # Smaller binaries and avoids shipping glibc. 31 + # zigPreferMusl = true; 32 + 33 + # This disables LD_LIBRARY_PATH mangling, binary patching etc... 34 + # The package won't be usable inside nix. 35 + zigDisableWrap = true; 36 + } // optionalAttrs (!pathExists ./build.zig.zon) { 37 + pname = "rockbox-zig"; 38 + version = "0.0.0"; 39 + })); 40 + 41 + # nix build . 42 + packages.default = packages.target.${system-triple}.override { 43 + # Prefer nix friendly settings. 44 + zigPreferMusl = false; 45 + zigDisableWrap = false; 46 + }; 47 + 48 + # For bundling with nix bundle for running outside of nix 49 + # example: https://github.com/ralismark/nix-appimage 50 + apps.bundle.target = genAttrs allTargetTriples (target: let 51 + pkg = packages.target.${target}; 52 + in { 53 + type = "app"; 54 + program = "${pkg}/bin/master"; 55 + }); 56 + 57 + # default bundle 58 + apps.bundle.default = apps.bundle.target.${system-triple}; 59 + 60 + # nix run . 61 + apps.default = env.app [] "zig build run -- \"$@\""; 62 + 63 + # nix run .#build 64 + apps.build = env.app [] "zig build \"$@\""; 65 + 66 + # nix run .#test 67 + apps.test = env.app [] "zig build test -- \"$@\""; 68 + 69 + # nix run .#docs 70 + apps.docs = env.app [] "zig build docs -- \"$@\""; 71 + 72 + # nix run .#deps 73 + apps.deps = env.showExternalDeps; 74 + 75 + # nix run .#zon2json 76 + apps.zon2json = env.app [env.zon2json] "zon2json \"$@\""; 77 + 78 + # nix run .#zon2json-lock 79 + apps.zon2json-lock = env.app [env.zon2json-lock] "zon2json-lock \"$@\""; 80 + 81 + # nix run .#zon2nix 82 + apps.zon2nix = env.app [env.zon2nix] "zon2nix \"$@\""; 83 + 84 + devShells.default = pkgs.mkShell { 85 + buildInputs = [ 86 + pkgs.zig 87 + pkgs.perl 88 + pkgs.gnumake 89 + ]; 90 + shellHook = '' 91 + readonly YELLOW="$(tput setaf 3 2>/dev/null)" 92 + readonly NO_COLOR="$(tput sgr0 2>/dev/null)" 93 + echo $YELLOW 94 + cat <<EOF 95 + __________ __ ___. 96 + Open \______ \ ____ ____ | | _\_ |__ _______ ___ 97 + Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 98 + Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 99 + Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \\ 100 + \/ \/ \/ \/ \/ 101 + EOF 102 + echo $NO_COLOR 103 + echo 'Zig' $(which zig) 104 + echo 'Welcome to Rockbox development shell!' 105 + ''; 106 + }; 107 + }); 108 + }
+6 -6
lib/rbcodec/codecs/demac/libdemac/vector_math16_mmx.h
··· 98 98 [res]"=r"(res), 99 99 [t] "=r"(t) 100 100 : /* inputs */ 101 - [v1]"2"(v1), 102 - [f2]"3"(f2) 101 + [v1]"2"((int)v1), 102 + [f2]"3"((int)f2) 103 103 #else 104 104 [res]"=r"(res), 105 105 [t] "=r"(t) ··· 162 162 [res]"=r"(res), 163 163 [t] "=r"(t) 164 164 : /* inputs */ 165 - [v1]"2"(v1), 166 - [f2]"3"(f2) 165 + [v1]"2"((int)v1), 166 + [f2]"3"((int)f2) 167 167 #else 168 168 [res]"=r"(res), 169 169 [t] "=r"(t) ··· 218 218 [res]"=r"(res), 219 219 [t] "=r"(t) 220 220 : /* inputs */ 221 - [v1]"1"(v1), 222 - [v2]"2"(v2) 221 + [v1]"1"((int)v1), 222 + [v2]"2"((int)v2) 223 223 #else 224 224 [res]"=r"(res), 225 225 [t] "=r"(t)
+1
lib/rbcodec/codecs/libmusepack/mpcdec_math.h
··· 38 38 #ifndef _mpcdec_math_h_ 39 39 #define _mpcdec_math_h_ 40 40 41 + #include<assert.h> 41 42 #include "mpc_types.h" 42 43 43 44 #define MPC_FIXED_POINT_SHIFT 16
+4
lib/rbcodec/codecs/opus.c
··· 38 38 39 39 #define SEEK_REWIND 3840 /* 80 ms @ 48 kHz */ 40 40 41 + #ifndef MIN 42 + #define MIN(a,b) ((a)<(b) ? (a):(b)) 43 + #endif 44 + 41 45 /* the opus pseudo stack pointer */ 42 46 extern char *global_stack; 43 47
+54
src/main.zig
··· 1 + const std = @import("std"); 2 + 3 + pub fn main() !void { 4 + var gpa = std.heap.GeneralPurposeAllocator(.{}){}; 5 + const allocator = gpa.allocator(); 6 + 7 + var file = try std.fs.cwd().openFile("build/make.dep", .{}); 8 + defer file.close(); 9 + 10 + var buffered = std.io.bufferedReader(file.reader()); 11 + var reader = buffered.reader(); 12 + 13 + var arr = std.ArrayList(u8).init(allocator); 14 + defer arr.deinit(); 15 + 16 + var line_count: usize = 0; 17 + var byte_count: usize = 0; 18 + while (true) { 19 + reader.streamUntilDelimiter(arr.writer(), '\n', null) catch |err| switch (err) { 20 + error.EndOfStream => break, 21 + else => return err, 22 + }; 23 + line_count += 1; 24 + byte_count += arr.items.len; 25 + 26 + //if (std.mem.containsAtLeast(u8, arr.items, 1, ".c \\")) { 27 + // std.debug.print("{s}\n", .{arr.items}); 28 + //} 29 + 30 + arr.clearRetainingCapacity(); 31 + } 32 + std.debug.print("{d} lines, {d} bytes\n", .{ line_count, byte_count }); 33 + 34 + // Prints to stderr (it's a shortcut based on `std.io.getStdErr()`) 35 + std.debug.print("All your {s} are belong to us.\n", .{"codebase"}); 36 + 37 + // stdout is for the actual output of your application, for example if you 38 + // are implementing gzip, then only the compressed bytes should be sent to 39 + // stdout, not any debugging messages. 40 + const stdout_file = std.io.getStdOut().writer(); 41 + var bw = std.io.bufferedWriter(stdout_file); 42 + const stdout = bw.writer(); 43 + 44 + try stdout.print("Run `zig build test` to run the tests.\n", .{}); 45 + 46 + try bw.flush(); // don't forget to flush! 47 + } 48 + 49 + test "simple test" { 50 + var list = std.ArrayList(i32).init(std.testing.allocator); 51 + defer list.deinit(); // try commenting this out and see if zig detects the memory leak! 52 + try list.append(42); 53 + try std.testing.expectEqual(@as(i32, 42), list.pop()); 54 + }
+10
src/root.zig
··· 1 + const std = @import("std"); 2 + const testing = std.testing; 3 + 4 + export fn add(a: i32, b: i32) i32 { 5 + return a + b; 6 + } 7 + 8 + test "basic add functionality" { 9 + try testing.expect(add(3, 7) == 10); 10 + }
+2
tools/root.make
··· 414 414 $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) --app=$(APPLICATION) -m "$(MODELNAME)" -i "$(TARGET_ID)" $(INSTALL) -z "zip -r0" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 2 $(TARGET) $(BINARY) -l 415 415 endif 416 416 417 + zig: $(BUILDDIR)/lang/lang.h $(BUILDDIR)/lang_enum.h $(BUILDDIR)/lang/lang_core.c $(BUILDDIR)/lang/max_language_size.h $(BUILDDIR)/sysfont.o $(BUILDDIR)/rbversion.h $(PBMPHFILES) $(LUA_BUILDDIR)/actions.lua $(LUA_BUILDDIR)/settings.lua $(LUA_BUILDDIR)/buttons.lua $(LUA_BUILDDIR)/rb_defines.lua $(LUA_BUILDDIR)/sound_defines.lua $(LUA_BUILDDIR)/rocklib_aux.c $(BUILDDIR)/credits.raw credits.raw 418 + cd .. && zig build 417 419 help: 418 420 @echo "A few helpful make targets" 419 421 @echo ""