move engine to engine/

This commit is contained in:
Loic Coenen
2026-05-13 17:55:59 +00:00
parent 10d0269a5a
commit f3dde6b668
38 changed files with 3141 additions and 0 deletions

32
engine/makefile Normal file
View File

@@ -0,0 +1,32 @@
CC ?= gcc
CFLAGS ?= -Wall -Wextra -g -Isrc
LDFLAGS ?= -ljack -lm
SRC = src/main.c src/looper.c src/channel.c src/midi.c src/queue.c src/pipe.c
OBJ = $(SRC:.c=.o)
looper: $(OBJ)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
src/%.o: src/%.c
$(CC) $(CFLAGS) -c -o $@ $<
integration: looper tests/integration.c
$(CC) $(CFLAGS) -o integration_test tests/integration.c -ljack -lm
./integration_test
test: integration
.PHONY: clean integration test
clean:
rm -f looper integration_test src/*.o
check:
cppcheck --enable=all --error-exitcode=1 --suppress=missingIncludeSystem --suppress=normalCheckLevelMaxBranches src/*.c --library=posix
# Optional: Format code using clang-format
format:
clang-format -i src/*.c
install-hooks:
git config core.hooksPath .githooks