feat: integrate real Carla host with JACK support and add plugin abstraction layer
This commit is contained in:
@@ -1,49 +1,67 @@
|
||||
CC = gcc
|
||||
CFLAGS = -Wall -Wextra -Wpedantic -std=c11 -Isrc
|
||||
CARLA_INC = -I/usr/include/carla -I/usr/include/carla/includes
|
||||
CARLA_LIB = -L/usr/lib/carla -Wl,-rpath,/usr/lib/carla -lcarla_standalone2
|
||||
|
||||
CARLA_OBJ = src/carla_host.o
|
||||
|
||||
all: looper-client test_status_parse
|
||||
|
||||
looper-client: src/main.c src/tui.c $(CARLA_OBJ)
|
||||
$(CC) $(CFLAGS) -o $@ $^ -lncurses
|
||||
looper-client: src/main.c src/tui.c $(PLUGINS_OBJ) $(CARLA_OBJ)
|
||||
$(CC) $(CFLAGS) $(CARLA_INC) -o $@ $^ $(CARLA_LIB) -ljack -lncurses
|
||||
|
||||
test_status_parse: tests/test_status_parse.c
|
||||
$(CC) $(CFLAGS) -o test_status_parse tests/test_status_parse.c src/tui.c -lncurses
|
||||
test_status_parse: tests/test_status_parse.c $(CARLA_OBJ)
|
||||
$(CC) $(CFLAGS) $(CARLA_INC) -o test_status_parse tests/test_status_parse.c src/tui.c $(CARLA_OBJ) $(CARLA_LIB) -ljack -lncurses
|
||||
|
||||
# --- Carla host stubs ---
|
||||
CARLA_OBJ = src/carla_host.o
|
||||
# --- Plugin stubs (now real) ---
|
||||
PLUGINS_OBJ = src/plugins.o
|
||||
|
||||
$(PLUGINS_OBJ): src/plugins.c src/plugins.h
|
||||
$(CC) $(CFLAGS) $(CARLA_INC) -c -o $@ $<
|
||||
|
||||
$(CARLA_OBJ): src/carla_host.c src/carla_host.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
$(CC) -Wall -Wextra -std=c11 -Isrc $(CARLA_INC) -c -o $@ $<
|
||||
|
||||
# --- Carla host tests ---
|
||||
TEST_CARLA_BIN = test_carla_host
|
||||
TEST_CARLA_OBJ = tests/test_carla_host.o
|
||||
# --- Plugin tests ---
|
||||
TEST_PLUGINS_BIN = test_plugins
|
||||
TEST_PLUGINS_OBJ = tests/test_plugins.o
|
||||
|
||||
$(TEST_CARLA_OBJ): tests/test_carla_host.c src/carla_host.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
$(TEST_PLUGINS_OBJ): tests/test_plugins.c src/plugins.h
|
||||
$(CC) $(CFLAGS) $(CARLA_INC) -c -o $@ $<
|
||||
|
||||
$(TEST_CARLA_BIN): $(TEST_CARLA_OBJ) $(CARLA_OBJ)
|
||||
$(CC) $(CFLAGS) -o $@ $^
|
||||
$(TEST_PLUGINS_BIN): $(TEST_PLUGINS_OBJ) $(PLUGINS_OBJ) $(CARLA_OBJ)
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(CARLA_LIB) -ljack
|
||||
|
||||
# ensure the tests directory exists
|
||||
tests/test_carla_host.o: | tests
|
||||
tests/test_plugins.o: | tests
|
||||
|
||||
# --- send_command test ---
|
||||
TEST_CLIENT_BIN = test_client
|
||||
TEST_CLIENT_OBJ = tests/test_client.o
|
||||
|
||||
$(TEST_CLIENT_OBJ): tests/test_client.c src/tui.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
$(CC) $(CFLAGS) $(CARLA_INC) -c -o $@ $<
|
||||
|
||||
$(TEST_CLIENT_BIN): $(TEST_CLIENT_OBJ) src/tui.c
|
||||
$(CC) $(CFLAGS) -o $@ $^ -lncurses
|
||||
$(TEST_CLIENT_BIN): $(TEST_CLIENT_OBJ) src/tui.c $(CARLA_OBJ)
|
||||
$(CC) $(CFLAGS) $(CARLA_INC) -o $@ $^ $(CARLA_LIB) -ljack -lncurses
|
||||
|
||||
test: looper-client test_status_parse $(TEST_CARLA_BIN) $(TEST_CLIENT_BIN)
|
||||
# --- Carla host tests ---
|
||||
TEST_CARLA_BIN = test_carla_host
|
||||
TEST_CARLA_OBJ = tests/test_carla_host.o
|
||||
|
||||
$(TEST_CARLA_OBJ): tests/test_carla_host.c src/carla_host.h
|
||||
$(CC) $(CFLAGS) $(CARLA_INC) -c -o $@ $<
|
||||
|
||||
$(TEST_CARLA_BIN): $(TEST_CARLA_OBJ) $(CARLA_OBJ)
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(CARLA_LIB) -ljack
|
||||
|
||||
test: looper-client test_status_parse $(TEST_PLUGINS_BIN) $(TEST_CLIENT_BIN) $(TEST_CARLA_BIN)
|
||||
./test_status_parse
|
||||
./$(TEST_CARLA_BIN)
|
||||
./$(TEST_PLUGINS_BIN)
|
||||
./$(TEST_CLIENT_BIN)
|
||||
./$(TEST_CARLA_BIN)
|
||||
|
||||
.PHONY: all test clean
|
||||
|
||||
clean:
|
||||
rm -f looper-client test_status_parse $(TEST_CARLA_BIN) $(TEST_CLIENT_BIN) *.o tests/*.o src/*.o
|
||||
rm -f looper-client test_status_parse $(TEST_PLUGINS_BIN) $(TEST_CLIENT_BIN) $(TEST_CARLA_BIN) *.o tests/*.o src/*.o
|
||||
|
||||
Reference in New Issue
Block a user