feat: add makefile with build, test, and clean targets

Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
Loic Coenen
2026-05-01 00:48:36 +00:00
parent 22bed9f3c9
commit f2d619744f
2 changed files with 60 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
CC = gcc
CFLAGS = -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200809L
LDFLAGS = -ljack -lm
all: jack-looper test_engine
jack-looper: main.o engine.o
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
test_engine: test_engine.o engine.o
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
main.o: main.c engine.h
$(CC) $(CFLAGS) -c -o $@ $<
engine.o: engine.c engine.h
$(CC) $(CFLAGS) -c -o $@ $<
test_engine.o: test_engine.c engine.h
$(CC) $(CFLAGS) -c -o $@ $<
.PHONY: all clean test
clean:
rm -f *.o jack-looper test_engine
test: test_engine
./test_engine