summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2025-01-03 10:31:38 +0100
committerRoland Reichwein <mail@reichwein.it>2025-01-03 10:31:38 +0100
commit4af400141af0c97c4e4bcd47acf78107a17eafbe (patch)
treecd919376466679f4177d68cf6c14bdf9a0f80595 /Makefile
parent7b9e5cb03b530458b7f9df1fee678e2ba3a746da (diff)
Separated class files
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 13 insertions, 4 deletions
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