diff options
Diffstat (limited to 'b.c')
| -rw-r--r-- | b.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -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; |
