refactor: split monolithic main.c into modular source files
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
This commit is contained in:
16
makefile
16
makefile
@@ -1,9 +1,15 @@
|
||||
CC ?= gcc
|
||||
CFLAGS ?= -Wall -Wextra -g
|
||||
LDFLAGS ?= -ljack
|
||||
CFLAGS ?= -Wall -Wextra -g -Isrc
|
||||
LDFLAGS ?= -ljack -lm
|
||||
|
||||
looper: src/main.c
|
||||
$(CC) $(CFLAGS) -o looper src/main.c $(LDFLAGS)
|
||||
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
|
||||
@@ -13,4 +19,4 @@ test: integration
|
||||
|
||||
.PHONY: clean integration test
|
||||
clean:
|
||||
rm -f looper integration_test
|
||||
rm -f looper integration_test src/*.o
|
||||
|
||||
Reference in New Issue
Block a user