summaryrefslogtreecommitdiffstats
path: root/b.c
diff options
context:
space:
mode:
authorgrm <grm@eyesin.space>2025-10-19 12:45:07 +0300
committergrm <grm@eyesin.space>2025-10-19 12:45:07 +0300
commit2875bd24390d48d2af44071869757b6f1ba35498 (patch)
tree35cc617dba5cbae9ac63cd72b064c690a1b22338 /b.c
parentbb13b4a409578cf1e9fbca727196f88249fc4b0b (diff)
downloadsynth-project-master.tar.gz
synth-project-master.tar.bz2
synth-project-master.zip
Initial sequencerHEADmaster
Diffstat (limited to 'b.c')
-rw-r--r--b.c24
1 files changed, 24 insertions, 0 deletions
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;