From 2875bd24390d48d2af44071869757b6f1ba35498 Mon Sep 17 00:00:00 2001 From: grm Date: Sun, 19 Oct 2025 12:45:07 +0300 Subject: Initial sequencer --- b.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'b.c') diff --git a/b.c b/b.c index d063bb8..381793c 100644 --- a/b.c +++ b/b.c @@ -52,6 +52,14 @@ synth_libs(B_Cmd *cmd) inlcude_dirs(cmd); } +void +sequencer_libs(B_Cmd *cmd) +{ + b_cmd_append(cmd, "-lportaudio", "-lportmidi", "-lrt", "-lraylib", "-lpthread"); + + inlcude_dirs(cmd); +} + void cc(B_Cmd *cmd) { b_cmd_append(cmd, "clang"); @@ -84,6 +92,8 @@ build_c(B_Cmd* cmd, b_da_append_many(cmd, input_paths, input_paths_len); if (0 == strcmp(output_path, BUILD_DIR"synth")) synth_libs(cmd); + if (0 == strcmp(output_path, BUILD_DIR"sequencer")) + sequencer_libs(cmd); return b_cmd_run_sync(*cmd); } @@ -215,6 +225,16 @@ main(int argc, char *argv[]) "src/os.c", }; + const char *sequencer_deps[] = { + "src/midi.h", + "src/synth_common.h", + }; + + const char* sequencer_paths[] = { + "src/midi.c", + "src/sequencer.c", + }; + const char *templates[] = { "tmpl/index.html" }; @@ -235,6 +255,10 @@ main(int argc, char *argv[]) B_ARRAY_LEN(synth_deps), BUILD_DIR "synth")) return 1; + if (!build_c(&cmd, sequencer_paths, B_ARRAY_LEN(sequencer_paths), sequencer_deps, + B_ARRAY_LEN(sequencer_deps), BUILD_DIR "sequencer")) + return 1; + if (tests && !build_tests(&cmd, BUILD_DIR "test")) return 1; -- cgit v1.2.3