Files
jack-looper/makefile
Loic Coenen 472336606c build: add test_cli target to Makefile
Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
2026-05-01 14:15:51 +00:00

56 lines
1.2 KiB
Makefile

CC = gcc
CFLAGS = -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200809L
LDFLAGS = -ljack -lm -lncurses
all: jack-looper test_engine test_tui test_gui test_cli
jack-looper: main.o engine.o tui.o gui.o
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
test_engine: test_engine.o engine.o
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
test_tui: test_tui.o engine.o
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
test_gui: test_gui.o gui.o engine.o
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
test_cli: test_cli.o engine.o
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
main.o: main.c engine.h tui.h
$(CC) $(CFLAGS) -c -o $@ $<
engine.o: engine.c engine.h
$(CC) $(CFLAGS) -c -o $@ $<
tui.o: tui.c tui.h engine.h
$(CC) $(CFLAGS) -c -o $@ $<
gui.o: gui.c gui.h engine.h microui.h
$(CC) $(CFLAGS) -c -o $@ $<
test_engine.o: test_engine.c engine.h
$(CC) $(CFLAGS) -c -o $@ $<
test_tui.o: test_tui.c engine.h tui.h
$(CC) $(CFLAGS) -c -o $@ $<
test_gui.o: test_gui.c gui.h engine.h
$(CC) $(CFLAGS) -c -o $@ $<
test_cli.o: test_cli.c engine.h
$(CC) $(CFLAGS) -c -o $@ $<
.PHONY: all clean test
clean:
rm -f *.o jack-looper test_engine test_tui test_gui test_cli
test: test_engine test_tui test_gui test_cli
./test_engine
./test_tui
./test_gui
./test_cli