From 4af400141af0c97c4e4bcd47acf78107a17eafbe Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Fri, 3 Jan 2025 10:31:38 +0100 Subject: Separated class files --- Makefile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index eb05671..47f9a5f 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,22 @@ -default: alsa +TARGET=click + +default: $(TARGET) + +SRCS=main.cpp MIDI.cpp PCM.cpp ClickStream.cpp config.cpp + +OBJS=$(SRCS:.cpp=.o) CXXLIBS=$(shell pkg-config --libs alsa) -lreichwein -lfmt CXX=clang++ -alsa: alsa.cpp - $(CXX) $(CXXFLAGS) -std=c++20 -O2 -g -Wall -o $@ $^ $(CXXLIBS) +$(TARGET): $(OBJS) + $(CXX) $^ -o $@ $(CXXLIBS) + +%.o: %.cpp + $(CXX) $(CXXFLAGS) -std=c++20 -O2 -g -Wall -o $@ -c $< clean: - rm -f alsa + rm -f $(TARGET) $(OBJS) sound: ffmpeg -i media/click.wav -f s16le media/click.s16le -- cgit v1.2.3