Merge branch '8-add-tui' - tests not passing

This commit is contained in:
Loic Coenen
2026-05-17 19:02:03 +00:00
57 changed files with 2786 additions and 92 deletions

View File

@@ -1,32 +1,29 @@
CC ?= gcc
CFLAGS ?= -Wall -Wextra -g -Isrc
LDFLAGS ?= -ljack -lm -lpthread -lsndfile
# Top-level Makefile delegates build/clean/test to subdirectories
SRC = src/main.c src/looper.c src/channel.c src/midi.c src/ringbuffer.c src/wav.c
OBJ = $(SRC:.c=.o)
SUBDIRS = engine client
looper: $(OBJ)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
.PHONY: all build clean test check format $(SUBDIRS)
src/%.o: src/%.c
$(CC) $(CFLAGS) -c -o $@ $<
all: build
integration: looper tests/integration.c
$(CC) $(CFLAGS) -o integration_test tests/integration.c -ljack -lm -lpthread
./integration_test
build: $(SUBDIRS)
@echo "Build complete."
test: integration
$(SUBDIRS):
$(MAKE) -C $@
test:
$(MAKE) -C engine test
$(MAKE) -C client test
.PHONY: clean integration test
clean:
rm -f looper integration_test src/*.o
@for dir in $(SUBDIRS); do \
echo "Cleaning $$dir..."; \
$(MAKE) -C $$dir clean; \
done
check:
cppcheck --enable=all --error-exitcode=1 --suppress=missingIncludeSystem --suppress=normalCheckLevelMaxBranches src/*.c --library=posix .
$(MAKE) -C engine check
# Optional: Format code using clang-format
format:
clang-format -i src/*.c
install-hooks:
git config core.hooksPath .githooks
$(MAKE) -C engine format