Files
looper/makefile
Loic Coenen b02c45e7ab fix: suppress cppcheck warnings for missing includes and usleep
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
2026-05-09 13:19:08 +00:00

33 lines
793 B
Makefile

CC ?= gcc
CFLAGS ?= -Wall -Wextra -g -Isrc
LDFLAGS ?= -ljack -lm
SRC = src/main.c src/looper.c src/channel.c src/midi.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=unreadVariable --suppress=missingIncludeSystem --suppress=usleepCalled --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